mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yongbang Shi <shiyongbang@huawei.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	<xinliang.liu@linaro.org>, <tiantao6@hisilicon.com>,
	<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
	<airlied@gmail.com>, <daniel@ffwll.ch>,
	<kong.kongxinwei@hisilicon.com>
Cc: <liangjian010@huawei.com>, <chenjianmin@huawei.com>,
	<lidongming5@huawei.com>, <libaihan@huawei.com>,
	<shenjian15@huawei.com>, <shaojijie@huawei.com>,
	<jani.nikula@linux.intel.com>,
	<dmitry.baryshkov@oss.qualcomm.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<shiyongbang@huawei.com>, <helin52@h-partners.com>
Subject: Re: [PATCH v9 drm-dp 9/9] drm/hisilicon/hibmc: Add vga connector detect functions
Date: Sat, 31 Jan 2026 16:56:55 +0800	[thread overview]
Message-ID: <404cdfef-233a-445b-8fbd-166dfeb2485b@huawei.com> (raw)
In-Reply-To: <0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de>


> Hi
>
> Am 31.03.25 um 09:42 schrieb Yongbang Shi:
>> From: Baihan Li <libaihan@huawei.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@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.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;
>>   }
>

  reply	other threads:[~2026-01-31  8:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  7:42 [PATCH v9 drm-dp 0/9] Add HPD, getting EDID, colorbar features in DP function Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 1/9] drm/hisilicon/hibmc: Restructuring the header dp_reg.h Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 2/9] drm/hisilicon/hibmc: Add dp serdes cfg to adjust serdes rate, voltage and pre-emphasis Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 3/9] drm/hisilicon/hibmc: Add dp serdes cfg in dp process Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 4/9] drm/hisilicon/hibmc: Refactor the member of drm_aux in struct hibmc_dp Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 5/9] drm/hisilicon/hibmc: Getting connector info and EDID by using AUX channel Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 6/9] drm/hisilicon/hibmc: Add colorbar-cfg feature and its debugfs file Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 7/9] drm/hisilicon/hibmc: Enable this hot plug detect of irq feature Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 8/9] drm/hisilicon/hibmc: Add MSI irq getting and requesting for HPD Yongbang Shi
2025-03-31  7:42 ` [PATCH v9 drm-dp 9/9] drm/hisilicon/hibmc: Add vga connector detect functions Yongbang Shi
2026-01-28 16:20   ` Thomas Zimmermann
2026-01-31  8:56     ` Yongbang Shi [this message]
2025-04-11  1:58 ` [PATCH v9 drm-dp 0/9] Add HPD, getting EDID, colorbar features in DP function Yongbang Shi
2025-04-11 21:14 ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=404cdfef-233a-445b-8fbd-166dfeb2485b@huawei.com \
    --to=shiyongbang@huawei.com \
    --cc=airlied@gmail.com \
    --cc=chenjianmin@huawei.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helin52@h-partners.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=liangjian010@huawei.com \
    --cc=libaihan@huawei.com \
    --cc=lidongming5@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=tiantao6@hisilicon.com \
    --cc=tzimmermann@suse.de \
    --cc=xinliang.liu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®