Messages in this thread Patch in this message | | | From | KuoHsiang Chou <> | Subject | [PATCH] drm/ast: Fix NO EDID on DP501 | Date | Thu, 18 Aug 2022 13:49:02 +0800 |
| |
1. Corrected the definition of AST_DP501_PNP_CONNECTED. 2. Created the Base address for DP501 MCU.
Signed-off-by: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com> --- drivers/gpu/drm/ast/ast_dp501.c | 10 ++++++++-- drivers/gpu/drm/ast/ast_drv.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_dp501.c b/drivers/gpu/drm/ast/ast_dp501.c index 4f75a9efb..4693d68ca 100644 --- a/drivers/gpu/drm/ast/ast_dp501.c +++ b/drivers/gpu/drm/ast/ast_dp501.c @@ -180,7 +180,10 @@ void ast_set_dp501_video_output(struct drm_device *dev, u8 mode)
static u32 get_fw_base(struct ast_private *ast) { - return ast_mindwm(ast, 0x1e6e2104) & 0x7fffffff; + if (ast->chip == AST2500) + return ast_mindwm(ast, 0x1e6e2104) & 0xfffffffe; + else + return ast_mindwm(ast, 0x1e6e2104) & 0x7fffffff; }
bool ast_backup_fw(struct drm_device *dev, u8 *addr, u32 size) @@ -257,7 +260,10 @@ static bool ast_launch_m68k(struct drm_device *dev) ast_moutdwm(ast, 0x1e6e2000, 0x1688a8a8);
/* Launch FW */ - ast_moutdwm(ast, 0x1e6e2104, 0x80000000 + boot_address); + if (ast->chip == AST2500) + ast_moutdwm(ast, 0x1e6e2104, boot_address | 0x00000001); + else + ast_moutdwm(ast, 0x1e6e2104, boot_address | 0x80000000); ast_moutdwm(ast, 0x1e6e2100, 1);
/* Update Scratch */ diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 2e44b971c..81e1317d3 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -358,7 +358,7 @@ int ast_mode_config_init(struct ast_private *ast);
#define AST_DP501_FW_VERSION_MASK GENMASK(7, 4) #define AST_DP501_FW_VERSION_1 BIT(4) -#define AST_DP501_PNP_CONNECTED BIT(1) +#define AST_DP501_PNP_CONNECTED BIT(0)
#define AST_DP501_DEFAULT_DCLK 65
base-commit: 8953e41fa70d4507c6f5508e030347f7eda3ba8a -- 2.27.0
| |