From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com [113.46.200.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F09B2EC560 for ; Sat, 31 Jan 2026 08:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.222 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769849828; cv=none; b=jlH1GY9MIzTuK1UQ0ooZn/1tor6mecIKatELB8s8WMy/c4nxsLh/7u3MOQ9mb/V4pZ9Z7EmPiCM9ksYiWj/K2qU04TL1s8fH+Hq30KNCmgnP3+4Xjfq2mp1mDUNpEr+W3jqkic60VGUNBb8c2ZxAyfcmdUoZ3ST8j+3Hypwjinc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769849828; c=relaxed/simple; bh=f4dM3Wbro3JsvlNzEvrP9Wpukr768bXCv5EI0iI/YRQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=gunRbOozHCEXTBfN2LUQ+NXk2EVBmlm0/nF4XSroKVyCz7cnuHefGQRLys3C6FJHBmU1oH+DgmpjcGC/hGClxTrs8Si6UgOmUno2z8oz49uWSjkuQc6vHRKcqztI86cAxocF3cZ39Serd/DSjEdnO6BYoFP83xBYM9WHKs31kdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=MsYKqwhs; arc=none smtp.client-ip=113.46.200.222 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="MsYKqwhs" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=iu3kshl9/WY0tgauyrmyToMwOoDlheo00SRw9y/3eA8=; b=MsYKqwhsEK8aqPF14KqCc1LMZdsv+HVuSPaAjfLPSHpYLpPyRLih+t9OBQWprlShWgoblxTgC M4M1ZPqHPLRcdzmgBTf2vKa6JReAUE32uclGvHgf0RDfYchcfBCJT7jo4XIDkvnSYl/2y6PsqQf V+H8kRCf29vxuUaNV+5Vt6A= Received: from mail.maildlp.com (unknown [172.19.162.92]) by canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4f369M3pXSzLlSk; Sat, 31 Jan 2026 16:53:27 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id A379A40562; Sat, 31 Jan 2026 16:56:56 +0800 (CST) Received: from kwepemq100007.china.huawei.com (7.202.195.175) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 31 Jan 2026 16:56:56 +0800 Received: from [10.159.166.136] (10.159.166.136) by kwepemq100007.china.huawei.com (7.202.195.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 31 Jan 2026 16:56:55 +0800 Message-ID: <404cdfef-233a-445b-8fbd-166dfeb2485b@huawei.com> Date: Sat, 31 Jan 2026 16:56:55 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 drm-dp 9/9] drm/hisilicon/hibmc: Add vga connector detect functions To: Thomas Zimmermann , , , , , , , CC: , , , , , , , , , , , References: <20250331074212.3370287-1-shiyongbang@huawei.com> <20250331074212.3370287-10-shiyongbang@huawei.com> <0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de> From: Yongbang Shi In-Reply-To: <0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemq100007.china.huawei.com (7.202.195.175) > Hi > > Am 31.03.25 um 09:42 schrieb Yongbang Shi: >> From: Baihan Li >> >> 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 >> Signed-off-by: Yongbang Shi >> Reviewed-by: Dmitry Baryshkov >> --- >>   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; >>   } >