drm: do not set crtc enabled field twice
authorIlija Hadzic <ihadzic@research.bell-labs.com>
Tue, 29 Oct 2013 15:09:45 +0000 (11:09 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Nov 2013 04:27:51 +0000 (14:27 +1000)
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>
drivers/gpu/drm/drm_crtc_helper.c

index 0ebaa6d79afa4e7d51339b444b63727857c8f66c..930870728a9cfe8b8f1c5b314b97937364096123 100644 (file)
@@ -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);