Skip to content

Commit

Permalink
drm: do not set crtc enabled field twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilija Hadzic authored and Dave Airlie committed Nov 6, 2013
1 parent 7e99acd commit 48b1f5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 48b1f5d

Please sign in to comment.