linux/drivers/gpu/drm/ast
Thomas Zimmermann a9fb41b5de drm/ast: Clear preserved bits from register output value
Preserve the I/O register bits in __ast_write8_i_masked() as specified
by preserve_mask. Accidentally OR-ing the output value into these will
overwrite the register's previous settings.

Fixes display output on the AST2300, where the screen can go blank at
boot. The driver's original commit 312fec1405 ("drm: Initial KMS
driver for AST (ASpeed Technologies) 2000 series (v2)") already added
the broken code. Commit 6f719373b9 ("drm/ast: Blank with VGACR17 sync
enable, always clear VGACRB6 sync off") triggered the bug.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: Peter Schneider <pschneider1968@googlemail.com>
Closes: https://lore.kernel.org/dri-devel/a40caf8e-58ad-4f9c-af7f-54f6f69c29bb@googlemail.com/
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Fixes: 6f719373b9 ("drm/ast: Blank with VGACR17 sync enable, always clear VGACRB6 sync off")
Fixes: 312fec1405 ("drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Nick Bowler <nbowler@draconx.ca>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.5+
Link: https://patch.msgid.link/20251024073626.129032-1-tzimmermann@suse.de
2025-10-30 20:44:44 +01:00
..
Kconfig PCI: Add CONFIG_MMU dependency 2025-04-23 15:40:30 -05:00
Makefile drm/ast: Move Gen2+ and Gen1 POST code to separate source files 2025-07-09 14:36:18 +02:00
ast_2000.c drm/ast: Split ast_set_def_ext_reg() by chip generation 2025-07-09 14:36:21 +02:00
ast_2100.c drm/ast: ast_2100: Remove unneeded semicolon 2025-09-05 14:53:06 +02:00
ast_2300.c drm/ast: Split ast_set_def_ext_reg() by chip generation 2025-07-09 14:36:21 +02:00
ast_2500.c drm/ast: Split ast_set_def_ext_reg() by chip generation 2025-07-09 14:36:21 +02:00
ast_2600.c drm/ast: Gen7: Switch default registers to gen4+ state 2025-07-09 14:36:23 +02:00
ast_cursor.c drm/ast: Remove vaddr field from struct ast_plane 2025-04-07 15:08:48 +02:00
ast_ddc.c drm/ast: Define struct ast_ddc in ast_ddc.c 2024-04-11 09:38:17 +02:00
ast_ddc.h drm/ast: Define struct ast_ddc in ast_ddc.c 2024-04-11 09:38:17 +02:00
ast_dp.c drm/ast: Use msleep instead of mdelay for edid read 2025-09-19 08:46:33 +02:00
ast_dp501.c drm/ast: Use TX-chip register constants 2024-09-18 14:20:20 +02:00
ast_drv.c drm/ast: Move Gen6+ POST code to separate source file 2025-07-09 14:36:14 +02:00
ast_drv.h drm/ast: Clear preserved bits from register output value 2025-10-30 20:44:44 +01:00
ast_main.c drm/ast: Move DRAM info next to its only user 2025-09-04 12:29:41 +02:00
ast_mm.c drm/ast: Remove vram_fb_available from struct ast_device 2025-03-12 08:38:12 +01:00
ast_mode.c drm/ast: Blank with VGACR17 sync enable, always clear VGACRB6 sync off 2025-10-15 09:55:35 +02:00
ast_post.c drm/ast: Split ast_set_def_ext_reg() by chip generation 2025-07-09 14:36:21 +02:00
ast_post.h drm/ast: Gen7: Switch default registers to gen4+ state 2025-07-09 14:36:23 +02:00
ast_reg.h drm/ast: Blank with VGACR17 sync enable, always clear VGACRB6 sync off 2025-10-15 09:55:35 +02:00
ast_sil164.c Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2024-11-04 14:25:33 +10:00
ast_tables.h drm/ast: Add helpers for VBIOS mode lookup 2025-02-03 14:01:12 +01:00
ast_vbios.c drm/ast: Add helpers for VBIOS mode lookup 2025-02-03 14:01:12 +01:00
ast_vbios.h drm/ast: Add helpers for VBIOS mode lookup 2025-02-03 14:01:12 +01:00
ast_vga.c Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2024-11-04 14:25:33 +10:00