diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-09-03 15:25:29 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2024-09-11 12:49:00 +0200 |
commit | 970b867d5bd483c4879a343fb894972ca5678d22 (patch) | |
tree | 92b5eab0ce8ded5c0d2c4f1d3f099fd6c3058523 /drivers/gpu/drm/ast/ast_mode.c | |
parent | 61b86391fb5d7b9cad35169b1660119754a01134 (diff) |
drm/ast: Remove TX-chip bitmask
The CRTC has only one output attached to it. Store the output's type
of TX chip in a single field and remove the related bitmask.
Turn the type-less output field in struct ast_device into a union, as
only one of its fields will be used at a time.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240903132601.91618-1-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index ed496fb32bf3..784e8ac0e668 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -1398,26 +1398,22 @@ int ast_mode_config_init(struct ast_device *ast) ast_crtc_init(dev); - if (ast->tx_chip_types & AST_TX_NONE_BIT) { + switch (ast->tx_chip) { + case AST_TX_NONE: ret = ast_vga_output_init(ast); - if (ret) - return ret; - } - if (ast->tx_chip_types & AST_TX_SIL164_BIT) { + break; + case AST_TX_SIL164: ret = ast_sil164_output_init(ast); - if (ret) - return ret; - } - if (ast->tx_chip_types & AST_TX_DP501_BIT) { + break; + case AST_TX_DP501: ret = ast_dp501_output_init(ast); - if (ret) - return ret; - } - if (ast->tx_chip_types & AST_TX_ASTDP_BIT) { + break; + case AST_TX_ASTDP: ret = ast_astdp_output_init(ast); - if (ret) - return ret; + break; } + if (ret) + return ret; drm_mode_config_reset(dev); |