From 970b867d5bd483c4879a343fb894972ca5678d22 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 3 Sep 2024 15:25:29 +0200 Subject: 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 Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240903132601.91618-1-tzimmermann@suse.de --- drivers/gpu/drm/ast/ast_mode.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'drivers/gpu/drm/ast/ast_mode.c') 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); -- cgit v1.2.3