[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <404cdfef-233a-445b-8fbd-166dfeb2485b@huawei.com>
Date: Sat, 31 Jan 2026 16:56:55 +0800
From: Yongbang Shi <shiyongbang@...wei.com>
To: Thomas Zimmermann <tzimmermann@...e.de>, <xinliang.liu@...aro.org>,
<tiantao6@...ilicon.com>, <maarten.lankhorst@...ux.intel.com>,
<mripard@...nel.org>, <airlied@...il.com>, <daniel@...ll.ch>,
<kong.kongxinwei@...ilicon.com>
CC: <liangjian010@...wei.com>, <chenjianmin@...wei.com>,
<lidongming5@...wei.com>, <libaihan@...wei.com>, <shenjian15@...wei.com>,
<shaojijie@...wei.com>, <jani.nikula@...ux.intel.com>,
<dmitry.baryshkov@....qualcomm.com>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>, <shiyongbang@...wei.com>,
<helin52@...artners.com>
Subject: Re: [PATCH v9 drm-dp 9/9] drm/hisilicon/hibmc: Add vga connector
detect functions
> Hi
>
> Am 31.03.25 um 09:42 schrieb Yongbang Shi:
>> From: Baihan Li <libaihan@...wei.com>
>>
>> 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 <libaihan@...wei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@...wei.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
>> ---
>> 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;
>> }
>
Powered by blists - more mailing lists