drm/ast: Fix long time waiting on s3/s4 resume
Subsystems (3)
PATCH v2 1/1 drm/ast: Fix long time waiting on s3/s4 resume
In resume, DP's launch function, ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled.
To avoid this problem, we only check if DP enable or not at driver probe.
---
v2 changes:
- Fix build error.
--- drivers/gpu/drm/ast/ast_dp.c | 55 +++++++++++----------------------- drivers/gpu/drm/ast/ast_drv.h | 2 +- drivers/gpu/drm/ast/ast_main.c | 11 +++++-- drivers/gpu/drm/ast/ast_post.c | 3 +- 4 files changed, 29 insertions(+), 42 deletions(-)
drivers/gpu/drm/ast/ast_dp.c +17 -38
@@ -119,53 +119,32 @@ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata)/* * Launch Aspeed DP */ -void ast_dp_launch (struct drm_device *dev,u8 bPower) +void ast_dp_launch (struct drm_device *dev) { -u32 i =0 , j =0 , WaitCount =1 ; -u8 bDPTX =0 ; +u32 i =0 ;u8 bDPExecute =1 ; -struct ast_private *ast =to_ast_private (dev); -// S3 come back, need more time to wait BMC ready. -if (bPower) - WaitCount =300 ; - - -// Wait total count by different condition. -for (j =0 ; j < WaitCount; j++) { - bDPTX =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,TX_TYPE_MASK ); - -if (bDPTX) -break ; +// Wait one second then timeout. +while (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,COPROCESSOR_LAUNCH ) != +COPROCESSOR_LAUNCH ) { + i++; +// wait 100 ms msleep (100 ); - } -// 0xE : ASTDP with DPMCU FW handling -if (bDPTX ==ASTDP_DPMCU_TX ) { -// Wait one second then timeout. - i =0 ; - -while (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,COPROCESSOR_LAUNCH ) != -COPROCESSOR_LAUNCH ) { - i++; -// wait 100 ms -msleep (100 ); - -if (i >=10 ) { -// DP would not be ready. - bDPExecute =0 ; -break ; - } +if (i >=10 ) { +// DP would not be ready. + bDPExecute =0 ; +break ; } + } -if (bDPExecute) - ast->tx_chip_types |=BIT (AST_TX_ASTDP ); +if (!bDPExecute) +drm_err (dev,"Wait DPMCU executing timeout\n" ); -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xE5 , - (u8 ) ~ASTDP_HOST_EDID_READ_DONE_MASK , -ASTDP_HOST_EDID_READ_DONE ); - } +ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xE5 , + (u8 ) ~ASTDP_HOST_EDID_READ_DONE_MASK , +ASTDP_HOST_EDID_READ_DONE ); }
drivers/gpu/drm/ast/ast_drv.h +1 -1
@@ -498,7 +498,7 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev);/* aspeed DP */ int ast_astdp_read_edid (struct drm_device *dev,u8 *ediddata); -void ast_dp_launch (struct drm_device *dev,u8 bPower); +void ast_dp_launch (struct drm_device *dev);void ast_dp_power_on_off (struct drm_device *dev,bool no);void ast_dp_set_on_off (struct drm_device *dev,bool no);void ast_dp_set_mode (struct drm_crtc *crtc,struct ast_vbios_mode_info *vbios_mode);
drivers/gpu/drm/ast/ast_main.c +9 -2
@@ -254,8 +254,13 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)case 0x0c : ast->tx_chip_types =AST_TX_DP501_BIT ; } - }else if (ast->chip ==AST2600 ) -ast_dp_launch (&ast->base,0 ); + }else if (ast->chip ==AST2600 ) { +if (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,TX_TYPE_MASK ) == +ASTDP_DPMCU_TX ) { + ast->tx_chip_types =AST_TX_ASTDP_BIT ; +ast_dp_launch (&ast->base); + } + }/* Print stuff for diagnostic purposes */ if (ast->tx_chip_types &AST_TX_NONE_BIT )
@@ -264,6 +269,8 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)drm_info (dev,"Using Sil164 TMDS transmitter\n" );if (ast->tx_chip_types &AST_TX_DP501_BIT )drm_info (dev,"Using DP501 DisplayPort transmitter\n" ); +if (ast->tx_chip_types &AST_TX_ASTDP_BIT ) +drm_info (dev,"Using ASPEED DisplayPort transmitter\n" );return 0 ; }
drivers/gpu/drm/ast/ast_post.c +2 -1
@@ -380,7 +380,8 @@ void ast_post_gpu(struct drm_device *dev)ast_set_def_ext_reg (dev);if (ast->chip ==AST2600 ) { -ast_dp_launch (dev,1 ); +if (ast->tx_chip_types &AST_TX_ASTDP_BIT ) +ast_dp_launch (dev); }else if (ast->config_mode == ast_use_p2a) {if (ast->chip ==AST2500 )ast_post_chip_2500 (dev);
base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
Signature · 1 line
2.25.1
Hi Thomas,
Could you help review this patch?
This is an issue leading to kernel panic found by Intel. Wendy has confirmed issue resolved by this patch.
Quoted 150 lines · Jammy Huang
In resume, DP's launch function,
ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled.To avoid this problem, we only check if DP enable or not at driver probe.
Signed-off-by Jammy Huang <[email protected]>---
v2 changes:
- Fix build error.--- drivers/gpu/drm/ast/ast_dp.c | 55 +++++++++++----------------------- drivers/gpu/drm/ast/ast_drv.h | 2 +- drivers/gpu/drm/ast/ast_main.c | 11 +++++-- drivers/gpu/drm/ast/ast_post.c | 3 +- 4 files changed, 29 insertions(+), 42 deletions(-)drivers/gpu/drm/ast/ast_dp.c +17
-38@@ -119,53 +119,32 @@ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata)/* * Launch Aspeed DP */ -void ast_dp_launch (struct drm_device *dev,u8 bPower) +void ast_dp_launch (struct drm_device *dev) { -u32 i =0 , j =0 , WaitCount =1 ; -u8 bDPTX =0 ; +u32 i =0 ;u8 bDPExecute =1 ; -struct ast_private *ast =to_ast_private (dev); -// S3 come back, need more time to wait BMC ready. -if (bPower) - WaitCount =300 ; - - -// Wait total count by different condition. -for (j =0 ; j < WaitCount; j++) { - bDPTX =ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,TX_TYPE_MASK ); - -if (bDPTX) -break ; +// Wait one second then timeout. +while (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,COPROCESSOR_LAUNCH ) != +COPROCESSOR_LAUNCH ) { + i++; +// wait 100 ms msleep (100 ); - } -// 0xE : ASTDP with DPMCU FW handling -if (bDPTX ==ASTDP_DPMCU_TX ) { -// Wait one second then timeout. - i =0 ; - -while (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,COPROCESSOR_LAUNCH ) != -COPROCESSOR_LAUNCH ) { - i++; -// wait 100 ms -msleep (100 ); - -if (i >=10 ) { -// DP would not be ready. - bDPExecute =0 ; -break ; - } +if (i >=10 ) { +// DP would not be ready. + bDPExecute =0 ; +break ; } + } -if (bDPExecute) - ast->tx_chip_types |=BIT (AST_TX_ASTDP ); +if (!bDPExecute) +drm_err (dev,"Wait DPMCU executing timeout\n" ); -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xE5 , - (u8 ) ~ASTDP_HOST_EDID_READ_DONE_MASK , -ASTDP_HOST_EDID_READ_DONE ); - } +ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xE5 , + (u8 ) ~ASTDP_HOST_EDID_READ_DONE_MASK , +ASTDP_HOST_EDID_READ_DONE ); }drivers/gpu/drm/ast/ast_drv.h +1
-1@@ -498,7 +498,7 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev);/* aspeed DP */ int ast_astdp_read_edid (struct drm_device *dev,u8 *ediddata); -void ast_dp_launch (struct drm_device *dev,u8 bPower); +void ast_dp_launch (struct drm_device *dev);void ast_dp_power_on_off (struct drm_device *dev,bool no);void ast_dp_set_on_off (struct drm_device *dev,bool no);void ast_dp_set_mode (struct drm_crtc *crtc,struct ast_vbios_mode_info *vbios_mode);drivers/gpu/drm/ast/ast_main.c +9
-2@@ -254,8 +254,13 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)case 0x0c : ast->tx_chip_types =AST_TX_DP501_BIT ; } - }else if (ast->chip ==AST2600 ) -ast_dp_launch (&ast->base,0 ); + }else if (ast->chip ==AST2600 ) { +if (ast_get_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xD1 ,TX_TYPE_MASK ) == +ASTDP_DPMCU_TX ) { + ast->tx_chip_types =AST_TX_ASTDP_BIT ; +ast_dp_launch (&ast->base); + } + }/* Print stuff for diagnostic purposes */ if (ast->tx_chip_types &AST_TX_NONE_BIT )@@ -264,6 +269,8 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)drm_info (dev,"Using Sil164 TMDS transmitter\n" );if (ast->tx_chip_types &AST_TX_DP501_BIT )drm_info (dev,"Using DP501 DisplayPort transmitter\n" ); +if (ast->tx_chip_types &AST_TX_ASTDP_BIT ) +drm_info (dev,"Using ASPEED DisplayPort transmitter\n" );return 0 ; }drivers/gpu/drm/ast/ast_post.c +2
-1@@ -380,7 +380,8 @@ void ast_post_gpu(struct drm_device *dev)ast_set_def_ext_reg (dev);if (ast->chip ==AST2600 ) { -ast_dp_launch (dev,1 ); +if (ast->tx_chip_types &AST_TX_ASTDP_BIT ) +ast_dp_launch (dev); }else if (ast->config_mode == ast_use_p2a) {if (ast->chip ==AST2500 )ast_post_chip_2500 (dev);base-commit:
e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
Signature · 2 lines
Best Regards Jammy
Hi,
sorry that this took so long.
Am 24.05.23 um 04:34 schrieb Jammy Huang:
Quoted 12 lines
Hi Thomas,
Could you help review this patch?
This is an issue leading to kernel panic found by Intel. Wendy has confirmed issue resolved by this patch.
Quoted 5 lines · Jammy Huang
In resume, DP's launch function,
ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled.To avoid this problem, we only check if DP enable or not at driver probe.
You should say what the problem is. Has the DP always been disabled? Is the DP only disabled after resume? Or is it a firmware bug?
If you have the name/email of "wendy.wang", you should probably mention her in a Reported-by tag here.
Quoted 1 line
Quoted 1 line
This should be
Quoted 1 line
Quoted 1 line
Signed-off-by Jammy Huang <[email protected]>
With these changes considered, feel free to add
But I cannot test the patch or even verify the bugfix.
I do have comments below that you might want to consider as well.
Quoted 67 lines
Quoted 67 lines
---
v2 changes:
- Fix build error.
---
drivers/gpu/drm/ast/ast_dp.c | 55 +++++++++++----------------------- drivers/gpu/drm/ast/ast_drv.h | 2 +-drivers/gpu/drm/ast/ast_main.c| 11 +++++--drivers/gpu/drm/ast/ast_post.c| 3 +-4 files changed, 29 insertions(+), 42 deletions(-)drivers/gpu/drm/ast/ast_dp.c +4
-15@@ -119,53 +119,32 @@ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata) /** Launch Aspeed DP */ -void ast_dp_launch (struct drm_device *dev,u8 bPower) +void ast_dp_launch (struct drm_device *dev) { - u32 i = 0, j = 0, WaitCount = 1; - u8 bDPTX = 0; + u32 i = 0; u8 bDPExecute = 1; - struct ast_private *ast = to_ast_private(dev); - // S3 come back, need more time to wait BMC ready. - if (bPower) - WaitCount = 300; - - - // Wait total count by different condition. - for (j = 0; j < WaitCount; j++) { - bDPTX = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, TX_TYPE_MASK); - - if (bDPTX) - break; + // Wait one second then timeout. + while (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1,
COPROCESSOR_LAUNCH) !=
+COPROCESSOR_LAUNCH) {
+ i++;
+ // wait 100 ms
msleep(100);
- }
- //0xE: ASTDP with DPMCU FW handling
- if (bDPTX ==ASTDP_DPMCU_TX) {
- // Wait one second then timeout.
- i = 0;
-
- while (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, COPROCESSOR_LAUNCH)!=
-COPROCESSOR_LAUNCH) {
- i++;
- // wait 100 ms
- msleep(100);
-
- if (i >= 10) {
- // DP would not be ready.
- bDPExecute = 0;
- break;
- }
+ if (i >= 10) {
+ // DP would not be ready.
Quoted 8 lines
Quoted 8 lines
+ bDPExecute = 0;
+ break;
}
+ }
- if (bDPExecute)
-ast->tx_chip_types|=BIT(AST_TX_ASTDP); + if (!bDPExecute)
+drm_err(dev, "Wait DPMCU executing timeout\n");
If waiting fails, should the function return an error? The caller could then disable the DP functionality.
Quoted 30 lines
Quoted 30 lines
- ast_set_index_reg_mask(ast,
AST_IO_CRTC_PORT,0xE5, - (u8) ~ASTDP_HOST_EDID_READ_DONE_MASK, -ASTDP_HOST_EDID_READ_DONE); - }
+ ast_set_index_reg_mask(ast,AST_IO_CRTC_PORT,0xE5, + (u8) ~ASTDP_HOST_EDID_READ_DONE_MASK, +ASTDP_HOST_EDID_READ_DONE);
}drivers/gpu/drm/ast/ast_drv.h +1
-1@@ -498,7 +498,7 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev); /* aspeed DP */ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata); -void ast_dp_launch (struct drm_device *dev,u8 bPower); +void ast_dp_launch (struct drm_device *dev); void ast_dp_power_on_off(struct drm_device *dev, bool no); void ast_dp_set_on_off(struct drm_device *dev, bool no); void ast_dp_set_mode(struct drm_crtc *crtc, struct ast_vbios_mode_info *vbios_mode);drivers/gpu/drm/ast/ast_main.c +0
-0@@ -254,8 +254,13 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)case
0x0c:
ast->tx_chip_types=AST_TX_DP501_BIT; }
Quoted 8 lines
Quoted 8 lines
- } else if (
ast->chip== AST2600)
-ast_dp_launch(&ast->base, 0);
+ } else if (ast->chip== AST2600) {
+ if (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, TX_TYPE_MASK)==
+ASTDP_DPMCU_TX) {
+ast->tx_chip_types=AST_TX_ASTDP_BIT;
+ast_dp_launch(&ast->base);
Here, if ast_dp_launch() would return an error, we would not set the chip type. The driver would then disable further support. That appears to be preferable to me. (?)
Best regards
Thomas
Quoted 29 lines
Quoted 28 lines
+ }
+ }
/* Print stuff for diagnostic purposes */
if (ast->tx_chip_types&AST_TX_NONE_BIT)drivers/gpu/drm/ast/ast_main.c +2
-0@@ -264,6 +269,8 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post) drm_info(dev, "Using Sil164 TMDS transmitter\n"); if (ast->tx_chip_types & AST_TX_DP501_BIT) drm_info(dev, "Using DP501 DisplayPort transmitter\n"); + if (ast->tx_chip_types & AST_TX_ASTDP_BIT) + drm_info(dev, "Using ASPEED DisplayPort transmitter\n"); return 0; }drivers/gpu/drm/ast/ast_post.c +2
-1@@ -380,7 +380,8 @@ void ast_post_gpu(struct drm_device *dev) ast_set_def_ext_reg(dev); if (ast->chip == AST2600) { - ast_dp_launch(dev, 1); + if (ast->tx_chip_types & AST_TX_ASTDP_BIT) + ast_dp_launch(dev); } else if (ast->config_mode == ast_use_p2a) { if (ast->chip == AST2500) ast_post_chip_2500(dev);base-commit:
e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi Thomas,
Thanks for your review.
Quoted 11 lines · Thomas Zimmermann
Hi,
sorry that this took so long.
Am 24.05.23 um 04:34 schrieb Jammy Huang:
Quoted 6 lines
Hi Thomas,
Could you help review this patch?
This is an issue leading to kernel panic found by Intel. Wendy has confirmed issue resolved by this patch.
Quoted 8 lines
Quoted 6 lines · Jammy Huang
Quoted 5 lines
In resume, DP's launch function,
ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled.To avoid this problem, we only check if DP enable or not at driver probe.
You should say what the problem is. Has the DP always been disabled? Is the DP only disabled after resume? Or is it a firmware bug?
The problem is that It could lead to 'DPM device timeout' and trigger unrecoverable kernel panic. I will describe the problem more clearly.
Quoted 10 lines
If you have the name/email of "wendy.wang", you should probably mention her in a Reported-by tag here.
Quoted 1 line
Quoted 1 line
This should be
Quoted 1 line
Quoted 1 line
Signed-off-by Jammy Huang <[email protected]>
OK, thanks for corrections.
Quoted 79 lines
With these changes considered, feel free to add
But I cannot test the patch or even verify the bugfix.
I do have comments below that you might want to consider as well.
Quoted 70 lines
Quoted 70 lines
---
v2 changes:
- Fix build error.
---
drivers/gpu/drm/ast/ast_dp.c | 55
+++++++++++-----------------------
drivers/gpu/drm/ast/ast_drv.h | 2 +-
drivers/gpu/drm/ast/ast_main.c| 11 +++++--
drivers/gpu/drm/ast/ast_post.c| 3 +-4 files changed, 29 insertions(+), 42 deletions(-)drivers/gpu/drm/ast/ast_dp.c +4
-15@@ -119,53 +119,32 @@ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata) /** Launch Aspeed DP */ -void ast_dp_launch (struct drm_device *dev,u8 bPower) +void ast_dp_launch (struct drm_device *dev) { - u32 i = 0, j = 0, WaitCount = 1; - u8 bDPTX = 0; + u32 i = 0; u8 bDPExecute = 1; - struct ast_private *ast = to_ast_private(dev); - // S3 come back, need more time to wait BMC ready. - if (bPower) - WaitCount = 300; - - - // Wait total count by different condition. - for (j = 0; j < WaitCount; j++) { - bDPTX = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, TX_TYPE_MASK); - - if (bDPTX) - break; + // Wait one second then timeout. + while (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1,
COPROCESSOR_LAUNCH) !=
+COPROCESSOR_LAUNCH) {
+ i++;
+ // wait 100 ms
msleep(100);
- }
- //0xE: ASTDP with DPMCU FW handling
- if (bDPTX ==ASTDP_DPMCU_TX) {
- // Wait one second then timeout.
- i = 0;
-
- while (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, COPROCESSOR_LAUNCH)!=
-COPROCESSOR_LAUNCH) {
- i++;
- // wait 100 ms
- msleep(100);
-
- if (i >= 10) {
- // DP would not be ready.
- bDPExecute = 0;
- break;
- }
+ if (i >= 10) {
+ // DP would not be ready.
+ bDPExecute = 0;
+ break;
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
}
+ }
- if (bDPExecute)
-ast->tx_chip_types|=BIT(AST_TX_ASTDP); + if (!bDPExecute)
+drm_err(dev, "Wait DPMCU executing timeout\n");If waiting fails, should the function return an error? The caller could then disable the DP functionality.
The check for COPROCESSOR_LAUNCH is actually MCU running status on BMC. For some cases, the execution of MCU on BMC could be halted, which leads to failure on check for this status. But DP is workable after BMC release the execution of MCU. Thus, we do not want to disable DP functionality here.
Quoted 74 lines
Quoted 30 lines
Quoted 30 lines
- ast_set_index_reg_mask(ast,
AST_IO_CRTC_PORT,0xE5, - (u8) ~ASTDP_HOST_EDID_READ_DONE_MASK, -ASTDP_HOST_EDID_READ_DONE); - }
+ ast_set_index_reg_mask(ast,AST_IO_CRTC_PORT,0xE5, + (u8) ~ASTDP_HOST_EDID_READ_DONE_MASK, +ASTDP_HOST_EDID_READ_DONE);
}drivers/gpu/drm/ast/ast_drv.h +1
-1@@ -498,7 +498,7 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev); /* aspeed DP */ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata); -void ast_dp_launch (struct drm_device *dev,u8 bPower); +void ast_dp_launch (struct drm_device *dev); void ast_dp_power_on_off(struct drm_device *dev, bool no); void ast_dp_set_on_off(struct drm_device *dev, bool no); void ast_dp_set_mode(struct drm_crtc *crtc, struct ast_vbios_mode_info *vbios_mode);drivers/gpu/drm/ast/ast_main.c +0
-0@@ -254,8 +254,13 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)case
0x0c:
ast->tx_chip_types=AST_TX_DP501_BIT; }Quoted 8 lines
Quoted 8 lines
- } else if (
ast->chip== AST2600)
-ast_dp_launch(&ast->base, 0);
+ } else if (ast->chip== AST2600) {
+ if (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, TX_TYPE_MASK)==
+ASTDP_DPMCU_TX) {
+ast->tx_chip_types=AST_TX_ASTDP_BIT;
+ast_dp_launch(&ast->base);Here, if
ast_dp_launch()would return an error, we would not set the chip type. The driver would then disable further support. That appears to be preferable to me. (?)Best regards
ThomasQuoted 29 lines
Quoted 28 lines
+ }
+ }
/* Print stuff for diagnostic purposes */
if (ast->tx_chip_types&AST_TX_NONE_BIT)drivers/gpu/drm/ast/ast_main.c +2
-0@@ -264,6 +269,8 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post) drm_info(dev, "Using Sil164 TMDS transmitter\n"); if (ast->tx_chip_types & AST_TX_DP501_BIT) drm_info(dev, "Using DP501 DisplayPort transmitter\n"); + if (ast->tx_chip_types & AST_TX_ASTDP_BIT) + drm_info(dev, "Using ASPEED DisplayPort transmitter\n"); return 0; }drivers/gpu/drm/ast/ast_post.c +2
-1@@ -380,7 +380,8 @@ void ast_post_gpu(struct drm_device *dev) ast_set_def_ext_reg(dev); if (ast->chip == AST2600) { - ast_dp_launch(dev, 1); + if (ast->tx_chip_types & AST_TX_ASTDP_BIT) + ast_dp_launch(dev); } else if (ast->config_mode == ast_use_p2a) { if (ast->chip == AST2500) ast_post_chip_2500(dev);base-commit:
e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
Signature · 2 lines
Best Regards Jammy