drm/sti: Stop consulting plane->crtc
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 5 Apr 2018 15:13:49 +0000 (18:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 May 2018 17:08:27 +0000 (20:08 +0300)
We want to get rid of plane->crtc on atomic drivers. Stop looking at it.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180405151400.11326-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/sti/sti_gdp.c

index 9b2c47051b51ed50ce5153f8a33aa15ac2178348..49813d34bdf06b3cd22ff314f7733605c850029e 100644 (file)
@@ -211,7 +211,11 @@ static int gdp_dbg_show(struct seq_file *s, void *data)
        struct drm_info_node *node = s->private;
        struct sti_gdp *gdp = (struct sti_gdp *)node->info_ent->data;
        struct drm_plane *drm_plane = &gdp->plane.drm_plane;
-       struct drm_crtc *crtc = drm_plane->crtc;
+       struct drm_crtc *crtc;
+
+       drm_modeset_lock(&drm_plane->mutex, NULL);
+       crtc = drm_plane->state->crtc;
+       drm_modeset_unlock(&drm_plane->mutex);
 
        seq_printf(s, "%s: (vaddr = 0x%p)",
                   sti_plane_to_str(&gdp->plane), gdp->regs);