diff options
| author | Thomas Zimmermann <[email protected]> | 2023-06-21 12:53:45 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2023-06-27 12:26:37 +0000 |
| commit | 86d86d1ba24b3bc16706d4b72735e54c14ffc982 (patch) | |
| tree | adbf9c575d3dcd4e3a30a41c3f5b736edc3ef9c9 /drivers/gpu/drm/ast/ast_main.c | |
| parent | drm/ast: Detect AST 1300 model (diff) | |
| download | kernel-86d86d1ba24b3bc16706d4b72735e54c14ffc982.tar.gz kernel-86d86d1ba24b3bc16706d4b72735e54c14ffc982.zip | |
drm/ast: Detect AST 1400 model
Detect the 5th-generation AST 1400. Allows to simplify the code
for widescreen support.
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Tested-by: Jocelyn Falempe <[email protected]> # AST2600
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/ast/ast_main.c')
| -rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 7513924a5437..cbfe93c7929d 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -166,8 +166,15 @@ static int ast_detect_chip(struct drm_device *dev, bool need_post, u32 scu_rev) ast->chip = AST2500; drm_info(dev, "AST 2500 detected\n"); } else if (pdev->revision >= 0x30) { - ast->chip = AST2400; - drm_info(dev, "AST 2400 detected\n"); + switch (scu_rev & 0x300) { + case 0x0100: + ast->chip = AST1400; + drm_info(dev, "AST 1400 detected\n"); + break; + default: + ast->chip = AST2400; + drm_info(dev, "AST 2400 detected\n"); + } } else if (pdev->revision >= 0x20) { switch (scu_rev & 0x300) { case 0x0000: @@ -218,8 +225,7 @@ static int ast_detect_chip(struct drm_device *dev, bool need_post, u32 scu_rev) ast->support_wide_screen = false; if (ast->chip == AST1300) ast->support_wide_screen = true; - if (ast->chip == AST2400 && - (scu_rev & 0x300) == 0x100) /* ast1400 */ + if (ast->chip == AST1400) ast->support_wide_screen = true; if (ast->chip == AST2500 && scu_rev == 0x100) /* ast2510 */ |
