drm/ast: Disconnect BMC if physical connector is connected
Thomas Zimmermann
maintainerPATCH 1/1 drm/ast: Disconnect BMC if physical connector is connected
Many user-space compositors fail with mode setting if a CRTC has more than one connected connector. This is the case with the BMC on Aspeed systems. Work around this problem by setting the BMC's connector status to disconnected when the physical connector has a display attached. This way compositors will only see one connected connector at a time; either the physical one or the BMC.
--- drivers/gpu/drm/ast/ast_drv.h | 13 ++++++- drivers/gpu/drm/ast/ast_mode.c | 62 ++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 8 deletions(-)
drivers/gpu/drm/ast/ast_drv.h +12 -1
@@ -174,6 +174,17 @@ to_ast_sil164_connector(struct drm_connector *connector) return container_of(connector, struct ast_sil164_connector, base); } +struct ast_bmc_connector { +struct drm_connector base; +struct drm_connector *physical_connector; +}; + +static inline struct ast_bmc_connector * +to_ast_bmc_connector (struct drm_connector *connector) +{ + return container_of(connector, struct ast_bmc_connector, base); +} +/* * Device */
@@ -218,7 +229,7 @@ struct ast_device { } astdp;struct {struct drm_encoder encoder; -struct drm_connector connector; +struct ast_bmc_connector bmc_connector; } bmc; } output;
drivers/gpu/drm/ast/ast_mode.c +55 -7
121 lines not on this page · raw message
Signature · 1 line
2.42.0
Quoted 6 lines · Thomas Zimmermann
Many user-space compositors fail with mode setting if a CRTC has more than one connected connector. This is the case with the BMC on Aspeed systems. Work around this problem by setting the BMC's connector status to disconnected when the physical connector has a display attached. This way compositors will only see one connected connector at a time; either the physical one or the BMC.
Thanks for the patch.
I can't test it because I don't have physical access to a machine with aspeed GPU, but it looks good to me.
Signature · 1 line
Jocelyn
Thomas Zimmermann
maintainerHi
Am 16.11.23 um 14:43 schrieb Jocelyn Falempe:
Quoted 9 lines · Thomas Zimmermann
Quoted 6 lines
Many user-space compositors fail with mode setting if a CRTC has more than one connected connector. This is the case with the BMC on Aspeed systems. Work around this problem by setting the BMC's connector status to disconnected when the physical connector has a display attached. This way compositors will only see one connected connector at a time; either the physical one or the BMC.
Quoted 5 lines
Thanks for the patch.
I can't test it because I don't have physical access to a machine with aspeed GPU, but it looks good to me.Reviewed-by Jocelyn Falempe <[email protected]>
Thanks. The patch is now in drm-misc-fixes.
Best regards
Thomas
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)