summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-22 16:22:53 +0100
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-29 18:14:20 +0200
commit7e7de761af2e4760cc5ad2968c37c2814317ede6 (patch)
tree44b6a9d894d5dd3bd427cd9875fc291d6fabd663 /drivers/gpu/drm/drm_crtc.c
parentdrm/atomic-helper: Drop plane->fb references only for drm_atomic_helper_shutd... (diff)
downloadlinux-7e7de761af2e4760cc5ad2968c37c2814317ede6.tar.xz
linux-7e7de761af2e4760cc5ad2968c37c2814317ede6.zip
drm: Clear crtc->primary->crtc when disabling the crtc via setcrtc()
Keep the primary->crtc in sync with the state->crtc (also with primary->fb and state->fb) when disabling the crtc (and thus also the primary) via setcrtc(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 03583887cfec..7a973ada7195 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -471,7 +471,7 @@ static int __drm_mode_set_config_internal(struct drm_mode_set *set,
ret = crtc->funcs->set_config(set, ctx);
if (ret == 0) {
- crtc->primary->crtc = crtc;
+ crtc->primary->crtc = fb ? crtc : NULL;
crtc->primary->fb = fb;
}