Skip to contentSkip to conversation

drm/ast: Disconnect BMC if physical connector is connected

PATCH In review Thomas Zimmermann 2 participants 3 messages Nov 16, 2023 – Nov 21, 2023

Subsystems (4)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 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.

Fixes e329cb53b45d ("drm/ast: Add BMC virtual connector")
Cc <[email protected]> # v6.6+
---
 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
index 2aee32344f4a2..772f3b049c169 100644
@@ -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
reviewer Reviewed-by on v1 1/1
#1 lore raw
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
author maintainer
#2 lore raw

Hi

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.

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)