From dba8ecc8a8678bccd01304481c9315047fda8237 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Mon, 22 Sep 2025 10:36:11 +0200 Subject: drm/ast: Move Gen7 device initialization into separate helper Split off device initialization for Gen7 hardware into the helpers ast_2600_device_create() and ast_2600_detect_wide_screen(). The new functions are duplicates of their counterparts in ast_main.c, but stripped from most non-Gen7 support. Simplifies maintenance as the driver's number of supported hardware generations grows. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://lore.kernel.org/r/20250922083708.45564-12-tzimmermann@suse.de --- drivers/gpu/drm/ast/ast_drv.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/drm/ast/ast_drv.h') diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index fef9b9e6cb42..a64eadc3b50f 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -490,6 +490,13 @@ struct drm_device *ast_2500_device_create(struct pci_dev *pdev, /* ast_2600.c */ int ast_2600_post(struct ast_device *ast); +struct drm_device *ast_2600_device_create(struct pci_dev *pdev, + const struct drm_driver *drv, + enum ast_chip chip, + enum ast_config_mode config_mode, + void __iomem *regs, + void __iomem *ioregs, + bool need_post); /* ast post */ int ast_post_gpu(struct ast_device *ast); -- cgit v1.2.3