diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-02 02:51:54 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-02 02:51:54 +0000 |
commit | 8b2554ab20b90e0b8cc6ca16515ccd5b881062ec (patch) | |
tree | d69daf99f06da53a29476c403403fb8d4abda412 /sys/dev/pci | |
parent | 423823a0f0698ea0bdd94f5cc3e62130559b2b37 (diff) |
drm/atomic: Add the crtc to affected crtc only if uapi.enable = true
From Manasi Navare
73740f948252e424a01465155d8737bceae23653 in linux 5.15.y/5.15.19
5ec1cebd59300ddd26dbaa96c17c508764eef911 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/drm_atomic.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drm_atomic.c b/sys/dev/pci/drm/drm_atomic.c index 497883931a8..126ad24368f 100644 --- a/sys/dev/pci/drm/drm_atomic.c +++ b/sys/dev/pci/drm/drm_atomic.c @@ -1329,8 +1329,10 @@ int drm_atomic_check_only(struct drm_atomic_state *state) DRM_DEBUG_ATOMIC("checking %p\n", state); - for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) - requested_crtc |= drm_crtc_mask(crtc); + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->enable) + requested_crtc |= drm_crtc_mask(crtc); + } for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { ret = drm_atomic_plane_check(old_plane_state, new_plane_state); @@ -1379,8 +1381,10 @@ int drm_atomic_check_only(struct drm_atomic_state *state) } } - for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) - affected_crtc |= drm_crtc_mask(crtc); + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->enable) + affected_crtc |= drm_crtc_mask(crtc); + } /* * For commits that allow modesets drivers can add other CRTCs to the |