Skip to content

Commit 6e4f0d3

Browse files
author
Thomas Zimmermann
committed
drm/ast: Rename register constants for TX-chip types
The type of the TX chip is provided in VGACRD1. Rename the constants accordingly. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 319e53f commit 6e4f0d3

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

drivers/gpu/drm/ast/ast_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ static void ast_detect_tx_chip(struct ast_device *ast, bool need_post)
120120
ast->tx_chip = AST_TX_DP501;
121121
}
122122
} else if (IS_AST_GEN7(ast)) {
123-
if (ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xD1, TX_TYPE_MASK) ==
124-
ASTDP_DPMCU_TX) {
123+
if (ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xd1, AST_IO_VGACRD1_TX_TYPE_MASK) ==
124+
AST_IO_VGACRD1_TX_ASTDP) {
125125
int ret = ast_dp_launch(ast);
126126

127127
if (!ret)

drivers/gpu/drm/ast/ast_reg.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,18 @@
3737
#define AST_IO_VGACRCB_HWC_16BPP BIT(0) /* set: ARGB4444, cleared: 2bpp palette */
3838
#define AST_IO_VGACRCB_HWC_ENABLED BIT(1)
3939

40-
#define AST_IO_VGACRD1_MCU_FW_EXECUTING BIT(5)
40+
#define AST_IO_VGACRD1_MCU_FW_EXECUTING BIT(5)
41+
/* Display Transmitter Type */
42+
#define AST_IO_VGACRD1_TX_TYPE_MASK GENMASK(3, 1)
43+
#define AST_IO_VGACRD1_NO_TX 0x00
44+
#define AST_IO_VGACRD1_TX_ITE66121_VBIOS 0x02
45+
#define AST_IO_VGACRD1_TX_SIL164_VBIOS 0x04
46+
#define AST_IO_VGACRD1_TX_CH7003_VBIOS 0x06
47+
#define AST_IO_VGACRD1_TX_DP501_VBIOS 0x08
48+
#define AST_IO_VGACRD1_TX_ANX9807_VBIOS 0x0a
49+
#define AST_IO_VGACRD1_TX_FW_EMBEDDED_FW 0x0c
50+
#define AST_IO_VGACRD1_TX_ASTDP 0x0e
51+
4152
#define AST_IO_VGACRD7_EDID_VALID_FLAG BIT(0)
4253
#define AST_IO_VGACRDC_LINK_SUCCESS BIT(0)
4354
#define AST_IO_VGACRDF_HPD BIT(0)
@@ -49,19 +60,6 @@
4960
#define AST_IO_VGAIR1_R (0x5A)
5061
#define AST_IO_VGAIR1_VREFRESH BIT(3)
5162

52-
/*
53-
* Display Transmitter Type
54-
*/
55-
56-
#define TX_TYPE_MASK GENMASK(3, 1)
57-
#define NO_TX (0 << 1)
58-
#define ITE66121_VBIOS_TX (1 << 1)
59-
#define SI164_VBIOS_TX (2 << 1)
60-
#define CH7003_VBIOS_TX (3 << 1)
61-
#define DP501_VBIOS_TX (4 << 1)
62-
#define ANX9807_VBIOS_TX (5 << 1)
63-
#define TX_FW_EMBEDDED_FW_TX (6 << 1)
64-
#define ASTDP_DPMCU_TX (7 << 1)
6563

6664
#define AST_VRAM_INIT_STATUS_MASK GENMASK(7, 6)
6765
//#define AST_VRAM_INIT_BY_BMC BIT(7)

0 commit comments

Comments
 (0)