]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/ast: Only set VGA SCREEN_DISABLE bit in CRTC code
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 27 Jun 2024 15:27:51 +0000 (17:27 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 3 Jul 2024 07:38:23 +0000 (09:38 +0200)
commit171b357d18eea64988ae774aa25b32bbfeb16880
tree2a983e85b1bdb151e1be6873db114cfc2af0371d
parentbb5367d17e83af95b56d2cc455a09316d6ff3349
drm/ast: Only set VGA SCREEN_DISABLE bit in CRTC code

The SCREEN_DISABLE bit controls scanout from display memory. The bit
affects all planes, so set it only in the CRTC's atomic enable and
disable functions.

A number of bugs affect this fix. First of all, ast_set_std_regs()
tries to set VGASR1 except for the SD bit. But the read bitmask is
invert, so it preserves anything except the SD bit. Fix this by
re-inverting the read mask.

The second issue is that primary-plane and CRTC helpers modify the
SD bit. The bit controls scanout for all planes, primary and HW
cursor, so set it only in the CRTC code.

Further add a constant to represent the SD bit in VGASR1. Keep the
plane's atomic_disable around to make the DRM framework happy.

v2:
- fix typos in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-7-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/ast/ast_reg.h