drm/ast: Add resolution support for 1152x864@75
Subsystems (3)
PATCH v2 1/1 drm/ast: Add resolution support for 1152x864@75
Add 1152x864 into support list.
Signed-off-by Jammy Huang <[email protected]>
---
v2 changes:
- add check in mode_valid
--- drivers/gpu/drm/ast/ast_mode.c | 9 +++++++++ drivers/gpu/drm/ast/ast_tables.h | 7 +++++++ 2 files changed, 16 insertions(+)
drivers/gpu/drm/ast/ast_mode.c +9 -0
@@ -114,6 +114,9 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,case 1024 : vbios_mode->enh_table = &res_1024x768[refresh_rate_index];break ; +case 1152 : + vbios_mode->enh_table = &res_1152x864[refresh_rate_index]; +break ;case 1280 :if (mode->crtc_vdisplay ==800 ) vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
@@ -1058,6 +1061,8 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_modereturn MODE_OK ;if ((mode->hdisplay ==1600 ) && (mode->vdisplay ==900 ))return MODE_OK ; +if ((mode->hdisplay ==1152 ) && (mode->vdisplay ==864 )) +return MODE_OK ; if ((ast->chip == AST2100) || (ast->chip == AST2200) || (ast->chip == AST2300) || (ast->chip == AST2400) ||
@@ -1090,6 +1095,10 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_modeif (mode->vdisplay ==768 ) status =MODE_OK ;break ; +case 1152 : +if (mode->vdisplay ==864 ) + status =MODE_OK ; +break ;case 1280 :if (mode->vdisplay ==1024 ) status =MODE_OK ;
drivers/gpu/drm/ast/ast_tables.h +7 -0
@@ -272,6 +272,13 @@ static const struct ast_vbios_enhtable res_1600x1200[] = { (SyncPP | Charx8Dot), 0xFF, 1, 0x33 }, }; +static const struct ast_vbios_enhtable res_1152x864[] = { + {1600 ,1152 ,64 ,128 ,900 ,864 ,1 ,3 ,VCLK108 ,/* 75Hz */ + (SyncPP | Charx8Dot | NewModeInfo),75 ,1 ,0x3B }, + {1600 ,1152 ,64 ,128 ,900 ,864 ,1 ,3 ,VCLK108 ,/* end */ + (SyncPP | Charx8Dot | NewModeInfo),0xFF ,1 ,0x3B }, +}; +/* 16:9 */ static const struct ast_vbios_enhtable res_1360x768[] = { {1792 ,1360 ,64 ,112 ,795 ,768 ,3 ,6 ,VCLK85_5 ,/* 60Hz */
Signature · 1 line
2.25.1
Hi
Am 16.09.22 um 10:50 schrieb Jammy Huang:
Quoted 3 lines
Add 1152x864 into support list.
Signed-off-by Jammy Huang <[email protected]>
Applied to drm-misc-next. Thanks!
Best regards
Thomas
Quoted 60 lines
---
v2 changes:
- add check inmode_valid--- drivers/gpu/drm/ast/ast_mode.c | 9 +++++++++ drivers/gpu/drm/ast/ast_tables.h | 7 +++++++ 2 files changed, 16 insertions(+)drivers/gpu/drm/ast/ast_mode.c +9
-0@@ -114,6 +114,9 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,case 1024 : vbios_mode->enh_table = &res_1024x768[refresh_rate_index];break ; +case 1152 : + vbios_mode->enh_table = &res_1152x864[refresh_rate_index]; +break ;case 1280 :if (mode->crtc_vdisplay ==800 ) vbios_mode->enh_table = &res_1280x800[refresh_rate_index];@@ -1058,6 +1061,8 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_modereturn MODE_OK ;if ((mode->hdisplay ==1600 ) && (mode->vdisplay ==900 ))return MODE_OK ; +if ((mode->hdisplay ==1152 ) && (mode->vdisplay ==864 )) +return MODE_OK ; if ((ast->chip == AST2100) || (ast->chip == AST2200) || (ast->chip == AST2300) || (ast->chip == AST2400) ||@@ -1090,6 +1095,10 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_modeif (mode->vdisplay ==768 ) status =MODE_OK ;break ; +case 1152 : +if (mode->vdisplay ==864 ) + status =MODE_OK ; +break ;case 1280 :if (mode->vdisplay ==1024 ) status =MODE_OK ;drivers/gpu/drm/ast/ast_tables.h +7
-0@@ -272,6 +272,13 @@ static const struct ast_vbios_enhtable res_1600x1200[] = { (SyncPP | Charx8Dot), 0xFF, 1, 0x33 }, }; +static const struct ast_vbios_enhtable res_1152x864[] = { + {1600 ,1152 ,64 ,128 ,900 ,864 ,1 ,3 ,VCLK108 ,/* 75Hz */ + (SyncPP | Charx8Dot | NewModeInfo),75 ,1 ,0x3B }, + {1600 ,1152 ,64 ,128 ,900 ,864 ,1 ,3 ,VCLK108 ,/* end */ + (SyncPP | Charx8Dot | NewModeInfo),0xFF ,1 ,0x3B }, +}; +/* 16:9 */ static const struct ast_vbios_enhtable res_1360x768[] = { {1792 ,1360 ,64 ,112 ,795 ,768 ,3 ,6 ,VCLK85_5 ,/* 60Hz */
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev