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
Hi Zimmermann,
Thanks for raising this issue. This problem arises due to the
hardware link in the forward-generational product don't support
for detecting VGA connections.
In prior versions, the `.detect_ctx` callback function was not
implemented, resulting in VGA connections being detected by default.
However, this patch requires detecting VGA connections via the
hardware link, causing the VGA connection to be marked as
"disconnected" continuously.
We have already developed a solution for this issue, and the
new patch is currently being prepared for release. Your report
has reminded us to focus on ensuring that this patch can fully
resolve the problem in the previous generation products.
We appreciate your feedback and will continue to monitor the
situation closely to ensure a smooth resolution.
Thanks,
Lin He.
};
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;
}