linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs
@ 2025-08-13  9:42 Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed Yongbang Shi
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

There are some bugfix for hibmc-drm driver.
---
ChangeLog:
v3 -> v4:
  - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
  - remove if (dev->registered), suggested by Dmitry Baryshkov.
  - remove non-related changes, suggested by Dmitry Baryshkov.
  - Remove the clock check, suggested by Dmitry Baryshkov.
  - ( I'll add them in next series after redesigning this part)
  - add KVM edid in commit message, suggested by Dmitry Baryshkov.
  - fix magic values, suggested by Dmitry Baryshkov.
  - fix the commit subjects, suggested by Dmitry Baryshkov.
v2 -> v3:
  - fix hibmc_connector_get_modes() and hibmc_vdac_detect() to realize BMC KVM, suggested by Dmitry Baryshkov.
  - fix the issue commit ID, suggested by Dmitry Baryshkov.
  - split into 2 commits, suggested by Dmitry Baryshkov.
  - add more comments in commit log, suggested by Dmitry Baryshkov.
---

Baihan Li (11):
  drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init
    failed
  drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD
    irq
  drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local
  drm/hisilicon/hibmc: fix the hibmc loaded failed bug
  drm/hisilicon/hibmc: fix rare monitors cannot display problem
  drm/hisilicon/hibmc: add dp mode valid check
  drm/hisilicon/hibmc: fix dp and vga cannot show together
  drm/hisilicon/hibmc: fix no showing when no connectors connected
  drm/hisilicon/hibmc: fix no showing problem with loading hibmc
    manually
  drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init.
  drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation.

 .../gpu/drm/hisilicon/hibmc/dp/dp_config.h    |  2 +
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c    | 18 ++++-
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  3 +
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c  | 14 +++-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 48 ++++++++++--
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   | 24 +++---
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   |  8 ++
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c   |  5 ++
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  | 73 +++++++++++++------
 9 files changed, 154 insertions(+), 41 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq Yongbang Shi
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

Currently the driver missed to clean the i2c adapter when vdac init failed.
It may cause resource leak.

Fixes: a0d078d06e516 ("drm/hisilicon: Features to support reading resolutions from EDID")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h  |  1 +
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c  |  5 +++++
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 11 ++++++++---
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index 274feabe7df0..ca8502e2760c 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -69,6 +69,7 @@ int hibmc_de_init(struct hibmc_drm_private *priv);
 int hibmc_vdac_init(struct hibmc_drm_private *priv);
 
 int hibmc_ddc_create(struct drm_device *drm_dev, struct hibmc_vdac *connector);
+void hibmc_ddc_del(struct hibmc_vdac *vdac);
 
 int hibmc_dp_init(struct hibmc_drm_private *priv);
 
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c
index 99b3b77b5445..44860011855e 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c
@@ -95,3 +95,8 @@ int hibmc_ddc_create(struct drm_device *drm_dev, struct hibmc_vdac *vdac)
 
 	return i2c_bit_add_bus(&vdac->adapter);
 }
+
+void hibmc_ddc_del(struct hibmc_vdac *vdac)
+{
+	i2c_del_adapter(&vdac->adapter);
+}
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index e8a527ede854..841e81f47b68 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -53,7 +53,7 @@ static void hibmc_connector_destroy(struct drm_connector *connector)
 {
 	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
 
-	i2c_del_adapter(&vdac->adapter);
+	hibmc_ddc_del(vdac);
 	drm_connector_cleanup(connector);
 }
 
@@ -110,7 +110,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
 	ret = drmm_encoder_init(dev, encoder, NULL, DRM_MODE_ENCODER_DAC, NULL);
 	if (ret) {
 		drm_err(dev, "failed to init encoder: %d\n", ret);
-		return ret;
+		goto err;
 	}
 
 	drm_encoder_helper_add(encoder, &hibmc_encoder_helper_funcs);
@@ -121,7 +121,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
 					  &vdac->adapter);
 	if (ret) {
 		drm_err(dev, "failed to init connector: %d\n", ret);
-		return ret;
+		goto err;
 	}
 
 	drm_connector_helper_add(connector, &hibmc_connector_helper_funcs);
@@ -131,4 +131,9 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
 	connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
 
 	return 0;
+
+err:
+	hibmc_ddc_del(vdac);
+
+	return ret;
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-14  9:05   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 03/11] drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local Yongbang Shi
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

The debouncing when HPD pulled out still remains sometimes, 200ms still can
not ensure helper_detect() is correct. So add a flag to hold the sink
status, and changed detect_ctx() functions by using flag to check status.

Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
  - remove if (dev->registered), suggested by Dmitry Baryshkov.
---
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  1 +
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 ++++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
index 665f5b166dfb..68867475508c 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
@@ -50,6 +50,7 @@ struct hibmc_dp {
 	struct drm_dp_aux aux;
 	struct hibmc_dp_cbar_cfg cfg;
 	u32 irq_status;
+	int hpd_status;
 };
 
 int hibmc_dp_hw_init(struct hibmc_dp *dp);
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
index d06832e62e96..ded38530ecda 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
@@ -34,9 +34,12 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
 static int hibmc_dp_detect(struct drm_connector *connector,
 			   struct drm_modeset_acquire_ctx *ctx, bool force)
 {
-	mdelay(200);
+	struct hibmc_dp *dp = to_hibmc_dp(connector);
 
-	return drm_connector_helper_detect_from_ddc(connector, ctx, force);
+	if (dp->hpd_status)
+		return connector_status_connected;
+	else
+		return connector_status_disconnected;
 }
 
 static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
@@ -115,21 +118,23 @@ irqreturn_t hibmc_dp_hpd_isr(int irq, void *arg)
 {
 	struct drm_device *dev = (struct drm_device *)arg;
 	struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
+	struct hibmc_dp *dp = &priv->dp;
 	int idx;
 
 	if (!drm_dev_enter(dev, &idx))
 		return -ENODEV;
 
-	if (priv->dp.irq_status & DP_MASKED_SINK_HPD_PLUG_INT) {
+	if (((dp->irq_status & DP_MASKED_SINK_HPD_PLUG_INT) && !dp->hpd_status)) {
 		drm_dbg_dp(&priv->dev, "HPD IN isr occur!\n");
-		hibmc_dp_hpd_cfg(&priv->dp);
+		hibmc_dp_hpd_cfg(dp);
+		dp->hpd_status = 1;
 	} else {
 		drm_dbg_dp(&priv->dev, "HPD OUT isr occur!\n");
-		hibmc_dp_reset_link(&priv->dp);
+		hibmc_dp_reset_link(dp);
+		dp->hpd_status = 0;
 	}
 
-	if (dev->registered)
-		drm_connector_helper_hpd_irq_event(&priv->dp.connector);
+	drm_connector_helper_hpd_irq_event(&priv->dp.connector);
 
 	drm_dev_exit(idx);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 03/11] drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 04/11] drm/hisilicon/hibmc: fix the hibmc loaded failed bug Yongbang Shi
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

The local variable is passed in request_irq (), and there will be use
after free problem, which will make request_irq failed. Using the global
irq name instead of it to fix.

Fixes: b11bc1ae4658 ("drm/hisilicon/hibmc: Add MSI irq getting and requesting for HPD")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 768b97f9e74a..4cdcc34070ee 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -32,7 +32,7 @@
 
 DEFINE_DRM_GEM_FOPS(hibmc_fops);
 
-static const char *g_irqs_names_map[HIBMC_MAX_VECTORS] = { "vblank", "hpd" };
+static const char *g_irqs_names_map[HIBMC_MAX_VECTORS] = { "hibmc-vblank", "hibmc-hpd" };
 
 static irqreturn_t hibmc_interrupt(int irq, void *arg)
 {
@@ -277,7 +277,6 @@ static void hibmc_unload(struct drm_device *dev)
 static int hibmc_msi_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	char name[32] = {0};
 	int valid_irq_num;
 	int irq;
 	int ret;
@@ -292,9 +291,6 @@ static int hibmc_msi_init(struct drm_device *dev)
 	valid_irq_num = ret;
 
 	for (int i = 0; i < valid_irq_num; i++) {
-		snprintf(name, ARRAY_SIZE(name) - 1, "%s-%s-%s",
-			 dev->driver->name, pci_name(pdev), g_irqs_names_map[i]);
-
 		irq = pci_irq_vector(pdev, i);
 
 		if (i)
@@ -302,10 +298,10 @@ static int hibmc_msi_init(struct drm_device *dev)
 			ret = devm_request_threaded_irq(&pdev->dev, irq,
 							hibmc_dp_interrupt,
 							hibmc_dp_hpd_isr,
-							IRQF_SHARED, name, dev);
+							IRQF_SHARED, g_irqs_names_map[i], dev);
 		else
 			ret = devm_request_irq(&pdev->dev, irq, hibmc_interrupt,
-					       IRQF_SHARED, name, dev);
+					       IRQF_SHARED, g_irqs_names_map[i], dev);
 		if (ret) {
 			drm_err(dev, "install irq failed: %d\n", ret);
 			return ret;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 04/11] drm/hisilicon/hibmc: fix the hibmc loaded failed bug
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (2 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 03/11] drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem Yongbang Shi
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

When hibmc loaded failed, the driver use hibmc_unload to free the
resource, but the mutexes in mode.config are not init, which will
access an NULL pointer. Just change goto statement to return, because
hibnc_hw_init() doesn't need to free anything.

Fixes: b3df5e65cc03 ("drm/hibmc: Drop drm_vblank_cleanup")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 4cdcc34070ee..ac552c339671 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -319,13 +319,13 @@ static int hibmc_load(struct drm_device *dev)
 
 	ret = hibmc_hw_init(priv);
 	if (ret)
-		goto err;
+		return ret;
 
 	ret = drmm_vram_helper_init(dev, pci_resource_start(pdev, 0),
 				    pci_resource_len(pdev, 0));
 	if (ret) {
 		drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
-		goto err;
+		return ret;
 	}
 
 	ret = hibmc_kms_init(priv);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (3 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 04/11] drm/hisilicon/hibmc: fix the hibmc loaded failed bug Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-16 22:33   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check Yongbang Shi
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

In some case, the dp link training success at 8.1Gbps, but the sink's
maximum supported rate is less than 8.1G. So change the default 8.1Gbps
link rate to the rate that reads from devices' capabilities.

Fixes: 54063d86e036 ("drm/hisilicon/hibmc: add dp link moduel in hibmc drivers")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - remove non-related changes, suggested by Dmitry Baryshkov.
---
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
index 74f7832ea53e..0726cb5b736e 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
@@ -325,6 +325,17 @@ static int hibmc_dp_link_downgrade_training_eq(struct hibmc_dp_dev *dp)
 	return hibmc_dp_link_reduce_rate(dp);
 }
 
+static void hibmc_dp_update_caps(struct hibmc_dp_dev *dp)
+{
+	dp->link.cap.link_rate = dp->dpcd[DP_MAX_LINK_RATE];
+	if (dp->link.cap.link_rate > DP_LINK_BW_8_1 || !dp->link.cap.link_rate)
+		dp->link.cap.link_rate = DP_LINK_BW_8_1;
+
+	dp->link.cap.lanes = dp->dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
+	if (dp->link.cap.lanes > HIBMC_DP_LANE_NUM_MAX)
+		dp->link.cap.lanes = HIBMC_DP_LANE_NUM_MAX;
+}
+
 int hibmc_dp_link_training(struct hibmc_dp_dev *dp)
 {
 	struct hibmc_dp_link *link = &dp->link;
@@ -334,8 +345,7 @@ int hibmc_dp_link_training(struct hibmc_dp_dev *dp)
 	if (ret)
 		drm_err(dp->dev, "dp aux read dpcd failed, ret: %d\n", ret);
 
-	dp->link.cap.link_rate = dp->dpcd[DP_MAX_LINK_RATE];
-	dp->link.cap.lanes = 0x2;
+	hibmc_dp_update_caps(dp);
 
 	ret = hibmc_dp_get_serdes_rate_cfg(dp);
 	if (ret < 0)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (4 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-17 15:18   ` Dmitry Baryshkov
  2025-08-17 15:32   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together Yongbang Shi
                   ` (5 subsequent siblings)
  11 siblings, 2 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

If DP is connected, check the DP BW in mode_valid_ctx() to ensure
that DP's link rate supports high-resolution data transmission.

Fixes: f9698f802e50 ("drm/hisilicon/hibmc: Restructuring the header dp_reg.h")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - Remove the clock check, suggested by Dmitry Baryshkov.
  - ( I'll add them in next series after redesigning this part)
---
 .../gpu/drm/hisilicon/hibmc/dp/dp_config.h    |  2 ++
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c    | 10 ++++++++++
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  2 ++
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 +++++++++++++++++++
 4 files changed, 33 insertions(+)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h
index 08f9e1caf7fc..efb30a758475 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h
@@ -17,5 +17,7 @@
 #define HIBMC_DP_LINK_RATE_CAL		27
 #define HIBMC_DP_SYNC_DELAY(lanes)	((lanes) == 0x2 ? 86 : 46)
 #define HIBMC_DP_INT_ENABLE		0xc
+/* HIBMC_DP_LINK_RATE_CAL * 10000 * 80% = 216000 */
+#define DP_MODE_VALI_CAL		216000
 
 #endif
diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
index 8f0daec7d174..f8e1b437c385 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
@@ -263,6 +263,16 @@ void hibmc_dp_reset_link(struct hibmc_dp *dp)
 	dp->dp_dev->link.status.channel_equalized = false;
 }
 
+u8 hibmc_dp_get_link_rate(struct hibmc_dp *dp)
+{
+	return dp->dp_dev->link.cap.link_rate;
+}
+
+u8 hibmc_dp_get_lanes(struct hibmc_dp *dp)
+{
+	return dp->dp_dev->link.cap.lanes;
+}
+
 static const struct hibmc_dp_color_raw g_rgb_raw[] = {
 	{CBAR_COLOR_BAR, 0x000, 0x000, 0x000},
 	{CBAR_WHITE,     0xfff, 0xfff, 0xfff},
diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
index 68867475508c..462f2637f4da 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
@@ -61,5 +61,7 @@ void hibmc_dp_reset_link(struct hibmc_dp *dp);
 void hibmc_dp_hpd_cfg(struct hibmc_dp *dp);
 void hibmc_dp_enable_int(struct hibmc_dp *dp);
 void hibmc_dp_disable_int(struct hibmc_dp *dp);
+u8 hibmc_dp_get_link_rate(struct hibmc_dp *dp);
+u8 hibmc_dp_get_lanes(struct hibmc_dp *dp);
 
 #endif
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
index ded38530ecda..5cac04b7d4a4 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
@@ -12,6 +12,7 @@
 
 #include "hibmc_drm_drv.h"
 #include "dp/dp_hw.h"
+#include "dp/dp_config.h"
 
 #define DP_MASKED_SINK_HPD_PLUG_INT	BIT(2)
 
@@ -42,9 +43,27 @@ static int hibmc_dp_detect(struct drm_connector *connector,
 		return connector_status_disconnected;
 }
 
+static int hibmc_dp_mode_valid(struct drm_connector *connector,
+			       const struct drm_display_mode *mode,
+			       struct drm_modeset_acquire_ctx *ctx,
+			       enum drm_mode_status *status)
+{
+	struct hibmc_dp *dp = to_hibmc_dp(connector);
+	u64 cur_val, max_val;
+
+	/* check DP link BW */
+	cur_val = (u64)mode->clock * HIBMC_DP_BPP;
+	max_val = (u64)hibmc_dp_get_link_rate(dp) * DP_MODE_VALI_CAL * hibmc_dp_get_lanes(dp);
+
+	*status = cur_val > max_val ? MODE_CLOCK_HIGH : MODE_OK;
+
+	return 0;
+}
+
 static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
 	.get_modes = hibmc_dp_connector_get_modes,
 	.detect_ctx = hibmc_dp_detect,
+	.mode_valid_ctx = hibmc_dp_mode_valid,
 };
 
 static int hibmc_dp_late_register(struct drm_connector *connector)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (5 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-16 22:44   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

If VGA and DP connected together, there will be only one can get crtc.
Add encoder possible_clones to support two connectors enable.

Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index ac552c339671..289304500ab0 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -115,6 +115,8 @@ static const struct drm_mode_config_funcs hibmc_mode_funcs = {
 static int hibmc_kms_init(struct hibmc_drm_private *priv)
 {
 	struct drm_device *dev = &priv->dev;
+	struct drm_encoder *encoder;
+	u32 clone_mask = 0;
 	int ret;
 
 	ret = drmm_mode_config_init(dev);
@@ -154,6 +156,12 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
 		return ret;
 	}
 
+	drm_for_each_encoder(encoder, dev)
+		clone_mask |= drm_encoder_mask(encoder);
+
+	drm_for_each_encoder(encoder, dev)
+		encoder->possible_clones = clone_mask;
+
 	return 0;
 }
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (6 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-17 13:09   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 09/11] drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually Yongbang Shi
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

Our chip support KVM over IP feature, so hibmc driver need to support
displaying without any connectors plugged in. If no connectors connected,
set the vdac connector status to 'connected' to handle BMC KVM. Use
is_connected to check all physical outputs.
For get_modes: using BMC modes for connector if no display is attached to
phys VGA cable, otherwise use EDID modes by drm_connector_helper_get_modes,
because KVM doesn't provide EDID reads.

Fixes: 4c962bc929f1 ("drm/hisilicon/hibmc: Add vga connector detect functions")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - add KVM edid in commit message, suggested by Dmitry Baryshkov.
  - fix magic values, suggested by Dmitry Baryshkov.
v2 -> v3:
  - fix hibmc_connector_get_modes() and hibmc_vdac_detect() to realize BMC KVM, suggested by Dmitry Baryshkov.
---
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 20 ++++--
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   |  7 +++
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  | 62 +++++++++++++------
 4 files changed, 68 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
index 5cac04b7d4a4..9626c60a9115 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
@@ -35,12 +35,22 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
 static int hibmc_dp_detect(struct drm_connector *connector,
 			   struct drm_modeset_acquire_ctx *ctx, bool force)
 {
-	struct hibmc_dp *dp = to_hibmc_dp(connector);
+	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
+	int ret;
+
+	mutex_lock(&priv->connect_lock);
+
+	if (priv->dp.hpd_status) {
+		priv->connect_status_map |= HIBMC_DP_STATUS;
+		ret = connector_status_connected;
+	} else {
+		priv->connect_status_map &= ~HIBMC_DP_STATUS;
+		ret = connector_status_disconnected;
+	}
 
-	if (dp->hpd_status)
-		return connector_status_connected;
-	else
-		return connector_status_disconnected;
+	mutex_unlock(&priv->connect_lock);
+
+	return ret;
 }
 
 static int hibmc_dp_mode_valid(struct drm_connector *connector,
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 289304500ab0..bdf14ad52cd3 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -162,6 +162,8 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
 	drm_for_each_encoder(encoder, dev)
 		encoder->possible_clones = clone_mask;
 
+	mutex_init(&priv->connect_lock);
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index ca8502e2760c..4eee33fbc1f4 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -24,6 +24,8 @@
 
 #define HIBMC_MIN_VECTORS	1
 #define HIBMC_MAX_VECTORS	2
+#define HIBMC_DP_STATUS		BIT(0)
+#define HIBMC_VGA_STATUS	BIT(1)
 
 struct hibmc_vdac {
 	struct drm_device *dev;
@@ -31,6 +33,7 @@ struct hibmc_vdac {
 	struct drm_connector connector;
 	struct i2c_adapter adapter;
 	struct i2c_algo_bit_data bit_data;
+	int phys_status;
 };
 
 struct hibmc_drm_private {
@@ -43,6 +46,10 @@ struct hibmc_drm_private {
 	struct drm_crtc crtc;
 	struct hibmc_vdac vdac;
 	struct hibmc_dp dp;
+
+	/* VGA and DP phys connect status, BIT(0) is DP, BIT(1) is VGA */
+	u32 connect_status_map;
+	struct mutex connect_lock; /* protect connect_status_map value */
 };
 
 static inline struct hibmc_vdac *to_hibmc_vdac(struct drm_connector *connector)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 841e81f47b68..922c0810723d 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -25,27 +25,18 @@
 static int hibmc_connector_get_modes(struct drm_connector *connector)
 {
 	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
-	const struct drm_edid *drm_edid;
 	int count;
 
-	drm_edid = drm_edid_read_ddc(connector, &vdac->adapter);
-
-	drm_edid_connector_update(connector, drm_edid);
-
-	if (drm_edid) {
-		count = drm_edid_connector_add_modes(connector);
-		if (count)
-			goto out;
+	if (vdac->phys_status == connector_status_connected) {
+		count = drm_connector_helper_get_modes(connector);
+	} else {
+		drm_edid_connector_update(connector, NULL);
+		count = drm_add_modes_noedid(connector,
+					     connector->dev->mode_config.max_width,
+					     connector->dev->mode_config.max_height);
+		drm_set_preferred_mode(connector, 1024, 768);
 	}
 
-	count = drm_add_modes_noedid(connector,
-				     connector->dev->mode_config.max_width,
-				     connector->dev->mode_config.max_height);
-	drm_set_preferred_mode(connector, 1024, 768);
-
-out:
-	drm_edid_free(drm_edid);
-
 	return count;
 }
 
@@ -57,10 +48,45 @@ static void hibmc_connector_destroy(struct drm_connector *connector)
 	drm_connector_cleanup(connector);
 }
 
+static int hibmc_vdac_detect(struct drm_connector *connector,
+			     struct drm_modeset_acquire_ctx *ctx,
+			     bool force)
+{
+	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
+	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
+	int ret = connector_status_disconnected;
+	int status;
+
+	status = drm_connector_helper_detect_from_ddc(connector, ctx, force);
+
+	vdac->phys_status = status;
+
+	mutex_lock(&priv->connect_lock);
+
+	if (status == connector_status_connected) {
+		priv->connect_status_map |= HIBMC_VGA_STATUS;
+		ret = connector_status_connected;
+		goto exit;
+	}
+
+	priv->connect_status_map &= ~HIBMC_VGA_STATUS;
+
+	/* if all connectors are disconnected,
+	 * return connected to support BMC KVM display.
+	 */
+	if (!priv->connect_status_map)
+		ret = connector_status_connected;
+
+exit:
+	mutex_unlock(&priv->connect_lock);
+
+	return ret;
+}
+
 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,
+	.detect_ctx = hibmc_vdac_detect,
 };
 
 static const struct drm_connector_funcs hibmc_connector_funcs = {
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 09/11] drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (7 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-13  9:42 ` [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init Yongbang Shi
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

When using command rmmod and insmod, there is no showing in second time
insmoding. Because DP controller won't send HPD signals, if connection
doesn't change or controller isn't reset. So add reset before unreset
in hibmc_dp_hw_init().

Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
ChangeLog:
v2 -> v3:
  - fix the issue commit ID, suggested by Dmitry Baryshkov.
---
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
index f8e1b437c385..77aacf09b1f8 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
@@ -182,6 +182,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
 	writel(0, dp_dev->base + HIBMC_DP_INTR_ENABLE);
 	writel(HIBMC_DP_INT_RST, dp_dev->base + HIBMC_DP_INTR_ORIGINAL_STATUS);
 	/* rst */
+	writel(0, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
+	usleep_range(30, 50);
 	writel(HIBMC_DP_DPTX_RST, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
 	/* clock enable */
 	writel(HIBMC_DP_CLK_EN, dp_dev->base + HIBMC_DP_DPTX_CLK_CTRL);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init.
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (8 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 09/11] drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-17 13:17   ` Dmitry Baryshkov
  2025-08-13  9:42 ` [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation Yongbang Shi
  2025-08-17 15:34 ` (subset) [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Dmitry Baryshkov
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

Add colorbar disable operation before reset controller, to make sure
colorbar status is clear in the DP init, so if rmmod the driver and the
previous colorbar configuration will not affect the next time insmod the
driver.

Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - fix the commit subject, suggested by Dmitry Baryshkov.
v2 -> v3:
  - fix the issue commit ID, suggested by Dmitry Baryshkov.
  - split into 2 commits, suggested by Dmitry Baryshkov.
  - add more comments in commit log, suggested by Dmitry Baryshkov.
---
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
index 77aacf09b1f8..18beef71d85f 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
@@ -181,6 +181,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
 	/* int init */
 	writel(0, dp_dev->base + HIBMC_DP_INTR_ENABLE);
 	writel(HIBMC_DP_INT_RST, dp_dev->base + HIBMC_DP_INTR_ORIGINAL_STATUS);
+	/* clr colorbar */
+	writel(0, dp_dev->base + HIBMC_DP_COLOR_BAR_CTRL);
 	/* rst */
 	writel(0, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
 	usleep_range(30, 50);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation.
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (9 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init Yongbang Shi
@ 2025-08-13  9:42 ` Yongbang Shi
  2025-08-17 13:18   ` Dmitry Baryshkov
  2025-08-17 15:34 ` (subset) [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Dmitry Baryshkov
  11 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-13  9:42 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, dmitry.baryshkov
  Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, libaihan,
	shenjian15, shaojijie, dri-devel, linux-kernel

From: Baihan Li <libaihan@huawei.com>

The DP reset was adding in the former commit, so move HDCP cfg after DP
controller deresets, so that configuration takes effect.

Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
Signed-off-by: Baihan Li <libaihan@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v3 -> v4:
  - fix the commit subject, suggested by Dmitry Baryshkov.
v2 -> v3:
  - split into 2 commits, suggested by Dmitry Baryshkov.
---
 drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
index 18beef71d85f..73a0c0156092 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
@@ -176,8 +176,6 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
 	dp_dev->link.cap.lanes = 0x2;
 	dp_dev->link.cap.link_rate = DP_LINK_BW_8_1;
 
-	/* hdcp data */
-	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
 	/* int init */
 	writel(0, dp_dev->base + HIBMC_DP_INTR_ENABLE);
 	writel(HIBMC_DP_INT_RST, dp_dev->base + HIBMC_DP_INTR_ORIGINAL_STATUS);
@@ -187,6 +185,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
 	writel(0, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
 	usleep_range(30, 50);
 	writel(HIBMC_DP_DPTX_RST, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
+	/* hdcp data */
+	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
 	/* clock enable */
 	writel(HIBMC_DP_CLK_EN, dp_dev->base + HIBMC_DP_DPTX_CLK_CTRL);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
  2025-08-13  9:42 ` [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq Yongbang Shi
@ 2025-08-14  9:05   ` Dmitry Baryshkov
  2025-08-14 12:19     ` Yongbang Shi
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-14  9:05 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:29PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> The debouncing when HPD pulled out still remains sometimes, 200ms still can
> not ensure helper_detect() is correct. So add a flag to hold the sink
> status, and changed detect_ctx() functions by using flag to check status.

THis doesn't explain what is wrong with
drm_connector_helper_detect_from_ddc(). In the end, this function
doesn't use the HPD pin.

> 
> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
>   - remove if (dev->registered), suggested by Dmitry Baryshkov.
> ---
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  1 +
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 ++++++++++++-------
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> index 665f5b166dfb..68867475508c 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> @@ -50,6 +50,7 @@ struct hibmc_dp {
>  	struct drm_dp_aux aux;
>  	struct hibmc_dp_cbar_cfg cfg;
>  	u32 irq_status;
> +	int hpd_status;
>  };
>  
>  int hibmc_dp_hw_init(struct hibmc_dp *dp);
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> index d06832e62e96..ded38530ecda 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> @@ -34,9 +34,12 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
>  static int hibmc_dp_detect(struct drm_connector *connector,
>  			   struct drm_modeset_acquire_ctx *ctx, bool force)
>  {
> -	mdelay(200);
> +	struct hibmc_dp *dp = to_hibmc_dp(connector);
>  
> -	return drm_connector_helper_detect_from_ddc(connector, ctx, force);
> +	if (dp->hpd_status)
> +		return connector_status_connected;
> +	else
> +		return connector_status_disconnected;
>  }
>  
>  static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
> @@ -115,21 +118,23 @@ irqreturn_t hibmc_dp_hpd_isr(int irq, void *arg)
>  {
>  	struct drm_device *dev = (struct drm_device *)arg;
>  	struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
> +	struct hibmc_dp *dp = &priv->dp;
>  	int idx;
>  
>  	if (!drm_dev_enter(dev, &idx))
>  		return -ENODEV;
>  
> -	if (priv->dp.irq_status & DP_MASKED_SINK_HPD_PLUG_INT) {
> +	if (((dp->irq_status & DP_MASKED_SINK_HPD_PLUG_INT) && !dp->hpd_status)) {
>  		drm_dbg_dp(&priv->dev, "HPD IN isr occur!\n");
> -		hibmc_dp_hpd_cfg(&priv->dp);
> +		hibmc_dp_hpd_cfg(dp);
> +		dp->hpd_status = 1;
>  	} else {
>  		drm_dbg_dp(&priv->dev, "HPD OUT isr occur!\n");
> -		hibmc_dp_reset_link(&priv->dp);
> +		hibmc_dp_reset_link(dp);
> +		dp->hpd_status = 0;
>  	}
>  
> -	if (dev->registered)
> -		drm_connector_helper_hpd_irq_event(&priv->dp.connector);
> +	drm_connector_helper_hpd_irq_event(&priv->dp.connector);
>  
>  	drm_dev_exit(idx);
>  
> -- 
> 2.33.0
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
  2025-08-14  9:05   ` Dmitry Baryshkov
@ 2025-08-14 12:19     ` Yongbang Shi
  2025-08-16 22:32       ` Dmitry Baryshkov
  0 siblings, 1 reply; 27+ messages in thread
From: Yongbang Shi @ 2025-08-14 12:19 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel, shiyongbang


> On Wed, Aug 13, 2025 at 05:42:29PM +0800, Yongbang Shi wrote:
>> From: Baihan Li <libaihan@huawei.com>
>>
>> The debouncing when HPD pulled out still remains sometimes, 200ms still can
>> not ensure helper_detect() is correct. So add a flag to hold the sink
>> status, and changed detect_ctx() functions by using flag to check status.
> THis doesn't explain what is wrong with
> drm_connector_helper_detect_from_ddc(). In the end, this function
> doesn't use the HPD pin.

I'm sorry about the misunderstanding.
The issue is that after plugging or unplugging the monitor, the driver takes no action sometimes
even though an interrupt is triggered. The root cause is that drm_connector_helper_detect_from_ddc()
still returns connected status when the monitor is unplugged.
And I will fix the way in the end.

Thanks,
Baihan Li!


>> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
>> Signed-off-by: Baihan Li <libaihan@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>> ---
>> ChangeLog:
>> v3 -> v4:
>>    - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
>>    - remove if (dev->registered), suggested by Dmitry Baryshkov.
>> ---
>>   drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  1 +
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 ++++++++++++-------
>>   2 files changed, 13 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>> index 665f5b166dfb..68867475508c 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>> @@ -50,6 +50,7 @@ struct hibmc_dp {
>>   	struct drm_dp_aux aux;
>>   	struct hibmc_dp_cbar_cfg cfg;
>>   	u32 irq_status;
>> +	int hpd_status;
>>   };
>>   
>>   int hibmc_dp_hw_init(struct hibmc_dp *dp);
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> index d06832e62e96..ded38530ecda 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> @@ -34,9 +34,12 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
>>   static int hibmc_dp_detect(struct drm_connector *connector,
>>   			   struct drm_modeset_acquire_ctx *ctx, bool force)
>>   {
>> -	mdelay(200);
>> +	struct hibmc_dp *dp = to_hibmc_dp(connector);
>>   
>> -	return drm_connector_helper_detect_from_ddc(connector, ctx, force);
>> +	if (dp->hpd_status)
>> +		return connector_status_connected;
>> +	else
>> +		return connector_status_disconnected;
>>   }
>>   
>>   static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
>> @@ -115,21 +118,23 @@ irqreturn_t hibmc_dp_hpd_isr(int irq, void *arg)
>>   {
>>   	struct drm_device *dev = (struct drm_device *)arg;
>>   	struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
>> +	struct hibmc_dp *dp = &priv->dp;
>>   	int idx;
>>   
>>   	if (!drm_dev_enter(dev, &idx))
>>   		return -ENODEV;
>>   
>> -	if (priv->dp.irq_status & DP_MASKED_SINK_HPD_PLUG_INT) {
>> +	if (((dp->irq_status & DP_MASKED_SINK_HPD_PLUG_INT) && !dp->hpd_status)) {
>>   		drm_dbg_dp(&priv->dev, "HPD IN isr occur!\n");
>> -		hibmc_dp_hpd_cfg(&priv->dp);
>> +		hibmc_dp_hpd_cfg(dp);
>> +		dp->hpd_status = 1;
>>   	} else {
>>   		drm_dbg_dp(&priv->dev, "HPD OUT isr occur!\n");
>> -		hibmc_dp_reset_link(&priv->dp);
>> +		hibmc_dp_reset_link(dp);
>> +		dp->hpd_status = 0;
>>   	}
>>   
>> -	if (dev->registered)
>> -		drm_connector_helper_hpd_irq_event(&priv->dp.connector);
>> +	drm_connector_helper_hpd_irq_event(&priv->dp.connector);
>>   
>>   	drm_dev_exit(idx);
>>   
>> -- 
>> 2.33.0
>>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
  2025-08-14 12:19     ` Yongbang Shi
@ 2025-08-16 22:32       ` Dmitry Baryshkov
  2025-08-18  7:42         ` Yongbang Shi
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-16 22:32 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Thu, Aug 14, 2025 at 08:19:41PM +0800, Yongbang Shi wrote:
> 
> > On Wed, Aug 13, 2025 at 05:42:29PM +0800, Yongbang Shi wrote:
> > > From: Baihan Li <libaihan@huawei.com>
> > > 
> > > The debouncing when HPD pulled out still remains sometimes, 200ms still can
> > > not ensure helper_detect() is correct. So add a flag to hold the sink
> > > status, and changed detect_ctx() functions by using flag to check status.
> > THis doesn't explain what is wrong with
> > drm_connector_helper_detect_from_ddc(). In the end, this function
> > doesn't use the HPD pin.
> 
> I'm sorry about the misunderstanding.
> The issue is that after plugging or unplugging the monitor, the driver takes no action sometimes
> even though an interrupt is triggered. The root cause is that drm_connector_helper_detect_from_ddc()
> still returns connected status when the monitor is unplugged.
> And I will fix the way in the end.

Can you perform a normal DP detection: read DPCD and check that there is
a DPRX attached and that it's either non-branch device or it has one or
more sinks?

> 
> Thanks,
> Baihan Li!
> 
> 
> > > Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> > > Signed-off-by: Baihan Li <libaihan@huawei.com>
> > > Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> > > ---
> > > ChangeLog:
> > > v3 -> v4:
> > >    - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
> > >    - remove if (dev->registered), suggested by Dmitry Baryshkov.
> > > ---
> > >   drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  1 +
> > >   .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 ++++++++++++-------
> > >   2 files changed, 13 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> > > index 665f5b166dfb..68867475508c 100644
> > > --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> > > +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
> > > @@ -50,6 +50,7 @@ struct hibmc_dp {
> > >   	struct drm_dp_aux aux;
> > >   	struct hibmc_dp_cbar_cfg cfg;
> > >   	u32 irq_status;
> > > +	int hpd_status;
> > >   };
> > >   int hibmc_dp_hw_init(struct hibmc_dp *dp);
> > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> > > index d06832e62e96..ded38530ecda 100644
> > > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> > > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> > > @@ -34,9 +34,12 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
> > >   static int hibmc_dp_detect(struct drm_connector *connector,
> > >   			   struct drm_modeset_acquire_ctx *ctx, bool force)
> > >   {
> > > -	mdelay(200);
> > > +	struct hibmc_dp *dp = to_hibmc_dp(connector);
> > > -	return drm_connector_helper_detect_from_ddc(connector, ctx, force);
> > > +	if (dp->hpd_status)
> > > +		return connector_status_connected;
> > > +	else
> > > +		return connector_status_disconnected;
> > >   }
> > >   static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
> > > @@ -115,21 +118,23 @@ irqreturn_t hibmc_dp_hpd_isr(int irq, void *arg)
> > >   {
> > >   	struct drm_device *dev = (struct drm_device *)arg;
> > >   	struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
> > > +	struct hibmc_dp *dp = &priv->dp;
> > >   	int idx;
> > >   	if (!drm_dev_enter(dev, &idx))
> > >   		return -ENODEV;
> > > -	if (priv->dp.irq_status & DP_MASKED_SINK_HPD_PLUG_INT) {
> > > +	if (((dp->irq_status & DP_MASKED_SINK_HPD_PLUG_INT) && !dp->hpd_status)) {
> > >   		drm_dbg_dp(&priv->dev, "HPD IN isr occur!\n");
> > > -		hibmc_dp_hpd_cfg(&priv->dp);
> > > +		hibmc_dp_hpd_cfg(dp);
> > > +		dp->hpd_status = 1;
> > >   	} else {
> > >   		drm_dbg_dp(&priv->dev, "HPD OUT isr occur!\n");
> > > -		hibmc_dp_reset_link(&priv->dp);
> > > +		hibmc_dp_reset_link(dp);
> > > +		dp->hpd_status = 0;
> > >   	}
> > > -	if (dev->registered)
> > > -		drm_connector_helper_hpd_irq_event(&priv->dp.connector);
> > > +	drm_connector_helper_hpd_irq_event(&priv->dp.connector);
> > >   	drm_dev_exit(idx);
> > > -- 
> > > 2.33.0
> > > 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem
  2025-08-13  9:42 ` [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem Yongbang Shi
@ 2025-08-16 22:33   ` Dmitry Baryshkov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-16 22:33 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:32PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> In some case, the dp link training success at 8.1Gbps, but the sink's
> maximum supported rate is less than 8.1G. So change the default 8.1Gbps
> link rate to the rate that reads from devices' capabilities.
> 
> Fixes: 54063d86e036 ("drm/hisilicon/hibmc: add dp link moduel in hibmc drivers")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - remove non-related changes, suggested by Dmitry Baryshkov.
> ---
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together
  2025-08-13  9:42 ` [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together Yongbang Shi
@ 2025-08-16 22:44   ` Dmitry Baryshkov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-16 22:44 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:34PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> If VGA and DP connected together, there will be only one can get crtc.
> Add encoder possible_clones to support two connectors enable.
> 
> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected
  2025-08-13  9:42 ` [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
@ 2025-08-17 13:09   ` Dmitry Baryshkov
  2025-08-18  7:44     ` Yongbang Shi
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 13:09 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:35PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> Our chip support KVM over IP feature, so hibmc driver need to support
> displaying without any connectors plugged in. If no connectors connected,
> set the vdac connector status to 'connected' to handle BMC KVM. Use
> is_connected to check all physical outputs.
> For get_modes: using BMC modes for connector if no display is attached to
> phys VGA cable, otherwise use EDID modes by drm_connector_helper_get_modes,
> because KVM doesn't provide EDID reads.
> 
> Fixes: 4c962bc929f1 ("drm/hisilicon/hibmc: Add vga connector detect functions")

It feels like being too big for a fix...

> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - add KVM edid in commit message, suggested by Dmitry Baryshkov.
>   - fix magic values, suggested by Dmitry Baryshkov.
> v2 -> v3:
>   - fix hibmc_connector_get_modes() and hibmc_vdac_detect() to realize BMC KVM, suggested by Dmitry Baryshkov.
> ---
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 20 ++++--
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   |  7 +++
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  | 62 +++++++++++++------
>  4 files changed, 68 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> index 5cac04b7d4a4..9626c60a9115 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
> @@ -35,12 +35,22 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
>  static int hibmc_dp_detect(struct drm_connector *connector,
>  			   struct drm_modeset_acquire_ctx *ctx, bool force)
>  {
> -	struct hibmc_dp *dp = to_hibmc_dp(connector);
> +	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
> +	int ret;
> +
> +	mutex_lock(&priv->connect_lock);
> +
> +	if (priv->dp.hpd_status) {
> +		priv->connect_status_map |= HIBMC_DP_STATUS;
> +		ret = connector_status_connected;
> +	} else {
> +		priv->connect_status_map &= ~HIBMC_DP_STATUS;
> +		ret = connector_status_disconnected;
> +	}
>  
> -	if (dp->hpd_status)
> -		return connector_status_connected;
> -	else
> -		return connector_status_disconnected;
> +	mutex_unlock(&priv->connect_lock);
> +
> +	return ret;
>  }
>  
>  static int hibmc_dp_mode_valid(struct drm_connector *connector,
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 289304500ab0..bdf14ad52cd3 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -162,6 +162,8 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
>  	drm_for_each_encoder(encoder, dev)
>  		encoder->possible_clones = clone_mask;
>  
> +	mutex_init(&priv->connect_lock);
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> index ca8502e2760c..4eee33fbc1f4 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> @@ -24,6 +24,8 @@
>  
>  #define HIBMC_MIN_VECTORS	1
>  #define HIBMC_MAX_VECTORS	2
> +#define HIBMC_DP_STATUS		BIT(0)
> +#define HIBMC_VGA_STATUS	BIT(1)
>  
>  struct hibmc_vdac {
>  	struct drm_device *dev;
> @@ -31,6 +33,7 @@ struct hibmc_vdac {
>  	struct drm_connector connector;
>  	struct i2c_adapter adapter;
>  	struct i2c_algo_bit_data bit_data;
> +	int phys_status;
>  };
>  
>  struct hibmc_drm_private {
> @@ -43,6 +46,10 @@ struct hibmc_drm_private {
>  	struct drm_crtc crtc;
>  	struct hibmc_vdac vdac;
>  	struct hibmc_dp dp;
> +
> +	/* VGA and DP phys connect status, BIT(0) is DP, BIT(1) is VGA */
> +	u32 connect_status_map;
> +	struct mutex connect_lock; /* protect connect_status_map value */
>  };
>  
>  static inline struct hibmc_vdac *to_hibmc_vdac(struct drm_connector *connector)
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
> index 841e81f47b68..922c0810723d 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
> @@ -25,27 +25,18 @@
>  static int hibmc_connector_get_modes(struct drm_connector *connector)
>  {
>  	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
> -	const struct drm_edid *drm_edid;
>  	int count;
>  
> -	drm_edid = drm_edid_read_ddc(connector, &vdac->adapter);
> -
> -	drm_edid_connector_update(connector, drm_edid);
> -
> -	if (drm_edid) {
> -		count = drm_edid_connector_add_modes(connector);
> -		if (count)

Here you are refactoring to use drm_edid_connector_add_modes() and
fixing the connector issue. Please don't mix those together.

> -			goto out;
> +	if (vdac->phys_status == connector_status_connected) {
> +		count = drm_connector_helper_get_modes(connector);
> +	} else {
> +		drm_edid_connector_update(connector, NULL);
> +		count = drm_add_modes_noedid(connector,
> +					     connector->dev->mode_config.max_width,
> +					     connector->dev->mode_config.max_height);
> +		drm_set_preferred_mode(connector, 1024, 768);
>  	}
>  
> -	count = drm_add_modes_noedid(connector,
> -				     connector->dev->mode_config.max_width,
> -				     connector->dev->mode_config.max_height);
> -	drm_set_preferred_mode(connector, 1024, 768);
> -
> -out:
> -	drm_edid_free(drm_edid);
> -
>  	return count;
>  }
>  
> @@ -57,10 +48,45 @@ static void hibmc_connector_destroy(struct drm_connector *connector)
>  	drm_connector_cleanup(connector);
>  }
>  
> +static int hibmc_vdac_detect(struct drm_connector *connector,
> +			     struct drm_modeset_acquire_ctx *ctx,
> +			     bool force)
> +{
> +	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
> +	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
> +	int ret = connector_status_disconnected;
> +	int status;
> +
> +	status = drm_connector_helper_detect_from_ddc(connector, ctx, force);
> +
> +	vdac->phys_status = status;
> +
> +	mutex_lock(&priv->connect_lock);
> +
> +	if (status == connector_status_connected) {
> +		priv->connect_status_map |= HIBMC_VGA_STATUS;
> +		ret = connector_status_connected;
> +		goto exit;
> +	}
> +
> +	priv->connect_status_map &= ~HIBMC_VGA_STATUS;
> +
> +	/* if all connectors are disconnected,
> +	 * return connected to support BMC KVM display.
> +	 */
> +	if (!priv->connect_status_map)
> +		ret = connector_status_connected;
> +
> +exit:
> +	mutex_unlock(&priv->connect_lock);
> +
> +	return ret;
> +}
> +
>  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,
> +	.detect_ctx = hibmc_vdac_detect,
>  };
>  
>  static const struct drm_connector_funcs hibmc_connector_funcs = {
> -- 
> 2.33.0
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init.
  2025-08-13  9:42 ` [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init Yongbang Shi
@ 2025-08-17 13:17   ` Dmitry Baryshkov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 13:17 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:37PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> Add colorbar disable operation before reset controller, to make sure
> colorbar status is clear in the DP init, so if rmmod the driver and the
> previous colorbar configuration will not affect the next time insmod the
> driver.
> 
> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - fix the commit subject, suggested by Dmitry Baryshkov.
> v2 -> v3:
>   - fix the issue commit ID, suggested by Dmitry Baryshkov.
>   - split into 2 commits, suggested by Dmitry Baryshkov.
>   - add more comments in commit log, suggested by Dmitry Baryshkov.
> ---
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation.
  2025-08-13  9:42 ` [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation Yongbang Shi
@ 2025-08-17 13:18   ` Dmitry Baryshkov
  2025-08-18  7:44     ` Yongbang Shi
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 13:18 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:38PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> The DP reset was adding in the former commit, so move HDCP cfg after DP
> controller deresets, so that configuration takes effect.
> 
> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>

This should be squashed into reset commit.

> ---
> ChangeLog:
> v3 -> v4:
>   - fix the commit subject, suggested by Dmitry Baryshkov.
> v2 -> v3:
>   - split into 2 commits, suggested by Dmitry Baryshkov.
> ---
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
> index 18beef71d85f..73a0c0156092 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
> @@ -176,8 +176,6 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
>  	dp_dev->link.cap.lanes = 0x2;
>  	dp_dev->link.cap.link_rate = DP_LINK_BW_8_1;
>  
> -	/* hdcp data */
> -	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
>  	/* int init */
>  	writel(0, dp_dev->base + HIBMC_DP_INTR_ENABLE);
>  	writel(HIBMC_DP_INT_RST, dp_dev->base + HIBMC_DP_INTR_ORIGINAL_STATUS);
> @@ -187,6 +185,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
>  	writel(0, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
>  	usleep_range(30, 50);
>  	writel(HIBMC_DP_DPTX_RST, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
> +	/* hdcp data */
> +	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
>  	/* clock enable */
>  	writel(HIBMC_DP_CLK_EN, dp_dev->base + HIBMC_DP_DPTX_CLK_CTRL);
>  
> -- 
> 2.33.0
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check
  2025-08-13  9:42 ` [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check Yongbang Shi
@ 2025-08-17 15:18   ` Dmitry Baryshkov
  2025-08-17 15:32   ` Dmitry Baryshkov
  1 sibling, 0 replies; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 15:18 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:33PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> If DP is connected, check the DP BW in mode_valid_ctx() to ensure
> that DP's link rate supports high-resolution data transmission.
> 
> Fixes: f9698f802e50 ("drm/hisilicon/hibmc: Restructuring the header dp_reg.h")
> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - Remove the clock check, suggested by Dmitry Baryshkov.
>   - ( I'll add them in next series after redesigning this part)
> ---
>  .../gpu/drm/hisilicon/hibmc/dp/dp_config.h    |  2 ++
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c    | 10 ++++++++++
>  drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  2 ++
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 +++++++++++++++++++
>  4 files changed, 33 insertions(+)
> 

This more or less matches what (some of) the other drivers do.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check
  2025-08-13  9:42 ` [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check Yongbang Shi
  2025-08-17 15:18   ` Dmitry Baryshkov
@ 2025-08-17 15:32   ` Dmitry Baryshkov
  2025-08-18  7:43     ` Yongbang Shi
  1 sibling, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 15:32 UTC (permalink / raw)
  To: Yongbang Shi
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel

On Wed, Aug 13, 2025 at 05:42:33PM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@huawei.com>
> 
> If DP is connected, check the DP BW in mode_valid_ctx() to ensure
> that DP's link rate supports high-resolution data transmission.
> 
> Fixes: f9698f802e50 ("drm/hisilicon/hibmc: Restructuring the header dp_reg.h")

Why?

> Signed-off-by: Baihan Li <libaihan@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
> ChangeLog:
> v3 -> v4:
>   - Remove the clock check, suggested by Dmitry Baryshkov.
>   - ( I'll add them in next series after redesigning this part)
-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: (subset) [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs
  2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
                   ` (10 preceding siblings ...)
  2025-08-13  9:42 ` [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation Yongbang Shi
@ 2025-08-17 15:34 ` Dmitry Baryshkov
  11 siblings, 0 replies; 27+ messages in thread
From: Dmitry Baryshkov @ 2025-08-17 15:34 UTC (permalink / raw)
  To: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, kong.kongxinwei, Simona Vetter, Yongbang Shi
  Cc: liangjian010, chenjianmin, fengsheng5, libaihan, shenjian15,
	shaojijie, dri-devel, linux-kernel

On Wed, 13 Aug 2025 17:42:27 +0800, Yongbang Shi wrote:
> There are some bugfix for hibmc-drm driver.
> 

Applied to drm-misc-fixes, thanks!

[01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed
        commit: e5f48bfa2ae0806d5f51fb8061afc619a73599a7
[03/11] drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local
        commit: 8bed4ec42a4e0dc8113172696ff076d1eb6d8bcb
[04/11] drm/hisilicon/hibmc: fix the hibmc loaded failed bug
        commit: 93a08f856fcc5aaeeecad01f71bef3088588216a
[05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem
        commit: 9f98b429ba67d430b873e06bcfb90afa22888978
[06/11] drm/hisilicon/hibmc: add dp mode valid check
        (no commit info)
[07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together
        commit: 3271faf42d135bcf569c3ff6af55c21858eec212

Best regards,
-- 
With best wishes
Dmitry



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
  2025-08-16 22:32       ` Dmitry Baryshkov
@ 2025-08-18  7:42         ` Yongbang Shi
  0 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-18  7:42 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel, shiyongbang

> On Thu, Aug 14, 2025 at 08:19:41PM +0800, Yongbang Shi wrote:
>>> On Wed, Aug 13, 2025 at 05:42:29PM +0800, Yongbang Shi wrote:
>>>> From: Baihan Li <libaihan@huawei.com>
>>>>
>>>> The debouncing when HPD pulled out still remains sometimes, 200ms still can
>>>> not ensure helper_detect() is correct. So add a flag to hold the sink
>>>> status, and changed detect_ctx() functions by using flag to check status.
>>> THis doesn't explain what is wrong with
>>> drm_connector_helper_detect_from_ddc(). In the end, this function
>>> doesn't use the HPD pin.
>> I'm sorry about the misunderstanding.
>> The issue is that after plugging or unplugging the monitor, the driver takes no action sometimes
>> even though an interrupt is triggered. The root cause is that drm_connector_helper_detect_from_ddc()
>> still returns connected status when the monitor is unplugged.
>> And I will fix the way in the end.
> Can you perform a normal DP detection: read DPCD and check that there is
> a DPRX attached and that it's either non-branch device or it has one or
> more sinks?

Alright! I will add read_dpcd_caps() and read_sink_count_cap() here to detect DP.

Thanks for your tips!


>> Thanks,
>> Baihan Li!
>>
>>
>>>> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
>>>> Signed-off-by: Baihan Li <libaihan@huawei.com>
>>>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>>>> ---
>>>> ChangeLog:
>>>> v3 -> v4:
>>>>     - remove link training process in hibmc_dp_detect(), suggested by Dmitry Baryshkov.
>>>>     - remove if (dev->registered), suggested by Dmitry Baryshkov.
>>>> ---
>>>>    drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h    |  1 +
>>>>    .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 19 ++++++++++++-------
>>>>    2 files changed, 13 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>>>> index 665f5b166dfb..68867475508c 100644
>>>> --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
>>>> @@ -50,6 +50,7 @@ struct hibmc_dp {
>>>>    	struct drm_dp_aux aux;
>>>>    	struct hibmc_dp_cbar_cfg cfg;
>>>>    	u32 irq_status;
>>>> +	int hpd_status;
>>>>    };
>>>>    int hibmc_dp_hw_init(struct hibmc_dp *dp);
>>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>>>> index d06832e62e96..ded38530ecda 100644
>>>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>>>> @@ -34,9 +34,12 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
>>>>    static int hibmc_dp_detect(struct drm_connector *connector,
>>>>    			   struct drm_modeset_acquire_ctx *ctx, bool force)
>>>>    {
>>>> -	mdelay(200);
>>>> +	struct hibmc_dp *dp = to_hibmc_dp(connector);
>>>> -	return drm_connector_helper_detect_from_ddc(connector, ctx, force);
>>>> +	if (dp->hpd_status)
>>>> +		return connector_status_connected;
>>>> +	else
>>>> +		return connector_status_disconnected;
>>>>    }
>>>>    static const struct drm_connector_helper_funcs hibmc_dp_conn_helper_funcs = {
>>>> @@ -115,21 +118,23 @@ irqreturn_t hibmc_dp_hpd_isr(int irq, void *arg)
>>>>    {
>>>>    	struct drm_device *dev = (struct drm_device *)arg;
>>>>    	struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
>>>> +	struct hibmc_dp *dp = &priv->dp;
>>>>    	int idx;
>>>>    	if (!drm_dev_enter(dev, &idx))
>>>>    		return -ENODEV;
>>>> -	if (priv->dp.irq_status & DP_MASKED_SINK_HPD_PLUG_INT) {
>>>> +	if (((dp->irq_status & DP_MASKED_SINK_HPD_PLUG_INT) && !dp->hpd_status)) {
>>>>    		drm_dbg_dp(&priv->dev, "HPD IN isr occur!\n");
>>>> -		hibmc_dp_hpd_cfg(&priv->dp);
>>>> +		hibmc_dp_hpd_cfg(dp);
>>>> +		dp->hpd_status = 1;
>>>>    	} else {
>>>>    		drm_dbg_dp(&priv->dev, "HPD OUT isr occur!\n");
>>>> -		hibmc_dp_reset_link(&priv->dp);
>>>> +		hibmc_dp_reset_link(dp);
>>>> +		dp->hpd_status = 0;
>>>>    	}
>>>> -	if (dev->registered)
>>>> -		drm_connector_helper_hpd_irq_event(&priv->dp.connector);
>>>> +	drm_connector_helper_hpd_irq_event(&priv->dp.connector);
>>>>    	drm_dev_exit(idx);
>>>> -- 
>>>> 2.33.0
>>>>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check
  2025-08-17 15:32   ` Dmitry Baryshkov
@ 2025-08-18  7:43     ` Yongbang Shi
  0 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-18  7:43 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel, shiyongbang


> On Wed, Aug 13, 2025 at 05:42:33PM +0800, Yongbang Shi wrote:
>> From: Baihan Li <libaihan@huawei.com>
>>
>> If DP is connected, check the DP BW in mode_valid_ctx() to ensure
>> that DP's link rate supports high-resolution data transmission.
>>
>> Fixes: f9698f802e50 ("drm/hisilicon/hibmc: Restructuring the header dp_reg.h")
> Why?

Sorry, it should be 0ab6ea261c1f ("drm/hisilicon/hibmc: add dp module in hibmc").

Thanks,
Baihan Li


>> Signed-off-by: Baihan Li <libaihan@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>> ---
>> ChangeLog:
>> v3 -> v4:
>>    - Remove the clock check, suggested by Dmitry Baryshkov.
>>    - ( I'll add them in next series after redesigning this part)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected
  2025-08-17 13:09   ` Dmitry Baryshkov
@ 2025-08-18  7:44     ` Yongbang Shi
  0 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-18  7:44 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel, shiyongbang


> On Wed, Aug 13, 2025 at 05:42:35PM +0800, Yongbang Shi wrote:
>> From: Baihan Li <libaihan@huawei.com>
>>
>> Our chip support KVM over IP feature, so hibmc driver need to support
>> displaying without any connectors plugged in. If no connectors connected,
>> set the vdac connector status to 'connected' to handle BMC KVM. Use
>> is_connected to check all physical outputs.
>> For get_modes: using BMC modes for connector if no display is attached to
>> phys VGA cable, otherwise use EDID modes by drm_connector_helper_get_modes,
>> because KVM doesn't provide EDID reads.
>>
>> Fixes: 4c962bc929f1 ("drm/hisilicon/hibmc: Add vga connector detect functions")
> It feels like being too big for a fix...

Okay, how about I move this change to next series as a KVM feature?


>> Signed-off-by: Baihan Li <libaihan@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>> ---
>> ChangeLog:
>> v3 -> v4:
>>    - add KVM edid in commit message, suggested by Dmitry Baryshkov.
>>    - fix magic values, suggested by Dmitry Baryshkov.
>> v2 -> v3:
>>    - fix hibmc_connector_get_modes() and hibmc_vdac_detect() to realize BMC KVM, suggested by Dmitry Baryshkov.
>> ---
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c    | 20 ++++--
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   |  7 +++
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  | 62 +++++++++++++------
>>   4 files changed, 68 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> index 5cac04b7d4a4..9626c60a9115 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
>> @@ -35,12 +35,22 @@ static int hibmc_dp_connector_get_modes(struct drm_connector *connector)
>>   static int hibmc_dp_detect(struct drm_connector *connector,
>>   			   struct drm_modeset_acquire_ctx *ctx, bool force)
>>   {
>> -	struct hibmc_dp *dp = to_hibmc_dp(connector);
>> +	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
>> +	int ret;
>> +
>> +	mutex_lock(&priv->connect_lock);
>> +
>> +	if (priv->dp.hpd_status) {
>> +		priv->connect_status_map |= HIBMC_DP_STATUS;
>> +		ret = connector_status_connected;
>> +	} else {
>> +		priv->connect_status_map &= ~HIBMC_DP_STATUS;
>> +		ret = connector_status_disconnected;
>> +	}
>>   
>> -	if (dp->hpd_status)
>> -		return connector_status_connected;
>> -	else
>> -		return connector_status_disconnected;
>> +	mutex_unlock(&priv->connect_lock);
>> +
>> +	return ret;
>>   }
>>   
>>   static int hibmc_dp_mode_valid(struct drm_connector *connector,
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>> index 289304500ab0..bdf14ad52cd3 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>> @@ -162,6 +162,8 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
>>   	drm_for_each_encoder(encoder, dev)
>>   		encoder->possible_clones = clone_mask;
>>   
>> +	mutex_init(&priv->connect_lock);
>> +
>>   	return 0;
>>   }
>>   
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>> index ca8502e2760c..4eee33fbc1f4 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>> @@ -24,6 +24,8 @@
>>   
>>   #define HIBMC_MIN_VECTORS	1
>>   #define HIBMC_MAX_VECTORS	2
>> +#define HIBMC_DP_STATUS		BIT(0)
>> +#define HIBMC_VGA_STATUS	BIT(1)
>>   
>>   struct hibmc_vdac {
>>   	struct drm_device *dev;
>> @@ -31,6 +33,7 @@ struct hibmc_vdac {
>>   	struct drm_connector connector;
>>   	struct i2c_adapter adapter;
>>   	struct i2c_algo_bit_data bit_data;
>> +	int phys_status;
>>   };
>>   
>>   struct hibmc_drm_private {
>> @@ -43,6 +46,10 @@ struct hibmc_drm_private {
>>   	struct drm_crtc crtc;
>>   	struct hibmc_vdac vdac;
>>   	struct hibmc_dp dp;
>> +
>> +	/* VGA and DP phys connect status, BIT(0) is DP, BIT(1) is VGA */
>> +	u32 connect_status_map;
>> +	struct mutex connect_lock; /* protect connect_status_map value */
>>   };
>>   
>>   static inline struct hibmc_vdac *to_hibmc_vdac(struct drm_connector *connector)
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
>> index 841e81f47b68..922c0810723d 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
>> @@ -25,27 +25,18 @@
>>   static int hibmc_connector_get_modes(struct drm_connector *connector)
>>   {
>>   	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
>> -	const struct drm_edid *drm_edid;
>>   	int count;
>>   
>> -	drm_edid = drm_edid_read_ddc(connector, &vdac->adapter);
>> -
>> -	drm_edid_connector_update(connector, drm_edid);
>> -
>> -	if (drm_edid) {
>> -		count = drm_edid_connector_add_modes(connector);
>> -		if (count)
> Here you are refactoring to use drm_edid_connector_add_modes() and
> fixing the connector issue. Please don't mix those together.

Alright! I will separate them later.


>> -			goto out;
>> +	if (vdac->phys_status == connector_status_connected) {
>> +		count = drm_connector_helper_get_modes(connector);
>> +	} else {
>> +		drm_edid_connector_update(connector, NULL);
>> +		count = drm_add_modes_noedid(connector,
>> +					     connector->dev->mode_config.max_width,
>> +					     connector->dev->mode_config.max_height);
>> +		drm_set_preferred_mode(connector, 1024, 768);
>>   	}
>>   
>> -	count = drm_add_modes_noedid(connector,
>> -				     connector->dev->mode_config.max_width,
>> -				     connector->dev->mode_config.max_height);
>> -	drm_set_preferred_mode(connector, 1024, 768);
>> -
>> -out:
>> -	drm_edid_free(drm_edid);
>> -
>>   	return count;
>>   }
>>   
>> @@ -57,10 +48,45 @@ static void hibmc_connector_destroy(struct drm_connector *connector)
>>   	drm_connector_cleanup(connector);
>>   }
>>   
>> +static int hibmc_vdac_detect(struct drm_connector *connector,
>> +			     struct drm_modeset_acquire_ctx *ctx,
>> +			     bool force)
>> +{
>> +	struct hibmc_drm_private *priv = to_hibmc_drm_private(connector->dev);
>> +	struct hibmc_vdac *vdac = to_hibmc_vdac(connector);
>> +	int ret = connector_status_disconnected;
>> +	int status;
>> +
>> +	status = drm_connector_helper_detect_from_ddc(connector, ctx, force);
>> +
>> +	vdac->phys_status = status;
>> +
>> +	mutex_lock(&priv->connect_lock);
>> +
>> +	if (status == connector_status_connected) {
>> +		priv->connect_status_map |= HIBMC_VGA_STATUS;
>> +		ret = connector_status_connected;
>> +		goto exit;
>> +	}
>> +
>> +	priv->connect_status_map &= ~HIBMC_VGA_STATUS;
>> +
>> +	/* if all connectors are disconnected,
>> +	 * return connected to support BMC KVM display.
>> +	 */
>> +	if (!priv->connect_status_map)
>> +		ret = connector_status_connected;
>> +
>> +exit:
>> +	mutex_unlock(&priv->connect_lock);
>> +
>> +	return ret;
>> +}
>> +
>>   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,
>> +	.detect_ctx = hibmc_vdac_detect,
>>   };
>>   
>>   static const struct drm_connector_funcs hibmc_connector_funcs = {
>> -- 
>> 2.33.0
>>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation.
  2025-08-17 13:18   ` Dmitry Baryshkov
@ 2025-08-18  7:44     ` Yongbang Shi
  0 siblings, 0 replies; 27+ messages in thread
From: Yongbang Shi @ 2025-08-18  7:44 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: xinliang.liu, tiantao6, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, kong.kongxinwei, liangjian010, chenjianmin,
	fengsheng5, libaihan, shenjian15, shaojijie, dri-devel,
	linux-kernel, shiyongbang


> On Wed, Aug 13, 2025 at 05:42:38PM +0800, Yongbang Shi wrote:
>> From: Baihan Li <libaihan@huawei.com>
>>
>> The DP reset was adding in the former commit, so move HDCP cfg after DP
>> controller deresets, so that configuration takes effect.
>>
>> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
>> Signed-off-by: Baihan Li <libaihan@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> This should be squashed into reset commit.

Okay, thanks!


>> ---
>> ChangeLog:
>> v3 -> v4:
>>    - fix the commit subject, suggested by Dmitry Baryshkov.
>> v2 -> v3:
>>    - split into 2 commits, suggested by Dmitry Baryshkov.
>> ---
>>   drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
>> index 18beef71d85f..73a0c0156092 100644
>> --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
>> +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
>> @@ -176,8 +176,6 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
>>   	dp_dev->link.cap.lanes = 0x2;
>>   	dp_dev->link.cap.link_rate = DP_LINK_BW_8_1;
>>   
>> -	/* hdcp data */
>> -	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
>>   	/* int init */
>>   	writel(0, dp_dev->base + HIBMC_DP_INTR_ENABLE);
>>   	writel(HIBMC_DP_INT_RST, dp_dev->base + HIBMC_DP_INTR_ORIGINAL_STATUS);
>> @@ -187,6 +185,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp)
>>   	writel(0, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
>>   	usleep_range(30, 50);
>>   	writel(HIBMC_DP_DPTX_RST, dp_dev->base + HIBMC_DP_DPTX_RST_CTRL);
>> +	/* hdcp data */
>> +	writel(HIBMC_DP_HDCP, dp_dev->base + HIBMC_DP_HDCP_CFG);
>>   	/* clock enable */
>>   	writel(HIBMC_DP_CLK_EN, dp_dev->base + HIBMC_DP_DPTX_CLK_CTRL);
>>   
>> -- 
>> 2.33.0
>>

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-08-18  7:44 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13  9:42 [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 01/11] drm/hisilicon/hibmc: fix the i2c device resource leak when vdac init failed Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 02/11] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq Yongbang Shi
2025-08-14  9:05   ` Dmitry Baryshkov
2025-08-14 12:19     ` Yongbang Shi
2025-08-16 22:32       ` Dmitry Baryshkov
2025-08-18  7:42         ` Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 03/11] drm/hisilicon/hibmc: fix irq_request()'s irq name variable is local Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 04/11] drm/hisilicon/hibmc: fix the hibmc loaded failed bug Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 05/11] drm/hisilicon/hibmc: fix rare monitors cannot display problem Yongbang Shi
2025-08-16 22:33   ` Dmitry Baryshkov
2025-08-13  9:42 ` [PATCH v4 drm-dp 06/11] drm/hisilicon/hibmc: add dp mode valid check Yongbang Shi
2025-08-17 15:18   ` Dmitry Baryshkov
2025-08-17 15:32   ` Dmitry Baryshkov
2025-08-18  7:43     ` Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 07/11] drm/hisilicon/hibmc: fix dp and vga cannot show together Yongbang Shi
2025-08-16 22:44   ` Dmitry Baryshkov
2025-08-13  9:42 ` [PATCH v4 drm-dp 08/11] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
2025-08-17 13:09   ` Dmitry Baryshkov
2025-08-18  7:44     ` Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 09/11] drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually Yongbang Shi
2025-08-13  9:42 ` [PATCH v4 drm-dp 10/11] drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init Yongbang Shi
2025-08-17 13:17   ` Dmitry Baryshkov
2025-08-13  9:42 ` [PATCH v4 drm-dp 11/11] drm/hisilicon/hibmc: moving HDCP cfg after the dp reset operation Yongbang Shi
2025-08-17 13:18   ` Dmitry Baryshkov
2025-08-18  7:44     ` Yongbang Shi
2025-08-17 15:34 ` (subset) [PATCH v4 drm-dp 00/11] Fix hibmc driver bugs Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).