drm/i915: Get rid of intel_crtc_set_state()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 21 Apr 2015 14:13:24 +0000 (17:13 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 May 2015 11:04:11 +0000 (13:04 +0200)
Now that we do proper state swaps, we don't depend on this function
anymore to keep the state in sync.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index e4983c19829e3a8ac675389db7a66d0e6dfee843..b5806400d40eb531fd0f96cb79c2193e766fae61 100644 (file)
@@ -10256,14 +10256,6 @@ void intel_mark_idle(struct drm_device *dev)
        intel_runtime_pm_put(dev_priv);
 }
 
-static void intel_crtc_set_state(struct intel_crtc *crtc,
-                                struct intel_crtc_state *crtc_state)
-{
-       kfree(crtc->config);
-       crtc->config = crtc_state;
-       crtc->base.state = &crtc_state->base;
-}
-
 static void intel_crtc_destroy(struct drm_crtc *crtc)
 {
        struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -10280,7 +10272,6 @@ static void intel_crtc_destroy(struct drm_crtc *crtc)
                kfree(work);
        }
 
-       intel_crtc_set_state(intel_crtc, NULL);
        drm_crtc_cleanup(crtc);
 
        kfree(intel_crtc);
@@ -13502,7 +13493,8 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
        crtc_state = kzalloc(sizeof(*crtc_state), GFP_KERNEL);
        if (!crtc_state)
                goto fail;
-       intel_crtc_set_state(intel_crtc, crtc_state);
+       intel_crtc->config = crtc_state;
+       intel_crtc->base.state = &crtc_state->base;
        crtc_state->base.crtc = &intel_crtc->base;
 
        /* initialize shared scalers */