drm/tegra: dc: Wire up CRTC parent of atomic state
authorThierry Reding <treding@nvidia.com>
Wed, 28 Jan 2015 14:03:31 +0000 (15:03 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 19 Feb 2015 13:21:47 +0000 (14:21 +0100)
Store a pointer to the CRTC in its atomic state to make it easy for
state handling code to get at the CRTC.

Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c

index ec84bd4..2fd2293 100644 (file)
@@ -997,8 +997,10 @@ static void tegra_crtc_reset(struct drm_crtc *crtc)
        crtc->state = NULL;
 
        state = kzalloc(sizeof(*state), GFP_KERNEL);
-       if (state)
+       if (state) {
                crtc->state = &state->base;
+               crtc->state->crtc = crtc;
+       }
 }
 
 static struct drm_crtc_state *