summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast/ast_drv.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-09-22 11:36:06 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2025-09-29 14:28:11 +0300
commit095afdc53354cfba6223335d2fff8f3b8aa45c34 (patch)
tree5d16a8f25db5883a47c24a0ae020e328b47e0eb9 /drivers/gpu/drm/ast/ast_drv.c
parent4b233efd7475d71de479c5983a7f124e3f261d67 (diff)
downloadlinux-095afdc53354cfba6223335d2fff8f3b8aa45c34.tar.xz
drm/ast: Move Gen2 device initialization into separate helper
Split off device initialization for Gen2 hardware into the helpers ast_2100_device_create() and ast_2100_detect_wide_screen(). The new functions are duplicates of their counterparts in ast_main.c, but stripped from most non-Gen2 support. Simplifies maintenance as the driver's number of supported hardware generations grows. v2: - simplify widescreen-detection logic (Jocelyn) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://lore.kernel.org/r/20250922083708.45564-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_drv.c')
-rw-r--r--drivers/gpu/drm/ast/ast_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index 3fecdc0fc7f7..bcf0b318b495 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -386,6 +386,10 @@ static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
drm = ast_2000_device_create(pdev, &ast_driver, chip, config_mode,
regs, ioregs, need_post);
break;
+ case 2:
+ drm = ast_2100_device_create(pdev, &ast_driver, chip, config_mode,
+ regs, ioregs, need_post);
+ break;
default:
drm = ast_device_create(pdev, &ast_driver, chip, config_mode, regs, ioregs,
need_post);