diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2013-10-29 11:09:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-11-06 14:27:51 +1000 |
commit | 48b1f5ddaafa341bebbaac2a5fbaaa89b5b16281 (patch) | |
tree | 8b1d13ba86eead39e477b46747ffe975247f885a | |
parent | 7e99acdcab6b3ea0c0b87445b179c7140ff9a81d (diff) |
drm: do not set crtc enabled field twice
There is no need to set crtc->enabled field in
drm_crtc_helper_set_config. This is already done (and
properly restored in case of failure) in
drm_crtc_helper_set_mode that is called by
drm_crtc_helper_set_config. Doing it at only one
place makes restoration in case of failure easier.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 0ebaa6d79af..930870728a9 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -795,8 +795,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) mode_changed = true; if (mode_changed) { - set->crtc->enabled = drm_helper_crtc_in_use(set->crtc); - if (set->crtc->enabled) { + if (drm_helper_crtc_in_use(set->crtc)) { DRM_DEBUG_KMS("attempting to set mode from" " userspace\n"); drm_mode_debug_printmodeline(set->mode); |