aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_mode.c
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2025-01-31 09:21:05 +0000
committerThomas Zimmermann <[email protected]>2025-02-03 13:01:06 +0000
commit7a74caabe1013b482b1db10751c79bc75bdaae8c (patch)
tree4fa2f43b05e92fe05fa4bb280755c572f9e74367 /drivers/gpu/drm/ast/ast_mode.c
parentdrm/ast: Reorganize widescreen test around hardware Gens (diff)
downloadkernel-7a74caabe1013b482b1db10751c79bc75bdaae8c.tar.gz
kernel-7a74caabe1013b482b1db10751c79bc75bdaae8c.zip
drm/ast: Add support_fullhd flag to struct ast_device
Detect support for 1920x1080 (FullHD) in ast_detect_widescreen(). The flag is cleared by default. The test logic has been taken from existing code in ast_crtc_helper_mode_valid(). The code in that function is being replaced by the new flag. For Gen3, a new branch duplicates the Gen2 logic and adds a test for AST2200. Gen2 adds a test for AST2100. v2: - use fullhd flag for setting max width/height Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index d1b3136b3769..dda2c4fb0a48 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1036,10 +1036,7 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode
if ((mode->hdisplay == 1600) && (mode->vdisplay == 900))
return MODE_OK;
- if ((ast->chip == AST2100) || // GEN2, but not AST1100 (?)
- (ast->chip == AST2200) || // GEN3, but not AST2150 (?)
- IS_AST_GEN4(ast) || IS_AST_GEN5(ast) ||
- IS_AST_GEN6(ast) || IS_AST_GEN7(ast)) {
+ if (ast->support_fullhd) {
if ((mode->hdisplay == 1920) && (mode->vdisplay == 1080))
return MODE_OK;
@@ -1371,12 +1368,7 @@ int ast_mode_config_init(struct ast_device *ast)
dev->mode_config.min_height = 0;
dev->mode_config.preferred_depth = 24;
- if (ast->chip == AST2100 || // GEN2, but not AST1100 (?)
- ast->chip == AST2200 || // GEN3, but not AST2150 (?)
- IS_AST_GEN7(ast) ||
- IS_AST_GEN6(ast) ||
- IS_AST_GEN5(ast) ||
- IS_AST_GEN4(ast)) {
+ if (ast->support_fullhd) {
dev->mode_config.max_width = 1920;
dev->mode_config.max_height = 2048;
} else {