Skip to contentSkip to conversation

drm/ast: Create threshold values for AST2600

PATCH Applied KuoHsiang Chou 2 participants 2 messages Jan 17, 2022 – Jan 19, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ast: Create threshold values for AST2600

The threshold value is used for AST2600 only.

---
 drivers/gpu/drm/ast/ast_mode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/ast/ast_mode.c +4 -1
index 1c7a57a03..7f2e248a6 100644
@@ -471,7 +471,10 @@ static void ast_set_color_reg(struct ast_private *ast,
 static void ast_set_crtthd_reg(struct ast_private *ast)
 {
 	/* Set Threshold */
-	if (ast->chip == AST2300 || ast->chip == AST2400 ||
+	if (ast->chip == AST2600) {
+		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0xe0);
+		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0xa0);
+	} else if (ast->chip == AST2300 || ast->chip == AST2400 ||
 	    ast->chip == AST2500) {
 		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x78);
 		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x60);

--
2.27.0

maintainer Applied
#1 lore raw

Hi

Am 17.01.22 um 09:36 schrieb KuoHsiang Chou:

Quoted 24 lines

The threshold value is used for AST2600 only.

---
  drivers/gpu/drm/ast/ast_mode.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/ast/ast_mode.c +4 -2
index 1c7a57a03..7f2e248a6 100644
@@ -471,7 +471,10 @@ static void ast_set_color_reg(struct ast_private *ast,
  static void ast_set_crtthd_reg(struct ast_private *ast)
  {
  	/* Set Threshold */
-	if (ast->chip == AST2300 || ast->chip == AST2400 ||
+	if (ast->chip == AST2600) {
+		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0xe0);
+		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0xa0);
+	} else if (ast->chip == AST2300 || ast->chip == AST2400 ||
  	    ast->chip == AST2500) {
  		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x78);
  		ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x60);
--
Quoted 2 lines

2.27.0

Merged into drm-misc-next. Thanks for the patch.

Best regards
Thomas

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