Hi
Am 31.03.25 um 09:42 schrieb Yongbang Shi:
From: Baihan Li <[email protected]>
Because the connected VGA connector would make driver can't get the
userspace call, adding detect_ctx in vga connector to make HPD active
userspace.
Signed-off-by: Baihan Li <[email protected]>
Signed-off-by: Yongbang Shi <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 05e19ea4c9f9..e8a527ede854 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -60,6 +60,7 @@ static void hibmc_connector_destroy(struct drm_connector
*connector)
static const struct drm_connector_helper_funcs
hibmc_connector_helper_funcs = {
.get_modes = hibmc_connector_get_modes,
+ .detect_ctx = drm_connector_helper_detect_from_ddc,
This change exposed a bug in the hibmc DDC support.
Calling drm_connector_helper_detect_from_ddc() does not work correctly.
The i2c transfer never receives the monitor's EDID because of an
internal error. It fails with -ENXIO. The error originates at [1]. Th
values of ret and nak_ok are both 0 when that happens.
As a result, the VGA connector is always marked as disconnected.
To fix this, maybe something else has to be enabled first. There seems
quite a bit of power management in hibmc_crtc_atomic_enable(). Maybe
some of that has to be done before the i2c transfer as well?
Best regards
Thomas
[1]
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/i2c/algos/i2c-algo-bit.c#L514
};
static const struct drm_connector_funcs hibmc_connector_funcs = {
@@ -127,5 +128,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
drm_connector_attach_encoder(connector, encoder);
+ connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
+
return 0;
}
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)