aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_gdp.c
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2016-09-06 09:41:48 +0200
committerVincent Abriou <vincent.abriou@st.com>2016-09-20 11:32:05 +0200
commit5552aad35d439ad96ae55f0e3db25b6268170259 (patch)
treebc234eed2644272e8de5a1efdc547cfd97f08624 /drivers/gpu/drm/sti/sti_gdp.c
parentdrm/sti: run gdp init sequence only once (diff)
downloadlinux-dev-5552aad35d439ad96ae55f0e3db25b6268170259.tar.xz
linux-dev-5552aad35d439ad96ae55f0e3db25b6268170259.zip
drm/sti: fix atomic_disable check
When a drm_plane is being disabled, its ->crtc member is set to NULL before the .atomic_disable() func is called. To get the crtc of the plane, read old_state->crtc instead of drm_plane->crtc Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_gdp.c')
-rw-r--r--drivers/gpu/drm/sti/sti_gdp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index 1d5ebe4c51db..083c0aca57e2 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -846,15 +846,15 @@ static void sti_gdp_atomic_disable(struct drm_plane *drm_plane,
{
struct sti_plane *plane = to_sti_plane(drm_plane);
- if (!drm_plane->crtc) {
+ if (!oldstate->crtc) {
DRM_DEBUG_DRIVER("drm plane:%d not enabled\n",
drm_plane->base.id);
return;
}
DRM_DEBUG_DRIVER("CRTC:%d (%s) drm plane:%d (%s)\n",
- drm_plane->crtc->base.id,
- sti_mixer_to_str(to_sti_mixer(drm_plane->crtc)),
+ oldstate->crtc->base.id,
+ sti_mixer_to_str(to_sti_mixer(oldstate->crtc)),
drm_plane->base.id, sti_plane_to_str(plane));
plane->status = STI_PLANE_DISABLING;