* [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver
@ 2026-04-16 9:24 Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 1/4] drm/hisilicon/hibmc: add updating link cap in DP detect() Yongbang Shi
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Yongbang Shi @ 2026-04-16 9:24 UTC (permalink / raw)
To: tzimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, helin52,
shenjian15, shaojijie, dri-devel, linux-kernel
From: Lin He <helin52@huawei.com>
There are some bugfix for hibmc-drm driver.
---
ChangeLog:
v3 -> v4:
- fix incorrect cover-letter subject prefix in v3.
v2 -> v3:
- remove unused macro CLOCK_TOLERANCE.
v1 -> v2:
- fix the checkpatch.pl warning "Unknown commit ID 'e6c7c59da494'".
- fix the checkpatch.pl warning "line length of 83/85 exceeds 80 columns".
- remove tag "Reviewed-by: Tao Tian <tiantao6@hisilicon.com>", witch will
be given in public.
- add 'drm-misc-fixes' in subject prefix.
---
Lin He (4):
drm/hisilicon/hibmc: add updating link cap in DP detect()
drm/hisilicon/hibmc: fix no showing when no connectors connected
drm/hisilicon/hibmc: move display contrl config to hibmc_probe()
drm/hisilicon/hibmc: use clock to look up the PLL value
drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h | 1 +
drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h | 1 +
drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c | 2 +-
.../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 78 +++++++++++--------
.../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 35 ++++++---
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 ++++
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 +
.../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 67 ++++++++--------
8 files changed, 118 insertions(+), 81 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH for drm-misc-fixes v4 1/4] drm/hisilicon/hibmc: add updating link cap in DP detect()
2026-04-16 9:24 [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver Yongbang Shi
@ 2026-04-16 9:24 ` Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Yongbang Shi @ 2026-04-16 9:24 UTC (permalink / raw)
To: tzimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, helin52,
shenjian15, shaojijie, dri-devel, linux-kernel
From: Lin He <helin52@huawei.com>
In the past, the link cap is updated in link training at encoder enable
stage, but the hibmc_dp_mode_valid() is called before it, which will use
DP link's rate and lanes. So add the hibmc_dp_update_caps() in
hibmc_dp_update_caps() to avoid some potential risks.
Fixes: 607805abfb74 ("drm/hisilicon/hibmc: add dp mode valid check")
Signed-off-by: Lin He <helin52@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v1 -> v2:
- fix the checkpatch.pl warning "Unknown commit ID 'e6c7c59da494'".
- remove tag "Reviewed-by: Tao Tian <tiantao6@hisilicon.com>", witch will
be given in public.
- add 'drm-misc-fixes' in subject prefix.
---
drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h | 1 +
drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c | 2 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 2 ++
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h
index f9ee7ebfec55..f53dac256ee0 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h
@@ -69,5 +69,6 @@ int hibmc_dp_link_training(struct hibmc_dp_dev *dp);
int hibmc_dp_serdes_init(struct hibmc_dp_dev *dp);
int hibmc_dp_serdes_rate_switch(u8 rate, struct hibmc_dp_dev *dp);
int hibmc_dp_serdes_set_tx_cfg(struct hibmc_dp_dev *dp, u8 train_set[HIBMC_DP_LANE_NUM_MAX]);
+void hibmc_dp_update_caps(struct hibmc_dp_dev *dp);
#endif
diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
index 0726cb5b736e..8c53f16db516 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c
@@ -325,7 +325,7 @@ 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)
+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)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
index 616821e3c933..35dff7bfbf76 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
@@ -41,6 +41,8 @@ static bool hibmc_dp_get_dpcd(struct hibmc_dp_dev *dp_dev)
if (ret)
return false;
+ hibmc_dp_update_caps(dp_dev);
+
dp_dev->is_branch = drm_dp_is_branch(dp_dev->dpcd);
ret = drm_dp_read_desc(dp_dev->aux, &dp_dev->desc, dp_dev->is_branch);
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-16 9:24 [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 1/4] drm/hisilicon/hibmc: add updating link cap in DP detect() Yongbang Shi
@ 2026-04-16 9:24 ` Yongbang Shi
2026-04-17 7:54 ` Thomas Zimmermann
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 3/4] drm/hisilicon/hibmc: move display contrl config to hibmc_probe() Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 4/4] drm/hisilicon/hibmc: use clock to look up the PLL value Yongbang Shi
3 siblings, 1 reply; 13+ messages in thread
From: Yongbang Shi @ 2026-04-16 9:24 UTC (permalink / raw)
To: tzimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, helin52,
shenjian15, shaojijie, dri-devel, linux-kernel
From: Lin He <helin52@huawei.com>
Our chip support KVM over IP feature, so hibmc driver need to support
displaying without any connectors plugged in. If no connectors are
connected, the vdac connector status should be set to 'connected' to
ensure proper KVM display functionality. Additionally, for
previous-generation products that may lack hardware link support and
thus cannot detect the monitor, the same approach should be applied
to ensure VGA display functionality. Add phys_state in the struct of
dp and vdac 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")
Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Closes: https://lore.kernel.org/all/0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de/
Signed-off-by: Lin He <helin52@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v1 -> v2:
- fix the checkpatch.pl warning "line length of 83/85 exceeds 80 columns".
- remove tag "Reviewed-by: Tao Tian <tiantao6@hisilicon.com>", witch will
be given in public.
- add 'drm-misc-fixes' in subject prefix.
---
drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h | 1 +
.../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 33 +++++++++-----
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 +
.../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 45 +++++++++++++------
4 files changed, 56 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
index 31316fe1ea8d..dfaeabd05d46 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
@@ -55,6 +55,7 @@ struct hibmc_dp {
struct drm_dp_aux aux;
struct hibmc_dp_cbar_cfg cfg;
u32 irq_status;
+ int phys_state;
};
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 35dff7bfbf76..8fe2eb51a0b3 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c
@@ -61,27 +61,38 @@ static int hibmc_dp_detect(struct drm_connector *connector,
{
struct hibmc_dp *dp = to_hibmc_dp(connector);
struct hibmc_dp_dev *dp_dev = dp->dp_dev;
- int ret;
+ int ret = connector_status_disconnected;
if (dp->irq_status) {
- if (dp_dev->hpd_status != HIBMC_HPD_IN)
- return connector_status_disconnected;
+ if (dp_dev->hpd_status != HIBMC_HPD_IN) {
+ ret = connector_status_disconnected;
+ goto exit;
+ }
}
- if (!hibmc_dp_get_dpcd(dp_dev))
- return connector_status_disconnected;
+ if (!hibmc_dp_get_dpcd(dp_dev)) {
+ ret = connector_status_disconnected;
+ goto exit;
+ }
- if (!dp_dev->is_branch)
- return connector_status_connected;
+ if (!dp_dev->is_branch) {
+ ret = connector_status_connected;
+ goto exit;
+ }
if (drm_dp_read_sink_count_cap(connector, dp_dev->dpcd, &dp_dev->desc) &&
dp_dev->downstream_ports[0] & DP_DS_PORT_HPD) {
ret = drm_dp_read_sink_count(dp_dev->aux);
- if (ret > 0)
- return connector_status_connected;
+ if (ret > 0) {
+ ret = connector_status_connected;
+ goto exit;
+ }
}
- return connector_status_disconnected;
+exit:
+ dp->phys_state = ret;
+
+ return ret;
}
static int hibmc_dp_mode_valid(struct drm_connector *connector,
@@ -243,5 +254,7 @@ int hibmc_dp_init(struct hibmc_drm_private *priv)
connector->polled = DRM_CONNECTOR_POLL_HPD;
+ dp->phys_state = connector_status_disconnected;
+
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..6abb49b5107b 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -31,6 +31,7 @@ struct hibmc_vdac {
struct drm_connector connector;
struct i2c_adapter adapter;
struct i2c_algo_bit_data bit_data;
+ int phys_state;
};
struct hibmc_drm_private {
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 841e81f47b68..806d54120d89 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -25,27 +25,20 @@
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;
+ int count = 0;
- drm_edid = drm_edid_read_ddc(connector, &vdac->adapter);
+ if (vdac->phys_state == connector_status_connected)
+ count = drm_connector_helper_get_modes(connector);
- drm_edid_connector_update(connector, drm_edid);
-
- if (drm_edid) {
- count = drm_edid_connector_add_modes(connector);
- if (count)
- goto out;
- }
+ if (count > 0)
+ return count;
+ 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);
-out:
- drm_edid_free(drm_edid);
-
return count;
}
@@ -57,10 +50,32 @@ 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);
+
+ vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
+ ctx, force);
+
+ /* If the DP connectors are disconnected, the hibmc_vdac_detect function
+ * must return a connected state to ensure KVM display functionality.
+ * Additionally, for previous-generation products that may lack hardware
+ * link support and thus cannot detect the monitor, hibmc_vdac_detect
+ * should also return a connected state.
+ */
+ if (priv->dp.phys_state != connector_status_connected)
+ return connector_status_connected;
+
+ return vdac->phys_state;
+}
+
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 = {
@@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
+ vdac->phys_state = connector_status_connected;
+
return 0;
err:
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH for drm-misc-fixes v4 3/4] drm/hisilicon/hibmc: move display contrl config to hibmc_probe()
2026-04-16 9:24 [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 1/4] drm/hisilicon/hibmc: add updating link cap in DP detect() Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
@ 2026-04-16 9:24 ` Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 4/4] drm/hisilicon/hibmc: use clock to look up the PLL value Yongbang Shi
3 siblings, 0 replies; 13+ messages in thread
From: Yongbang Shi @ 2026-04-16 9:24 UTC (permalink / raw)
To: tzimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, helin52,
shenjian15, shaojijie, dri-devel, linux-kernel
From: Lin He <helin52@huawei.com>
If there's no VGA output, this encoder modeset won't be called, which
will cause displaying data from GPU being cut off. It's actually a
common display config for DP and VGA, so move the vdac encoder modeset
to driver load stage.
Fixes: 5294967f4ae4 ("drm/hisilicon/hibmc: Add support for VDAC")
Signed-off-by: Lin He <helin52@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v1 -> v2:
- remove tag "Reviewed-by: Tao Tian <tiantao6@hisilicon.com>", witch will
be given in public.
- add 'drm-misc-fixes' in subject prefix.
---
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 ++++++++++++
.../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 22 -------------------
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 289304500ab0..c7ce44a5370b 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -214,6 +214,18 @@ void hibmc_set_current_gate(struct hibmc_drm_private *priv, unsigned int gate)
writel(gate, mmio + gate_reg);
}
+static void hibmc_display_ctrl(struct hibmc_drm_private *priv)
+{
+ u32 reg;
+
+ reg = readl(priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
+ reg |= HIBMC_DISPLAY_CONTROL_FPVDDEN(1);
+ reg |= HIBMC_DISPLAY_CONTROL_PANELDATE(1);
+ reg |= HIBMC_DISPLAY_CONTROL_FPEN(1);
+ reg |= HIBMC_DISPLAY_CONTROL_VBIASEN(1);
+ writel(reg, priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
+}
+
static void hibmc_hw_config(struct hibmc_drm_private *priv)
{
u32 reg;
@@ -245,6 +257,8 @@ static void hibmc_hw_config(struct hibmc_drm_private *priv)
reg |= HIBMC_MSCCTL_LOCALMEM_RESET(1);
writel(reg, priv->mmio + HIBMC_MISC_CTRL);
+
+ hibmc_display_ctrl(priv);
}
static int hibmc_hw_map(struct hibmc_drm_private *priv)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 806d54120d89..f5c7857c6586 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -86,26 +86,6 @@ static const struct drm_connector_funcs hibmc_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
-static void hibmc_encoder_mode_set(struct drm_encoder *encoder,
- struct drm_display_mode *mode,
- struct drm_display_mode *adj_mode)
-{
- u32 reg;
- struct drm_device *dev = encoder->dev;
- struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
-
- reg = readl(priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
- reg |= HIBMC_DISPLAY_CONTROL_FPVDDEN(1);
- reg |= HIBMC_DISPLAY_CONTROL_PANELDATE(1);
- reg |= HIBMC_DISPLAY_CONTROL_FPEN(1);
- reg |= HIBMC_DISPLAY_CONTROL_VBIASEN(1);
- writel(reg, priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE);
-}
-
-static const struct drm_encoder_helper_funcs hibmc_encoder_helper_funcs = {
- .mode_set = hibmc_encoder_mode_set,
-};
-
int hibmc_vdac_init(struct hibmc_drm_private *priv)
{
struct drm_device *dev = &priv->dev;
@@ -128,8 +108,6 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
goto err;
}
- drm_encoder_helper_add(encoder, &hibmc_encoder_helper_funcs);
-
ret = drm_connector_init_with_ddc(dev, connector,
&hibmc_connector_funcs,
DRM_MODE_CONNECTOR_VGA,
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH for drm-misc-fixes v4 4/4] drm/hisilicon/hibmc: use clock to look up the PLL value
2026-04-16 9:24 [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver Yongbang Shi
` (2 preceding siblings ...)
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 3/4] drm/hisilicon/hibmc: move display contrl config to hibmc_probe() Yongbang Shi
@ 2026-04-16 9:24 ` Yongbang Shi
3 siblings, 0 replies; 13+ messages in thread
From: Yongbang Shi @ 2026-04-16 9:24 UTC (permalink / raw)
To: tzimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, shiyongbang, helin52,
shenjian15, shaojijie, dri-devel, linux-kernel
From: Lin He <helin52@huawei.com>
In the past, we use width and height to look up our PLL value.
But actually the actual clock check is also necessnary. There are
some resolutions that width and height same, but its clock different.
Add the clock check when using pll_table to determine the PLL value.
Fixes: da52605eea8f ("drm/hisilicon/hibmc: Add support for display engine")
Signed-off-by: Lin He <helin52@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
---
ChangeLog:
v2 -> v3:
- remove unused macro CLOCK_TOLERANCE.
v1 -> v2:
- remove tag "Reviewed-by: Tao Tian <tiantao6@hisilicon.com>", witch will
be given in public.
- add 'drm-misc-fixes' in subject prefix.
---
.../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 78 +++++++++++--------
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index 89bed78f1466..1a07e8146eee 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -32,26 +32,43 @@ struct hibmc_display_panel_pll {
struct hibmc_dislay_pll_config {
u64 hdisplay;
u64 vdisplay;
+ int clock;
u32 pll1_config_value;
u32 pll2_config_value;
};
static const struct hibmc_dislay_pll_config hibmc_pll_table[] = {
- {640, 480, CRT_PLL1_HS_25MHZ, CRT_PLL2_HS_25MHZ},
- {800, 600, CRT_PLL1_HS_40MHZ, CRT_PLL2_HS_40MHZ},
- {1024, 768, CRT_PLL1_HS_65MHZ, CRT_PLL2_HS_65MHZ},
- {1152, 864, CRT_PLL1_HS_80MHZ_1152, CRT_PLL2_HS_80MHZ},
- {1280, 768, CRT_PLL1_HS_80MHZ, CRT_PLL2_HS_80MHZ},
- {1280, 720, CRT_PLL1_HS_74MHZ, CRT_PLL2_HS_74MHZ},
- {1280, 960, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
- {1280, 1024, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
- {1440, 900, CRT_PLL1_HS_106MHZ, CRT_PLL2_HS_106MHZ},
- {1600, 900, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
- {1600, 1200, CRT_PLL1_HS_162MHZ, CRT_PLL2_HS_162MHZ},
- {1920, 1080, CRT_PLL1_HS_148MHZ, CRT_PLL2_HS_148MHZ},
- {1920, 1200, CRT_PLL1_HS_193MHZ, CRT_PLL2_HS_193MHZ},
+ {640, 480, 25000, CRT_PLL1_HS_25MHZ, CRT_PLL2_HS_25MHZ},
+ {800, 600, 40000, CRT_PLL1_HS_40MHZ, CRT_PLL2_HS_40MHZ},
+ {1024, 768, 65000, CRT_PLL1_HS_65MHZ, CRT_PLL2_HS_65MHZ},
+ {1152, 864, 78750, CRT_PLL1_HS_80MHZ_1152, CRT_PLL2_HS_80MHZ},
+ {1280, 768, 80000, CRT_PLL1_HS_80MHZ, CRT_PLL2_HS_80MHZ},
+ {1280, 720, 74375, CRT_PLL1_HS_74MHZ, CRT_PLL2_HS_74MHZ},
+ {1280, 960, 108000, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
+ {1280, 1024, 108000, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
+ {1440, 900, 105952, CRT_PLL1_HS_106MHZ, CRT_PLL2_HS_106MHZ},
+ {1600, 900, 108000, CRT_PLL1_HS_108MHZ, CRT_PLL2_HS_108MHZ},
+ {1600, 1200, 162500, CRT_PLL1_HS_162MHZ, CRT_PLL2_HS_162MHZ},
+ {1920, 1080, 148750, CRT_PLL1_HS_148MHZ, CRT_PLL2_HS_148MHZ},
+ {1920, 1200, 193750, CRT_PLL1_HS_193MHZ, CRT_PLL2_HS_193MHZ},
};
+static int hibmc_get_best_clock_idx(const struct drm_display_mode *mode)
+{
+ int i, diff;
+
+ for (i = 0; i < ARRAY_SIZE(hibmc_pll_table); i++) {
+ if (hibmc_pll_table[i].hdisplay == mode->hdisplay &&
+ hibmc_pll_table[i].vdisplay == mode->vdisplay) {
+ diff = abs(mode->clock - hibmc_pll_table[i].clock);
+ if (diff < mode->clock / 100) /* tolerance 1/100 */
+ return i;
+ }
+ }
+
+ return -EOPNOTSUPP;
+}
+
static int hibmc_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{
@@ -214,17 +231,13 @@ static enum drm_mode_status
hibmc_crtc_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode)
{
- size_t i = 0;
int vrefresh = drm_mode_vrefresh(mode);
if (vrefresh < 59 || vrefresh > 61)
return MODE_NOCLOCK;
- for (i = 0; i < ARRAY_SIZE(hibmc_pll_table); i++) {
- if (hibmc_pll_table[i].hdisplay == mode->hdisplay &&
- hibmc_pll_table[i].vdisplay == mode->vdisplay)
- return MODE_OK;
- }
+ if (hibmc_get_best_clock_idx(mode) >= 0)
+ return MODE_OK;
return MODE_BAD;
}
@@ -281,23 +294,20 @@ static void set_vclock_hisilicon(struct drm_device *dev, u64 pll)
writel(val, priv->mmio + CRT_PLL1_HS);
}
-static void get_pll_config(u64 x, u64 y, u32 *pll1, u32 *pll2)
+static void get_pll_config(struct drm_display_mode *mode, u32 *pll1, u32 *pll2)
{
- size_t i;
- size_t count = ARRAY_SIZE(hibmc_pll_table);
-
- for (i = 0; i < count; i++) {
- if (hibmc_pll_table[i].hdisplay == x &&
- hibmc_pll_table[i].vdisplay == y) {
- *pll1 = hibmc_pll_table[i].pll1_config_value;
- *pll2 = hibmc_pll_table[i].pll2_config_value;
- return;
- }
+ int idx;
+
+ idx = hibmc_get_best_clock_idx(mode);
+ if (idx < 0) {
+ /* if found none, we use default value */
+ *pll1 = CRT_PLL1_HS_25MHZ;
+ *pll2 = CRT_PLL2_HS_25MHZ;
+ return;
}
- /* if found none, we use default value */
- *pll1 = CRT_PLL1_HS_25MHZ;
- *pll2 = CRT_PLL2_HS_25MHZ;
+ *pll1 = hibmc_pll_table[idx].pll1_config_value;
+ *pll2 = hibmc_pll_table[idx].pll2_config_value;
}
/*
@@ -319,7 +329,7 @@ static u32 display_ctrl_adjust(struct drm_device *dev,
x = mode->hdisplay;
y = mode->vdisplay;
- get_pll_config(x, y, &pll1, &pll2);
+ get_pll_config(mode, &pll1, &pll2);
writel(pll2, priv->mmio + CRT_PLL2_HS);
set_vclock_hisilicon(dev, pll1);
--
2.33.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
@ 2026-04-17 7:54 ` Thomas Zimmermann
2026-04-20 8:40 ` Yongbang Shi
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Zimmermann @ 2026-04-17 7:54 UTC (permalink / raw)
To: Yongbang Shi, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel
Hi
Am 16.04.26 um 11:24 schrieb Yongbang Shi:
> From: Lin He <helin52@huawei.com>
>
> Our chip support KVM over IP feature, so hibmc driver need to support
> displaying without any connectors plugged in. If no connectors are
> connected, the vdac connector status should be set to 'connected' to
> ensure proper KVM display functionality. Additionally, for
> previous-generation products that may lack hardware link support and
> thus cannot detect the monitor, the same approach should be applied
> to ensure VGA display functionality. Add phys_state in the struct of
> dp and vdac 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")
> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> Closes: https://lore.kernel.org/all/0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de/
The bug I reported is that the DDC does not return an EDID at all.
Therefore hibmc fails to detect the connected VGA monitor. AFAIU that's
not what is being fixed in this patch.
> Signed-off-by: Lin He <helin52@huawei.com>
> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
> ---
[...]
> +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);
> +
> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
> + ctx, force);
> +
> + /* If the DP connectors are disconnected, the hibmc_vdac_detect function
> + * must return a connected state to ensure KVM display functionality.
> + * Additionally, for previous-generation products that may lack hardware
> + * link support and thus cannot detect the monitor, hibmc_vdac_detect
> + * should also return a connected state.
> + */
> + if (priv->dp.phys_state != connector_status_connected)
> + return connector_status_connected;
> +
> + return vdac->phys_state;
This will break user-space compositors if DP and VGA are connected at
the same time. I know, because we had such logic in ast and mgag200.
Today's compositors expect a single encoder-connector pair on each CRTC.
That's what most contemporary hardware provides. But the server
chipsets usually come with one a single CRTC and multiple connectors
attached to it. Compositors fail to configure that. When we had this in
ast and mgag200, Gnome would display garbage to the screen and
mode-setting would fail. The bug report is at [1].
In ast and mgag200, only one connector would be installed on a single
system. So we could avoid the problem. It looks like that this is not an
option with hibmc. VGA always seems to be present and DP seems optional.
I would advice to only report one of the connectors as 'connected' if
both are installed on a system.
You also need to increment the connector's epoch_counter if the physical
status changed. Doing this will trigger DRM clients to re-read the
connector state and reconfigure display.
Something like that
dp_detect()
{
dp.phys_state = detect_from_hw()
if (dp.phys_state changed)
++epoch_counter
return connected
}
vdac_detect()
{
if (dp.phys_state == connected)
return disconnected
vdac.phys_state = detect_from_hw()
if (vdac.phys_state changed)
++epoch_counter
return connected
}
This handles the KVM in each connector's helper. The ast driver is
probably the best reference for the current logic. See [2].
[1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
[2]
https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L47
Best regards
Thomas
> +}
> +
> 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 = {
> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>
> connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
>
> + vdac->phys_state = connector_status_connected;
> +
> return 0;
>
> err:
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-17 7:54 ` Thomas Zimmermann
@ 2026-04-20 8:40 ` Yongbang Shi
2026-04-20 9:32 ` Thomas Zimmermann
0 siblings, 1 reply; 13+ messages in thread
From: Yongbang Shi @ 2026-04-20 8:40 UTC (permalink / raw)
To: Thomas Zimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel, shiyongbang
> Hi
>
> Am 16.04.26 um 11:24 schrieb Yongbang Shi:
>> From: Lin He <helin52@huawei.com>
>>
>> Our chip support KVM over IP feature, so hibmc driver need to support
>> displaying without any connectors plugged in. If no connectors are
>> connected, the vdac connector status should be set to 'connected' to
>> ensure proper KVM display functionality. Additionally, for
>> previous-generation products that may lack hardware link support and
>> thus cannot detect the monitor, the same approach should be applied
>> to ensure VGA display functionality. Add phys_state in the struct of
>> dp and vdac 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")
>> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Closes: https://lore.kernel.org/
>> all/0eb5c509-2724-4c57-87ad-74e4270d5a5a@suse.de/
>
> The bug I reported is that the DDC does not return an EDID at all.
> Therefore hibmc fails to detect the connected VGA monitor. AFAIU that's
> not what is being fixed in this patch.
>
The actual root cause of this bug lies in the board design of older
Huawei servers, where the chip's DDC I2C link was not connected to the
VGA port. There is no way to resolve this issue of being unable to
retrieve the EDID unless the hardware of the existing board is modified.
In the previous hibmc-drm driver, the
`drm_connector_helper_funcs.detect_ctx` callback function was not
registered, see kernel version 6.12.82 at[1], As a result, the DRM
framework returned “connected” by default. Even if no EDID was read, the
display would use the default resolution set in the hibmc-drm driver.
This is why the kernel version prior to the one you reported this bug in
was able to display properly.
However, in this patch[2], we modified this logic by hooking the
`drm_connector_helper_detect_from_ddc` function to the VDAC’s
`detect_ctx` callback. This function determines connectivity based on
whether an EDID is read, which resulted in older servers being unable to
display anything.
From the patch you contributed,,I understand that you are using an
RH1288H V3 server. I have confirmed with our chief hardware engineer
that the board design for this series of servers does not connect the
BMC chip’s DDC I2C to the VGA port.
[1]https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c?h=v6.12.82#L60
[2]https://lore.kernel.org/all/20250320101455.2538835-10-shiyongbang@huawei.com/
>> Signed-off-by: Lin He <helin52@huawei.com>
>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>> ---
> [...]
>> +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);
>> +
>> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
>> + ctx, force);
>> +
>> + /* If the DP connectors are disconnected, the hibmc_vdac_detect
>> function
>> + * must return a connected state to ensure KVM display
>> functionality.
>> + * Additionally, for previous-generation products that may lack
>> hardware
>> + * link support and thus cannot detect the monitor,
>> hibmc_vdac_detect
>> + * should also return a connected state.
>> + */
>> + if (priv->dp.phys_state != connector_status_connected)
>> + return connector_status_connected;
>> +
>> + return vdac->phys_state;
>
> This will break user-space compositors if DP and VGA are connected at
> the same time. I know, because we had such logic in ast and mgag200.
>
> Today's compositors expect a single encoder-connector pair on each CRTC.
> That's what most contemporary hardware provides. But the server
> chipsets usually come with one a single CRTC and multiple connectors
> attached to it. Compositors fail to configure that. When we had this in
> ast and mgag200, Gnome would display garbage to the screen and mode-
> setting would fail. The bug report is at [1].
>
> In ast and mgag200, only one connector would be installed on a single
> system. So we could avoid the problem. It looks like that this is not an
> option with hibmc. VGA always seems to be present and DP seems optional.
> I would advice to only report one of the connectors as 'connected' if
> both are installed on a system.
>
According to our BMC chip specifications, both VGA and DisplayPort
outputs are required, but only one connection is allowed at a time,
which seems impractical.
Do you have any additional details regarding this issue with the Mutter
synthesizer? For example, steps to reproduce the issue or more specific
alert logs. I looked at the issue you submitted to Mutter, which
describes the phenomenon as "a warning that the configuration is
incompatible", Could you clarify what this warning specifically refers
to—is it a message displayed on the screen, or is it a specific entry in
the logs?
Over the next few days, we will focus on testing relevant scenarios
while setting both the VGA and DP ports to `connected` to see if we
encounter similar issues or warnings.
> You also need to increment the connector's epoch_counter if the physical
> status changed. Doing this will trigger DRM clients to re-read the
> connector state and reconfigure display.
>
> Something like that
>
> dp_detect()
> {
> dp.phys_state = detect_from_hw()
>
> if (dp.phys_state changed)
> ++epoch_counter
> return connected
> }
>
> vdac_detect()
> {
> if (dp.phys_state == connected)
> return disconnected
>
Only one option is displayed here, but it does not meet our specifications.
> vdac.phys_state = detect_from_hw()
>
> if (vdac.phys_state changed)
> ++epoch_counter
> return connected
> }
>
> This handles the KVM in each connector's helper. The ast driver is
> probably the best reference for the current logic. See [2].
>
I looked at the implementations of `detect_ctx` in ATS and MGAG200;
these implementations generally always return `connected`.
If my analysis is correct, the logic should be as follows:
- If the `detect_ctx` function implemented by each vendor returns the
actual hardware state, there is no need to modify `epoch_counter`;
the DRM framework will execute `epoch_counter++` based on the return
value of the `detect_ctx` function;
- If the `detect_ctx` function in a vendor’s code always returns
`connected`, then `epoch_counter++` must be performed within the
vendor’s `detect_ctx` function; the implementations in ATS and
MGAG200 appear to be like this;
Here is the pseudocode for our current logic. This logic is indeed a bit
hard to grasp, so I've added some more comments; it might be a bit
clearer than the patch:
dp_detect()
{
dp.phys_state = detect_from_hw()
/* epoch_counter update by drm framework */
return dp.phys_state;
}
vdac_detect()
{
/*
* Scene 1: The driver runs on an older version of the BMC chip,
* and `dp.phys_state` is initialized to 0. To maintain
* consistency with the previous hibmc-drm driver
* logic, always return `connected`.
* Scene 2: The driver runs on an new version of the BMC chip,
* and `dp.phys_state` is real status, witch is real
* `disconnect`. In this scenario, we must ensure that
* the VGA is `connected` to guarantee that the KVM
* displays properly.
*/
if (dp.phys_state != connected)
return connected;
/*
* DP is connected: This driver is definitely running on the
* latest BMC chip, and the DDC I2C is definitely
* connected to the VGA port, so we can confirm whether
* the VGA is present by reading the EDID directly via
* I2C.
*/
vdac.phys_state = detect_from_hw()
/* epoch_counter update by drm framework */
return vdac.phys_state;
}
Sorry for the delay; it took me a little while to figure out how best to
explain this bug and our current implementation.
Thanks,
Yongbang.
> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
> ast_vga.c#L47
>
> Best regards
> Thomas
>
>> +}
>> +
>> 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 = {
>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>> DRM_CONNECTOR_POLL_DISCONNECT;
>> + vdac->phys_state = connector_status_connected;
>> +
>> return 0;
>> err:
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-20 8:40 ` Yongbang Shi
@ 2026-04-20 9:32 ` Thomas Zimmermann
2026-04-20 14:00 ` Yongbang Shi
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Zimmermann @ 2026-04-20 9:32 UTC (permalink / raw)
To: Yongbang Shi, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel
Hi
Am 20.04.26 um 10:40 schrieb Yongbang Shi:
[...]
>
> From the patch you contributed,,I understand that you are using an
> RH1288H V3 server. I have confirmed with our chief hardware engineer
> that the board design for this series of servers does not connect the
> BMC chip’s DDC I2C to the VGA port.
Thanks a lot for double-checking. That's the info I was missing. I
suggest to build a workaround into the driver to filter out these boards
and always return 'connected' on them. IIUC even with these new
callbacks, the driver would not work as expected.
>
> [1]https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c?h=v6.12.82#L60
> [2]https://lore.kernel.org/all/20250320101455.2538835-10-shiyongbang@huawei.com/
>
>
>>> Signed-off-by: Lin He <helin52@huawei.com>
>>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>>> ---
>> [...]
>>> +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);
>>> +
>>> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
>>> + ctx, force);
>>> +
>>> + /* If the DP connectors are disconnected, the hibmc_vdac_detect
>>> function
>>> + * must return a connected state to ensure KVM display
>>> functionality.
>>> + * Additionally, for previous-generation products that may lack
>>> hardware
>>> + * link support and thus cannot detect the monitor,
>>> hibmc_vdac_detect
>>> + * should also return a connected state.
>>> + */
>>> + if (priv->dp.phys_state != connector_status_connected)
>>> + return connector_status_connected;
>>> +
>>> + return vdac->phys_state;
>> This will break user-space compositors if DP and VGA are connected at
>> the same time. I know, because we had such logic in ast and mgag200.
>>
>> Today's compositors expect a single encoder-connector pair on each CRTC.
>> That's what most contemporary hardware provides. But the server
>> chipsets usually come with one a single CRTC and multiple connectors
>> attached to it. Compositors fail to configure that. When we had this in
>> ast and mgag200, Gnome would display garbage to the screen and mode-
>> setting would fail. The bug report is at [1].
>>
>> In ast and mgag200, only one connector would be installed on a single
>> system. So we could avoid the problem. It looks like that this is not an
>> option with hibmc. VGA always seems to be present and DP seems optional.
>> I would advice to only report one of the connectors as 'connected' if
>> both are installed on a system.
>>
> According to our BMC chip specifications, both VGA and DisplayPort
> outputs are required, but only one connection is allowed at a time,
> which seems impractical.
That's true.
Yet it needs support form user space to make it work. It's not a kernel
problem.
>
> Do you have any additional details regarding this issue with the Mutter
> synthesizer? For example, steps to reproduce the issue or more specific
> alert logs. I looked at the issue you submitted to Mutter, which
> describes the phenomenon as "a warning that the configuration is
> incompatible", Could you clarify what this warning specifically refers
> to—is it a message displayed on the screen, or is it a specific entry in
> the logs?
In ast, we used to have at least one connector for the physical output
and another connector for the BMC/KVM. Running Gnome and opening the
Settings app did not work correctly. One issue is that display
configuration could not be changed in Gnome. That's the reported error
of changes not being applicable.
IIRC I've also seen distorted output if I really pushed it. But maybe
that has meanwhile been mitigated.
I've been told that other compositors also don't support this scenario well.
I think you'd run into this case once someone connects the DP and VGA at
the same time.
>
> Over the next few days, we will focus on testing relevant scenarios
> while setting both the VGA and DP ports to `connected` to see if we
> encounter similar issues or warnings.
>
>> You also need to increment the connector's epoch_counter if the physical
>> status changed. Doing this will trigger DRM clients to re-read the
>> connector state and reconfigure display.
>>
>> Something like that
>>
>> dp_detect()
>> {
>> dp.phys_state = detect_from_hw()
>>
>> if (dp.phys_state changed)
>> ++epoch_counter
>> return connected
>> }
>>
>> vdac_detect()
>> {
>> if (dp.phys_state == connected)
>> return disconnected
>>
> Only one option is displayed here, but it does not meet our specifications.
>
>> vdac.phys_state = detect_from_hw()
>>
>> if (vdac.phys_state changed)
>> ++epoch_counter
>> return connected
>> }
>>
>> This handles the KVM in each connector's helper. The ast driver is
>> probably the best reference for the current logic. See [2].
>>
> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
> these implementations generally always return `connected`.
>
> If my analysis is correct, the logic should be as follows:
> - If the `detect_ctx` function implemented by each vendor returns the
> actual hardware state, there is no need to modify `epoch_counter`;
> the DRM framework will execute `epoch_counter++` based on the return
> value of the `detect_ctx` function;
>
> - If the `detect_ctx` function in a vendor’s code always returns
> `connected`, then `epoch_counter++` must be performed within the
> vendor’s `detect_ctx` function; the implementations in ATS and
> MGAG200 appear to be like this;
Exactly. In ast/mgag200, we had the case that the VGA got disconnected.
We'd still return connected, as the BMC/KVM was present. We now had to
reconfigure for the KVM. That requires modifying epoch_counter. You can
see at [1] that we only increment if the physical status changes. [1]
Same goes for re-connecting the VGA display.
[1]
https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>
>
> Here is the pseudocode for our current logic. This logic is indeed a bit
> hard to grasp, so I've added some more comments; it might be a bit
> clearer than the patch:
>
> dp_detect()
> {
> dp.phys_state = detect_from_hw()
>
> /* epoch_counter update by drm framework */
> return dp.phys_state;
> }
>
> vdac_detect()
> {
> /*
> * Scene 1: The driver runs on an older version of the BMC chip,
> * and `dp.phys_state` is initialized to 0. To maintain
> * consistency with the previous hibmc-drm driver
> * logic, always return `connected`.
> * Scene 2: The driver runs on an new version of the BMC chip,
> * and `dp.phys_state` is real status, witch is real
> * `disconnect`. In this scenario, we must ensure that
> * the VGA is `connected` to guarantee that the KVM
> * displays properly.
> */
> if (dp.phys_state != connected)
> return connected;
>
> /*
> * DP is connected: This driver is definitely running on the
> * latest BMC chip, and the DDC I2C is definitely
> * connected to the VGA port, so we can confirm whether
> * the VGA is present by reading the EDID directly via
> * I2C.
> */
> vdac.phys_state = detect_from_hw()
>
> /* epoch_counter update by drm framework */
> return vdac.phys_state;
Let's assume the DP is disconnected. If VGA's physical status goes from
connected to disconnected, user space will not know that it needs to
reconfigure for the BMC. (or vice versa)
To give you some context from earlier discussions around the other
drivers: We had the scenario that the user boots up without a connected
VGA display. This would enable the BMC, which sometimes picks a large
resolution; say >2k per dimension. That is problematic for KVM over
networks. And if the user now plugs in a physical VGA display, they
would be stuck with the large resolution on the framebuffer console.
Maybe the VGA display wouldn't even support such a high-res mode. So we
set the default for the BMC to 1024x768. That is well manageable for all
of today's VGA displays and does not impose too much overhead for KVM
over networks. As a drawback, it's a bit small on monitors and not nice
to look at. So we modify epoch_counter whenever the physical status
changes. This triggers compositors to reconfigure their screens for the
new display.
Best regards
Thomas
> }
>
> Sorry for the delay; it took me a little while to figure out how best to
> explain this bug and our current implementation.
>
> Thanks,
> Yongbang.
>
>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>> ast_vga.c#L47
>>
>> Best regards
>> Thomas
>>
>>> +}
>>> +
>>> 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 = {
>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>> + vdac->phys_state = connector_status_connected;
>>> +
>>> return 0;
>>> err:
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-20 9:32 ` Thomas Zimmermann
@ 2026-04-20 14:00 ` Yongbang Shi
2026-04-20 14:54 ` Thomas Zimmermann
0 siblings, 1 reply; 13+ messages in thread
From: Yongbang Shi @ 2026-04-20 14:00 UTC (permalink / raw)
To: Thomas Zimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel, shiyongbang
> Hi
>
> Am 20.04.26 um 10:40 schrieb Yongbang Shi:
> [...]
>>
>> From the patch you contributed,,I understand that you are using an
>> RH1288H V3 server. I have confirmed with our chief hardware engineer
>> that the board design for this series of servers does not connect the
>> BMC chip’s DDC I2C to the VGA port.
>
> Thanks a lot for double-checking. That's the info I was missing. I suggest to build a workaround into the driver to
> filter out these boards and always return 'connected' on them. IIUC even with these new callbacks, the driver would not
> work as expected.
>
Our BMC chips can distinguish between generations, but since BMC chips of the same generation are used on many different
boards, filtering by board type or board id is not feasible. We can only determine whether DDC I2C is present by
comparing BMC chips of different generations. We have mandated that the board implementation must connect to DDC I2C on
the latest BMC chip.
>>
>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/hisilicon/hibmc/
>> hibmc_drm_vdac.c?h=v6.12.82#L60
>> [2]https://lore.kernel.org/all/20250320101455.2538835-10-shiyongbang@huawei.com/
>>
>>
>>>> Signed-off-by: Lin He <helin52@huawei.com>
>>>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>>>> ---
>>> [...]
>>>> +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);
>>>> +
>>>> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
>>>> + ctx, force);
>>>> +
>>>> + /* If the DP connectors are disconnected, the hibmc_vdac_detect
>>>> function
>>>> + * must return a connected state to ensure KVM display
>>>> functionality.
>>>> + * Additionally, for previous-generation products that may lack
>>>> hardware
>>>> + * link support and thus cannot detect the monitor,
>>>> hibmc_vdac_detect
>>>> + * should also return a connected state.
>>>> + */
>>>> + if (priv->dp.phys_state != connector_status_connected)
>>>> + return connector_status_connected;
>>>> +
>>>> + return vdac->phys_state;
>>> This will break user-space compositors if DP and VGA are connected at
>>> the same time. I know, because we had such logic in ast and mgag200.
>>>
>>> Today's compositors expect a single encoder-connector pair on each CRTC.
>>> That's what most contemporary hardware provides. But the server
>>> chipsets usually come with one a single CRTC and multiple connectors
>>> attached to it. Compositors fail to configure that. When we had this in
>>> ast and mgag200, Gnome would display garbage to the screen and mode-
>>> setting would fail. The bug report is at [1].
>>>
>>> In ast and mgag200, only one connector would be installed on a single
>>> system. So we could avoid the problem. It looks like that this is not an
>>> option with hibmc. VGA always seems to be present and DP seems optional.
>>> I would advice to only report one of the connectors as 'connected' if
>>> both are installed on a system.
>>>
>> According to our BMC chip specifications, both VGA and DisplayPort
>> outputs are required, but only one connection is allowed at a time,
>> which seems impractical.
>
> That's true.
>
> Yet it needs support form user space to make it work. It's not a kernel problem.
>
>>
>> Do you have any additional details regarding this issue with the Mutter
>> synthesizer? For example, steps to reproduce the issue or more specific
>> alert logs. I looked at the issue you submitted to Mutter, which
>> describes the phenomenon as "a warning that the configuration is
>> incompatible", Could you clarify what this warning specifically refers
>> to—is it a message displayed on the screen, or is it a specific entry in
>> the logs?
>
> In ast, we used to have at least one connector for the physical output and another connector for the BMC/KVM. Running
> Gnome and opening the Settings app did not work correctly. One issue is that display configuration could not be changed
> in Gnome. That's the reported error of changes not being applicable.
>
Great, regarding hibmc-drm's support for DP, my initial idea was also to create separate connectors for DP, VGA, and
KVM. However, due to some non-technical reasons, that approach wasn't implemented. Since ast has implemented it this
way, we can also consider this solution.
> IIRC I've also seen distorted output if I really pushed it. But maybe that has meanwhile been mitigated.
>
> I've been told that other compositors also don't support this scenario well.
>
> I think you'd run into this case once someone connects the DP and VGA at the same time.
>
Okay, I understand. However, so far, we have thoroughly tested the scenario where both connector0 (VGA shared with KVM)
and connector1 (DP) are displaying at the same time, and we haven’t encountered any similar issues.
I will create a dedicated connector for the KVM and conduct the necessary tests to test for this scenario.
>>
>> Over the next few days, we will focus on testing relevant scenarios
>> while setting both the VGA and DP ports to `connected` to see if we
>> encounter similar issues or warnings.
>>
>>> You also need to increment the connector's epoch_counter if the physical
>>> status changed. Doing this will trigger DRM clients to re-read the
>>> connector state and reconfigure display.
>>>
>>> Something like that
>>>
>>> dp_detect()
>>> {
>>> dp.phys_state = detect_from_hw()
>>>
>>> if (dp.phys_state changed)
>>> ++epoch_counter
>>> return connected
>>> }
>>>
>>> vdac_detect()
>>> {
>>> if (dp.phys_state == connected)
>>> return disconnected
>>>
>> Only one option is displayed here, but it does not meet our specifications.
>>
>>> vdac.phys_state = detect_from_hw()
>>>
>>> if (vdac.phys_state changed)
>>> ++epoch_counter
>>> return connected
>>> }
>>>
>>> This handles the KVM in each connector's helper. The ast driver is
>>> probably the best reference for the current logic. See [2].
>>>
>> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
>> these implementations generally always return `connected`.
>>
>> If my analysis is correct, the logic should be as follows:
>> - If the `detect_ctx` function implemented by each vendor returns the
>> actual hardware state, there is no need to modify `epoch_counter`;
>> the DRM framework will execute `epoch_counter++` based on the return
>> value of the `detect_ctx` function;
>>
>> - If the `detect_ctx` function in a vendor’s code always returns
>> `connected`, then `epoch_counter++` must be performed within the
>> vendor’s `detect_ctx` function; the implementations in ATS and
>> MGAG200 appear to be like this;
>
> Exactly. In ast/mgag200, we had the case that the VGA got disconnected. We'd still return connected, as the BMC/KVM was
> present. We now had to reconfigure for the KVM. That requires modifying epoch_counter. You can see at [1] that we only
> increment if the physical status changes. [1] Same goes for re-connecting the VGA display.
>
> [1] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>
>>
>>
>> Here is the pseudocode for our current logic. This logic is indeed a bit
>> hard to grasp, so I've added some more comments; it might be a bit
>> clearer than the patch:
>>
>> dp_detect()
>> {
>> dp.phys_state = detect_from_hw()
>>
>> /* epoch_counter update by drm framework */
>> return dp.phys_state;
>> }
>>
>> vdac_detect()
>> {
>> /*
>> * Scene 1: The driver runs on an older version of the BMC chip,
>> * and `dp.phys_state` is initialized to 0. To maintain
>> * consistency with the previous hibmc-drm driver
>> * logic, always return `connected`.
>> * Scene 2: The driver runs on an new version of the BMC chip,
>> * and `dp.phys_state` is real status, witch is real
>> * `disconnect`. In this scenario, we must ensure that
>> * the VGA is `connected` to guarantee that the KVM
>> * displays properly.
>> */
>> if (dp.phys_state != connected)
>> return connected;
>>
>> /*
>> * DP is connected: This driver is definitely running on the
>> * latest BMC chip, and the DDC I2C is definitely
>> * connected to the VGA port, so we can confirm whether
>> * the VGA is present by reading the EDID directly via
>> * I2C.
>> */
>> vdac.phys_state = detect_from_hw()
>>
>> /* epoch_counter update by drm framework */
>> return vdac.phys_state;
>
> Let's assume the DP is disconnected. If VGA's physical status goes from connected to disconnected, user space will not
> know that it needs to reconfigure for the BMC. (or vice versa)
>
> To give you some context from earlier discussions around the other drivers: We had the scenario that the user boots up
> without a connected VGA display. This would enable the BMC, which sometimes picks a large resolution; say >2k per
> dimension. That is problematic for KVM over networks. And if the user now plugs in a physical VGA display, they would be
> stuck with the large resolution on the framebuffer console. Maybe the VGA display wouldn't even support such a high-res
> mode. So we set the default for the BMC to 1024x768. That is well manageable for all of today's VGA displays and does
> not impose too much overhead for KVM over networks. As a drawback, it's a bit small on monitors and not nice to look
> at. So we modify epoch_counter whenever the physical status changes. This triggers compositors to reconfigure their
> screens for the new display.
>
Yes, this issue does exist. If we uses the `connector.polled` mechanism to monitor the VGA's presence in real time and
update the `epoch_counter`, which might resolve the issue. However, upon further consideration, I don't think this is
the optimal solution. If we create a separate connector for KVM and distinguish between older-generation BMC chips and
newer-generation BMC chips, the problem will be easily solved. In addition, DP and VGA, as well as VGA and KVM, will be
decoupled.
A temporary solution:
/* called by poll work */
vdac_detect()
{
/* Let’s examine this logic on its own to gain a better understanding. */
if (older-generation)
return connected;
vdac.phys_state = detect_from_hw();
if (vdac.phys_state changed)
++epoch_counter;
if (dp.phys_state != connected) {
return connected;
}
return vdac.phys_state;
}
A more elegant solution:
|--connector0(KVM): always connected, do not update epoch_counter.
|
crtc--|--connector1(VGA): detect real time by `connector.polled`, update epoch_counter.
|
|--connector1(DP): detect real time by hpd interrupt, update epoch_counter.
kvm_detect()
{
return connected;
}
/* called by poll work */
vdac_detect()
{
/* for older-generation */
if (older-generation)
return connected;
/* for newer-generation */
vdac.phys_state = detect_from_hw();
/* epoch_counter update by drm framework */
return vdac.phys_state;
}
dp_detect()
{
dp.phys_state = detect_from_hw();
/* epoch_counter update by drm framework */
return dp.phys_state;
}
Thanks,
Yongbang.
> Best regards
> Thomas
>
>> }
>>
>> Sorry for the delay; it took me a little while to figure out how best to
>> explain this bug and our current implementation.
>>
>> Thanks,
>> Yongbang.
>>
>>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>>> ast_vga.c#L47
>>>
>>> Best regards
>>> Thomas
>>>
>>>> +}
>>>> +
>>>> 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 = {
>>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>>> + vdac->phys_state = connector_status_connected;
>>>> +
>>>> return 0;
>>>> err:
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-20 14:00 ` Yongbang Shi
@ 2026-04-20 14:54 ` Thomas Zimmermann
2026-04-21 7:24 ` Yongbang Shi
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Zimmermann @ 2026-04-20 14:54 UTC (permalink / raw)
To: Yongbang Shi, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel
Hi
Am 20.04.26 um 16:00 schrieb Yongbang Shi:
>> Hi
>>
>> Am 20.04.26 um 10:40 schrieb Yongbang Shi:
>> [...]
>>> From the patch you contributed,,I understand that you are using an
>>> RH1288H V3 server. I have confirmed with our chief hardware engineer
>>> that the board design for this series of servers does not connect the
>>> BMC chip’s DDC I2C to the VGA port.
>> Thanks a lot for double-checking. That's the info I was missing. I suggest to build a workaround into the driver to
>> filter out these boards and always return 'connected' on them. IIUC even with these new callbacks, the driver would not
>> work as expected.
>>
> Our BMC chips can distinguish between generations, but since BMC chips of the same generation are used on many different
That's not really much of a problem. Just filter the older boards by
some board identifier and handle it separately. We use that all over the
kernel; including graphics drives. See for example DMI_MATCH. [1]
[1] https://elixir.bootlin.com/linux/v7.0/A/ident/DMI_MATCH
> boards, filtering by board type or board id is not feasible. We can only determine whether DDC I2C is present by
> comparing BMC chips of different generations. We have mandated that the board implementation must connect to DDC I2C on
> the latest BMC chip.
>
>>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/hisilicon/hibmc/
>>> hibmc_drm_vdac.c?h=v6.12.82#L60
>>> [2]https://lore.kernel.org/all/20250320101455.2538835-10-shiyongbang@huawei.com/
>>>
>>>
>>>>> Signed-off-by: Lin He <helin52@huawei.com>
>>>>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>>>>> ---
>>>> [...]
>>>>> +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);
>>>>> +
>>>>> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
>>>>> + ctx, force);
>>>>> +
>>>>> + /* If the DP connectors are disconnected, the hibmc_vdac_detect
>>>>> function
>>>>> + * must return a connected state to ensure KVM display
>>>>> functionality.
>>>>> + * Additionally, for previous-generation products that may lack
>>>>> hardware
>>>>> + * link support and thus cannot detect the monitor,
>>>>> hibmc_vdac_detect
>>>>> + * should also return a connected state.
>>>>> + */
>>>>> + if (priv->dp.phys_state != connector_status_connected)
>>>>> + return connector_status_connected;
>>>>> +
>>>>> + return vdac->phys_state;
>>>> This will break user-space compositors if DP and VGA are connected at
>>>> the same time. I know, because we had such logic in ast and mgag200.
>>>>
>>>> Today's compositors expect a single encoder-connector pair on each CRTC.
>>>> That's what most contemporary hardware provides. But the server
>>>> chipsets usually come with one a single CRTC and multiple connectors
>>>> attached to it. Compositors fail to configure that. When we had this in
>>>> ast and mgag200, Gnome would display garbage to the screen and mode-
>>>> setting would fail. The bug report is at [1].
>>>>
>>>> In ast and mgag200, only one connector would be installed on a single
>>>> system. So we could avoid the problem. It looks like that this is not an
>>>> option with hibmc. VGA always seems to be present and DP seems optional.
>>>> I would advice to only report one of the connectors as 'connected' if
>>>> both are installed on a system.
>>>>
>>> According to our BMC chip specifications, both VGA and DisplayPort
>>> outputs are required, but only one connection is allowed at a time,
>>> which seems impractical.
>> That's true.
>>
>> Yet it needs support form user space to make it work. It's not a kernel problem.
>>
>>> Do you have any additional details regarding this issue with the Mutter
>>> synthesizer? For example, steps to reproduce the issue or more specific
>>> alert logs. I looked at the issue you submitted to Mutter, which
>>> describes the phenomenon as "a warning that the configuration is
>>> incompatible", Could you clarify what this warning specifically refers
>>> to—is it a message displayed on the screen, or is it a specific entry in
>>> the logs?
>> In ast, we used to have at least one connector for the physical output and another connector for the BMC/KVM. Running
>> Gnome and opening the Settings app did not work correctly. One issue is that display configuration could not be changed
>> in Gnome. That's the reported error of changes not being applicable.
>>
> Great, regarding hibmc-drm's support for DP, my initial idea was also to create separate connectors for DP, VGA, and
> KVM. However, due to some non-technical reasons, that approach wasn't implemented. Since ast has implemented it this
> way, we can also consider this solution.
I added a connector for the KVM to ast, but it turned out to be a
mistake, as it triggered these user-space bugs. Hence the current design
in ast. The KVM isn't really a connector. It's more of a bridge, but
next to the CRTC instead of next to the connector; like this:
Plane -> CRTC -> KVM-bridge -> encoders -> connectors
We have no good way of modelling this pipeline in DRM.
In the case of ast and mgag200, the BMC also cannot be disabled. For a
real connector, one would expect that it can be disabled. This might
also confuse compositors.
>
>> IIRC I've also seen distorted output if I really pushed it. But maybe that has meanwhile been mitigated.
>>
>> I've been told that other compositors also don't support this scenario well.
>>
>> I think you'd run into this case once someone connects the DP and VGA at the same time.
>>
> Okay, I understand. However, so far, we have thoroughly tested the scenario where both connector0 (VGA shared with KVM)
> and connector1 (DP) are displaying at the same time, and we haven’t encountered any similar issues.
If this works for you, then let's keep it. I'm just trying to help you
avoid the pitfalls we have seen with other drivers.
>
> I will create a dedicated connector for the KVM and conduct the necessary tests to test for this scenario.
I think the design in the current patch is sound. It just needs to
increment epoch_count if the physical status changes; and it would
trigger these user-space bugs. But we can only work around the latter.
Best regards
Thomas
>
>>> Over the next few days, we will focus on testing relevant scenarios
>>> while setting both the VGA and DP ports to `connected` to see if we
>>> encounter similar issues or warnings.
>>>
>>>> You also need to increment the connector's epoch_counter if the physical
>>>> status changed. Doing this will trigger DRM clients to re-read the
>>>> connector state and reconfigure display.
>>>>
>>>> Something like that
>>>>
>>>> dp_detect()
>>>> {
>>>> dp.phys_state = detect_from_hw()
>>>>
>>>> if (dp.phys_state changed)
>>>> ++epoch_counter
>>>> return connected
>>>> }
>>>>
>>>> vdac_detect()
>>>> {
>>>> if (dp.phys_state == connected)
>>>> return disconnected
>>>>
>>> Only one option is displayed here, but it does not meet our specifications.
>>>
>>>> vdac.phys_state = detect_from_hw()
>>>>
>>>> if (vdac.phys_state changed)
>>>> ++epoch_counter
>>>> return connected
>>>> }
>>>>
>>>> This handles the KVM in each connector's helper. The ast driver is
>>>> probably the best reference for the current logic. See [2].
>>>>
>>> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
>>> these implementations generally always return `connected`.
>>>
>>> If my analysis is correct, the logic should be as follows:
>>> - If the `detect_ctx` function implemented by each vendor returns the
>>> actual hardware state, there is no need to modify `epoch_counter`;
>>> the DRM framework will execute `epoch_counter++` based on the return
>>> value of the `detect_ctx` function;
>>>
>>> - If the `detect_ctx` function in a vendor’s code always returns
>>> `connected`, then `epoch_counter++` must be performed within the
>>> vendor’s `detect_ctx` function; the implementations in ATS and
>>> MGAG200 appear to be like this;
>> Exactly. In ast/mgag200, we had the case that the VGA got disconnected. We'd still return connected, as the BMC/KVM was
>> present. We now had to reconfigure for the KVM. That requires modifying epoch_counter. You can see at [1] that we only
>> increment if the physical status changes. [1] Same goes for re-connecting the VGA display.
>>
>> [1] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>>
>>>
>>> Here is the pseudocode for our current logic. This logic is indeed a bit
>>> hard to grasp, so I've added some more comments; it might be a bit
>>> clearer than the patch:
>>>
>>> dp_detect()
>>> {
>>> dp.phys_state = detect_from_hw()
>>>
>>> /* epoch_counter update by drm framework */
>>> return dp.phys_state;
>>> }
>>>
>>> vdac_detect()
>>> {
>>> /*
>>> * Scene 1: The driver runs on an older version of the BMC chip,
>>> * and `dp.phys_state` is initialized to 0. To maintain
>>> * consistency with the previous hibmc-drm driver
>>> * logic, always return `connected`.
>>> * Scene 2: The driver runs on an new version of the BMC chip,
>>> * and `dp.phys_state` is real status, witch is real
>>> * `disconnect`. In this scenario, we must ensure that
>>> * the VGA is `connected` to guarantee that the KVM
>>> * displays properly.
>>> */
>>> if (dp.phys_state != connected)
>>> return connected;
>>>
>>> /*
>>> * DP is connected: This driver is definitely running on the
>>> * latest BMC chip, and the DDC I2C is definitely
>>> * connected to the VGA port, so we can confirm whether
>>> * the VGA is present by reading the EDID directly via
>>> * I2C.
>>> */
>>> vdac.phys_state = detect_from_hw()
>>>
>>> /* epoch_counter update by drm framework */
>>> return vdac.phys_state;
>> Let's assume the DP is disconnected. If VGA's physical status goes from connected to disconnected, user space will not
>> know that it needs to reconfigure for the BMC. (or vice versa)
>>
>> To give you some context from earlier discussions around the other drivers: We had the scenario that the user boots up
>> without a connected VGA display. This would enable the BMC, which sometimes picks a large resolution; say >2k per
>> dimension. That is problematic for KVM over networks. And if the user now plugs in a physical VGA display, they would be
>> stuck with the large resolution on the framebuffer console. Maybe the VGA display wouldn't even support such a high-res
>> mode. So we set the default for the BMC to 1024x768. That is well manageable for all of today's VGA displays and does
>> not impose too much overhead for KVM over networks. As a drawback, it's a bit small on monitors and not nice to look
>> at. So we modify epoch_counter whenever the physical status changes. This triggers compositors to reconfigure their
>> screens for the new display.
>>
> Yes, this issue does exist. If we uses the `connector.polled` mechanism to monitor the VGA's presence in real time and
> update the `epoch_counter`, which might resolve the issue. However, upon further consideration, I don't think this is
> the optimal solution. If we create a separate connector for KVM and distinguish between older-generation BMC chips and
> newer-generation BMC chips, the problem will be easily solved. In addition, DP and VGA, as well as VGA and KVM, will be
> decoupled.
>
> A temporary solution:
> /* called by poll work */
> vdac_detect()
> {
> /* Let’s examine this logic on its own to gain a better understanding. */
> if (older-generation)
> return connected;
>
> vdac.phys_state = detect_from_hw();
> if (vdac.phys_state changed)
> ++epoch_counter;
>
> if (dp.phys_state != connected) {
> return connected;
> }
>
> return vdac.phys_state;
> }
>
>
> A more elegant solution:
> |--connector0(KVM): always connected, do not update epoch_counter.
> |
> crtc--|--connector1(VGA): detect real time by `connector.polled`, update epoch_counter.
> |
> |--connector1(DP): detect real time by hpd interrupt, update epoch_counter.
>
> kvm_detect()
> {
> return connected;
> }
>
> /* called by poll work */
> vdac_detect()
> {
> /* for older-generation */
> if (older-generation)
> return connected;
>
> /* for newer-generation */
> vdac.phys_state = detect_from_hw();
>
> /* epoch_counter update by drm framework */
> return vdac.phys_state;
> }
>
> dp_detect()
> {
> dp.phys_state = detect_from_hw();
>
> /* epoch_counter update by drm framework */
> return dp.phys_state;
> }
>
> Thanks,
> Yongbang.
>
>> Best regards
>> Thomas
>>
>>> }
>>>
>>> Sorry for the delay; it took me a little while to figure out how best to
>>> explain this bug and our current implementation.
>>>
>>> Thanks,
>>> Yongbang.
>>>
>>>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>>>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>>>> ast_vga.c#L47
>>>>
>>>> Best regards
>>>> Thomas
>>>>
>>>>> +}
>>>>> +
>>>>> 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 = {
>>>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>>>> + vdac->phys_state = connector_status_connected;
>>>>> +
>>>>> return 0;
>>>>> err:
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-20 14:54 ` Thomas Zimmermann
@ 2026-04-21 7:24 ` Yongbang Shi
2026-04-21 7:44 ` Thomas Zimmermann
0 siblings, 1 reply; 13+ messages in thread
From: Yongbang Shi @ 2026-04-21 7:24 UTC (permalink / raw)
To: Thomas Zimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel, shiyongbang
> Hi
>
> Am 20.04.26 um 16:00 schrieb Yongbang Shi:
>>> Hi
>>>
>>> Am 20.04.26 um 10:40 schrieb Yongbang Shi:
>>> [...]
>>>> From the patch you contributed,,I understand that you are using an
>>>> RH1288H V3 server. I have confirmed with our chief hardware engineer
>>>> that the board design for this series of servers does not connect the
>>>> BMC chip’s DDC I2C to the VGA port.
>>> Thanks a lot for double-checking. That's the info I was missing. I suggest to build a workaround into the driver to
>>> filter out these boards and always return 'connected' on them. IIUC even with these new callbacks, the driver would not
>>> work as expected.
>>>
>> Our BMC chips can distinguish between generations, but since BMC chips of the same generation are used on many different
>
> That's not really much of a problem. Just filter the older boards by some board identifier and handle it separately. We
> use that all over the kernel; including graphics drives. See for example DMI_MATCH. [1]
>
Okay, we'll need to verify this with the BIOS and do some analysis. If necessary, we'll submit a patch as a feature
later on.
> [1] https://elixir.bootlin.com/linux/v7.0/A/ident/DMI_MATCH
>
>> boards, filtering by board type or board id is not feasible. We can only determine whether DDC I2C is present by
>> comparing BMC chips of different generations. We have mandated that the board implementation must connect to DDC I2C on
>> the latest BMC chip.
>>
>>>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/hisilicon/hibmc/
>>>> hibmc_drm_vdac.c?h=v6.12.82#L60
>>>> [2]https://lore.kernel.org/all/20250320101455.2538835-10-shiyongbang@huawei.com/
>>>>
>>>>
>>>>>> Signed-off-by: Lin He <helin52@huawei.com>
>>>>>> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
>>>>>> ---
>>>>> [...]
>>>>>> +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);
>>>>>> +
>>>>>> + vdac->phys_state = drm_connector_helper_detect_from_ddc(connector,
>>>>>> + ctx, force);
>>>>>> +
>>>>>> + /* If the DP connectors are disconnected, the hibmc_vdac_detect
>>>>>> function
>>>>>> + * must return a connected state to ensure KVM display
>>>>>> functionality.
>>>>>> + * Additionally, for previous-generation products that may lack
>>>>>> hardware
>>>>>> + * link support and thus cannot detect the monitor,
>>>>>> hibmc_vdac_detect
>>>>>> + * should also return a connected state.
>>>>>> + */
>>>>>> + if (priv->dp.phys_state != connector_status_connected)
>>>>>> + return connector_status_connected;
>>>>>> +
>>>>>> + return vdac->phys_state;
>>>>> This will break user-space compositors if DP and VGA are connected at
>>>>> the same time. I know, because we had such logic in ast and mgag200.
>>>>>
>>>>> Today's compositors expect a single encoder-connector pair on each CRTC.
>>>>> That's what most contemporary hardware provides. But the server
>>>>> chipsets usually come with one a single CRTC and multiple connectors
>>>>> attached to it. Compositors fail to configure that. When we had this in
>>>>> ast and mgag200, Gnome would display garbage to the screen and mode-
>>>>> setting would fail. The bug report is at [1].
>>>>>
>>>>> In ast and mgag200, only one connector would be installed on a single
>>>>> system. So we could avoid the problem. It looks like that this is not an
>>>>> option with hibmc. VGA always seems to be present and DP seems optional.
>>>>> I would advice to only report one of the connectors as 'connected' if
>>>>> both are installed on a system.
>>>>>
>>>> According to our BMC chip specifications, both VGA and DisplayPort
>>>> outputs are required, but only one connection is allowed at a time,
>>>> which seems impractical.
>>> That's true.
>>>
>>> Yet it needs support form user space to make it work. It's not a kernel problem.
>>>
>>>> Do you have any additional details regarding this issue with the Mutter
>>>> synthesizer? For example, steps to reproduce the issue or more specific
>>>> alert logs. I looked at the issue you submitted to Mutter, which
>>>> describes the phenomenon as "a warning that the configuration is
>>>> incompatible", Could you clarify what this warning specifically refers
>>>> to—is it a message displayed on the screen, or is it a specific entry in
>>>> the logs?
>>> In ast, we used to have at least one connector for the physical output and another connector for the BMC/KVM. Running
>>> Gnome and opening the Settings app did not work correctly. One issue is that display configuration could not be changed
>>> in Gnome. That's the reported error of changes not being applicable.
>>>
>> Great, regarding hibmc-drm's support for DP, my initial idea was also to create separate connectors for DP, VGA, and
>> KVM. However, due to some non-technical reasons, that approach wasn't implemented. Since ast has implemented it this
>> way, we can also consider this solution.
>
> I added a connector for the KVM to ast, but it turned out to be a mistake, as it triggered these user-space bugs. Hence
> the current design in ast. The KVM isn't really a connector. It's more of a bridge, but next to the CRTC instead of next
> to the connector; like this:
>
> Plane -> CRTC -> KVM-bridge -> encoders -> connectors
>
> We have no good way of modelling this pipeline in DRM.
>
> In the case of ast and mgag200, the BMC also cannot be disabled. For a real connector, one would expect that it can be
> disabled. This might also confuse compositors.
>
Okay, got it.
>
>>
>>> IIRC I've also seen distorted output if I really pushed it. But maybe that has meanwhile been mitigated.
>>>
>>> I've been told that other compositors also don't support this scenario well.
>>>
>>> I think you'd run into this case once someone connects the DP and VGA at the same time.
>>>
>> Okay, I understand. However, so far, we have thoroughly tested the scenario where both connector0 (VGA shared with KVM)
>> and connector1 (DP) are displaying at the same time, and we haven’t encountered any similar issues.
>
> If this works for you, then let's keep it. I'm just trying to help you avoid the pitfalls we have seen with other drivers.
>
>
>>
>> I will create a dedicated connector for the KVM and conduct the necessary tests to test for this scenario.
>
> I think the design in the current patch is sound. It just needs to increment epoch_count if the physical status changes;
> and it would trigger these user-space bugs. But we can only work around the latter.
>
Okay, I understand, but there's one more thing I need to confirm: simply adding logic to increment `epoch_count` within
`vdac_detect` isn't enough, is it? We still need to enable the `connector.polled` mechanism for periodic detection, right?
like this:
hibmc_kms_init()
{
...
drm_kms_helper_poll_init(dev);
...
}
a little change like this:
vdac_detect()
{
phys_state = detect_from_hw()
if (dp.phys_state == connected) {
vdac->phys_state = phys_state;
return vdac->phys_state; /* return from here, epoch_counter will be update by drm framework */
}
if (phys_state != vdac->phys_state)
++epoch_counter;
vdac->phys_state = phys_state;
return connector_status_connected;
}
Thanks,
Yongbang.
> Best regards
> Thomas
>
>
>>
>>>> Over the next few days, we will focus on testing relevant scenarios
>>>> while setting both the VGA and DP ports to `connected` to see if we
>>>> encounter similar issues or warnings.
>>>>
>>>>> You also need to increment the connector's epoch_counter if the physical
>>>>> status changed. Doing this will trigger DRM clients to re-read the
>>>>> connector state and reconfigure display.
>>>>>
>>>>> Something like that
>>>>>
>>>>> dp_detect()
>>>>> {
>>>>> dp.phys_state = detect_from_hw()
>>>>>
>>>>> if (dp.phys_state changed)
>>>>> ++epoch_counter
>>>>> return connected
>>>>> }
>>>>>
>>>>> vdac_detect()
>>>>> {
>>>>> if (dp.phys_state == connected)
>>>>> return disconnected
>>>>>
>>>> Only one option is displayed here, but it does not meet our specifications.
>>>>
>>>>> vdac.phys_state = detect_from_hw()
>>>>>
>>>>> if (vdac.phys_state changed)
>>>>> ++epoch_counter
>>>>> return connected
>>>>> }
>>>>>
>>>>> This handles the KVM in each connector's helper. The ast driver is
>>>>> probably the best reference for the current logic. See [2].
>>>>>
>>>> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
>>>> these implementations generally always return `connected`.
>>>>
>>>> If my analysis is correct, the logic should be as follows:
>>>> - If the `detect_ctx` function implemented by each vendor returns the
>>>> actual hardware state, there is no need to modify `epoch_counter`;
>>>> the DRM framework will execute `epoch_counter++` based on the return
>>>> value of the `detect_ctx` function;
>>>>
>>>> - If the `detect_ctx` function in a vendor’s code always returns
>>>> `connected`, then `epoch_counter++` must be performed within the
>>>> vendor’s `detect_ctx` function; the implementations in ATS and
>>>> MGAG200 appear to be like this;
>>> Exactly. In ast/mgag200, we had the case that the VGA got disconnected. We'd still return connected, as the BMC/KVM was
>>> present. We now had to reconfigure for the KVM. That requires modifying epoch_counter. You can see at [1] that we only
>>> increment if the physical status changes. [1] Same goes for re-connecting the VGA display.
>>>
>>> [1] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>>>
>>>>
>>>> Here is the pseudocode for our current logic. This logic is indeed a bit
>>>> hard to grasp, so I've added some more comments; it might be a bit
>>>> clearer than the patch:
>>>>
>>>> dp_detect()
>>>> {
>>>> dp.phys_state = detect_from_hw()
>>>> /* epoch_counter update by drm framework */
>>>> return dp.phys_state;
>>>> }
>>>>
>>>> vdac_detect()
>>>> {
>>>> /*
>>>> * Scene 1: The driver runs on an older version of the BMC chip,
>>>> * and `dp.phys_state` is initialized to 0. To maintain
>>>> * consistency with the previous hibmc-drm driver
>>>> * logic, always return `connected`.
>>>> * Scene 2: The driver runs on an new version of the BMC chip,
>>>> * and `dp.phys_state` is real status, witch is real
>>>> * `disconnect`. In this scenario, we must ensure that
>>>> * the VGA is `connected` to guarantee that the KVM
>>>> * displays properly.
>>>> */
>>>> if (dp.phys_state != connected)
>>>> return connected;
>>>>
>>>> /*
>>>> * DP is connected: This driver is definitely running on the
>>>> * latest BMC chip, and the DDC I2C is definitely
>>>> * connected to the VGA port, so we can confirm whether
>>>> * the VGA is present by reading the EDID directly via
>>>> * I2C.
>>>> */
>>>> vdac.phys_state = detect_from_hw()
>>>> /* epoch_counter update by drm framework */
>>>> return vdac.phys_state;
>>> Let's assume the DP is disconnected. If VGA's physical status goes from connected to disconnected, user space will not
>>> know that it needs to reconfigure for the BMC. (or vice versa)
>>>
>>> To give you some context from earlier discussions around the other drivers: We had the scenario that the user boots up
>>> without a connected VGA display. This would enable the BMC, which sometimes picks a large resolution; say >2k per
>>> dimension. That is problematic for KVM over networks. And if the user now plugs in a physical VGA display, they would be
>>> stuck with the large resolution on the framebuffer console. Maybe the VGA display wouldn't even support such a high-res
>>> mode. So we set the default for the BMC to 1024x768. That is well manageable for all of today's VGA displays and does
>>> not impose too much overhead for KVM over networks. As a drawback, it's a bit small on monitors and not nice to look
>>> at. So we modify epoch_counter whenever the physical status changes. This triggers compositors to reconfigure their
>>> screens for the new display.
>>>
>> Yes, this issue does exist. If we uses the `connector.polled` mechanism to monitor the VGA's presence in real time and
>> update the `epoch_counter`, which might resolve the issue. However, upon further consideration, I don't think this is
>> the optimal solution. If we create a separate connector for KVM and distinguish between older-generation BMC chips and
>> newer-generation BMC chips, the problem will be easily solved. In addition, DP and VGA, as well as VGA and KVM, will be
>> decoupled.
>>
>> A temporary solution:
>> /* called by poll work */
>> vdac_detect()
>> {
>> /* Let’s examine this logic on its own to gain a better understanding. */
>> if (older-generation)
>> return connected;
>>
>> vdac.phys_state = detect_from_hw();
>> if (vdac.phys_state changed)
>> ++epoch_counter;
>>
>> if (dp.phys_state != connected) {
>> return connected;
>> }
>>
>> return vdac.phys_state;
>> }
>>
>>
>> A more elegant solution:
>> |--connector0(KVM): always connected, do not update epoch_counter.
>> |
>> crtc--|--connector1(VGA): detect real time by `connector.polled`, update epoch_counter.
>> |
>> |--connector1(DP): detect real time by hpd interrupt, update epoch_counter.
>>
>> kvm_detect()
>> {
>> return connected;
>> }
>>
>> /* called by poll work */
>> vdac_detect()
>> {
>> /* for older-generation */
>> if (older-generation)
>> return connected;
>>
>> /* for newer-generation */
>> vdac.phys_state = detect_from_hw();
>>
>> /* epoch_counter update by drm framework */
>> return vdac.phys_state;
>> }
>>
>> dp_detect()
>> {
>> dp.phys_state = detect_from_hw();
>>
>> /* epoch_counter update by drm framework */
>> return dp.phys_state;
>> }
>>
>> Thanks,
>> Yongbang.
>>
>>> Best regards
>>> Thomas
>>>
>>>> }
>>>>
>>>> Sorry for the delay; it took me a little while to figure out how best to
>>>> explain this bug and our current implementation.
>>>>
>>>> Thanks,
>>>> Yongbang.
>>>>
>>>>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>>>>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>>>>> ast_vga.c#L47
>>>>>
>>>>> Best regards
>>>>> Thomas
>>>>>
>>>>>> +}
>>>>>> +
>>>>>> 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 = {
>>>>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>>>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>>>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>>>>> + vdac->phys_state = connector_status_connected;
>>>>>> +
>>>>>> return 0;
>>>>>> err:
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-21 7:24 ` Yongbang Shi
@ 2026-04-21 7:44 ` Thomas Zimmermann
2026-04-21 7:52 ` Yongbang Shi
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Zimmermann @ 2026-04-21 7:44 UTC (permalink / raw)
To: Yongbang Shi, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel
Hi
Am 21.04.26 um 09:24 schrieb Yongbang Shi:
[...]
>> That's not really much of a problem. Just filter the older boards by some board identifier and handle it separately. We
>> use that all over the kernel; including graphics drives. See for example DMI_MATCH. [1]
>>
> Okay, we'll need to verify this with the BIOS and do some analysis. If necessary, we'll submit a patch as a feature
> later on.
Right. It's a separate thing.
>> I think the design in the current patch is sound. It just needs to increment epoch_count if the physical status changes;
>> and it would trigger these user-space bugs. But we can only work around the latter.
>>
> Okay, I understand, but there's one more thing I need to confirm: simply adding logic to increment `epoch_count` within
> `vdac_detect` isn't enough, is it? We still need to enable the `connector.polled` mechanism for periodic detection, right?
Exactly. The poll helper will periodically run the detect helper to test
if the display is still attached. This is required on connectors that do
not auto-detect this, such as VGA.
The VGA standard assumes that the display would be connected while the
computer was running. But everyone always connected and disconnected
monitors at runtime, so we have to support that.
Best regards
Thomas
>
> like this:
> hibmc_kms_init()
> {
> ...
>
> drm_kms_helper_poll_init(dev);
>
> ...
> }
>
> a little change like this:
> vdac_detect()
> {
> phys_state = detect_from_hw()
>
> if (dp.phys_state == connected) {
> vdac->phys_state = phys_state;
> return vdac->phys_state; /* return from here, epoch_counter will be update by drm framework */
> }
>
> if (phys_state != vdac->phys_state)
> ++epoch_counter;
>
> vdac->phys_state = phys_state;
>
> return connector_status_connected;
> }
>
> Thanks,
> Yongbang.
>
>> Best regards
>> Thomas
>>
>>
>>>>> Over the next few days, we will focus on testing relevant scenarios
>>>>> while setting both the VGA and DP ports to `connected` to see if we
>>>>> encounter similar issues or warnings.
>>>>>
>>>>>> You also need to increment the connector's epoch_counter if the physical
>>>>>> status changed. Doing this will trigger DRM clients to re-read the
>>>>>> connector state and reconfigure display.
>>>>>>
>>>>>> Something like that
>>>>>>
>>>>>> dp_detect()
>>>>>> {
>>>>>> dp.phys_state = detect_from_hw()
>>>>>>
>>>>>> if (dp.phys_state changed)
>>>>>> ++epoch_counter
>>>>>> return connected
>>>>>> }
>>>>>>
>>>>>> vdac_detect()
>>>>>> {
>>>>>> if (dp.phys_state == connected)
>>>>>> return disconnected
>>>>>>
>>>>> Only one option is displayed here, but it does not meet our specifications.
>>>>>
>>>>>> vdac.phys_state = detect_from_hw()
>>>>>>
>>>>>> if (vdac.phys_state changed)
>>>>>> ++epoch_counter
>>>>>> return connected
>>>>>> }
>>>>>>
>>>>>> This handles the KVM in each connector's helper. The ast driver is
>>>>>> probably the best reference for the current logic. See [2].
>>>>>>
>>>>> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
>>>>> these implementations generally always return `connected`.
>>>>>
>>>>> If my analysis is correct, the logic should be as follows:
>>>>> - If the `detect_ctx` function implemented by each vendor returns the
>>>>> actual hardware state, there is no need to modify `epoch_counter`;
>>>>> the DRM framework will execute `epoch_counter++` based on the return
>>>>> value of the `detect_ctx` function;
>>>>>
>>>>> - If the `detect_ctx` function in a vendor’s code always returns
>>>>> `connected`, then `epoch_counter++` must be performed within the
>>>>> vendor’s `detect_ctx` function; the implementations in ATS and
>>>>> MGAG200 appear to be like this;
>>>> Exactly. In ast/mgag200, we had the case that the VGA got disconnected. We'd still return connected, as the BMC/KVM was
>>>> present. We now had to reconfigure for the KVM. That requires modifying epoch_counter. You can see at [1] that we only
>>>> increment if the physical status changes. [1] Same goes for re-connecting the VGA display.
>>>>
>>>> [1] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>>>>
>>>>> Here is the pseudocode for our current logic. This logic is indeed a bit
>>>>> hard to grasp, so I've added some more comments; it might be a bit
>>>>> clearer than the patch:
>>>>>
>>>>> dp_detect()
>>>>> {
>>>>> dp.phys_state = detect_from_hw()
>>>>> /* epoch_counter update by drm framework */
>>>>> return dp.phys_state;
>>>>> }
>>>>>
>>>>> vdac_detect()
>>>>> {
>>>>> /*
>>>>> * Scene 1: The driver runs on an older version of the BMC chip,
>>>>> * and `dp.phys_state` is initialized to 0. To maintain
>>>>> * consistency with the previous hibmc-drm driver
>>>>> * logic, always return `connected`.
>>>>> * Scene 2: The driver runs on an new version of the BMC chip,
>>>>> * and `dp.phys_state` is real status, witch is real
>>>>> * `disconnect`. In this scenario, we must ensure that
>>>>> * the VGA is `connected` to guarantee that the KVM
>>>>> * displays properly.
>>>>> */
>>>>> if (dp.phys_state != connected)
>>>>> return connected;
>>>>>
>>>>> /*
>>>>> * DP is connected: This driver is definitely running on the
>>>>> * latest BMC chip, and the DDC I2C is definitely
>>>>> * connected to the VGA port, so we can confirm whether
>>>>> * the VGA is present by reading the EDID directly via
>>>>> * I2C.
>>>>> */
>>>>> vdac.phys_state = detect_from_hw()
>>>>> /* epoch_counter update by drm framework */
>>>>> return vdac.phys_state;
>>>> Let's assume the DP is disconnected. If VGA's physical status goes from connected to disconnected, user space will not
>>>> know that it needs to reconfigure for the BMC. (or vice versa)
>>>>
>>>> To give you some context from earlier discussions around the other drivers: We had the scenario that the user boots up
>>>> without a connected VGA display. This would enable the BMC, which sometimes picks a large resolution; say >2k per
>>>> dimension. That is problematic for KVM over networks. And if the user now plugs in a physical VGA display, they would be
>>>> stuck with the large resolution on the framebuffer console. Maybe the VGA display wouldn't even support such a high-res
>>>> mode. So we set the default for the BMC to 1024x768. That is well manageable for all of today's VGA displays and does
>>>> not impose too much overhead for KVM over networks. As a drawback, it's a bit small on monitors and not nice to look
>>>> at. So we modify epoch_counter whenever the physical status changes. This triggers compositors to reconfigure their
>>>> screens for the new display.
>>>>
>>> Yes, this issue does exist. If we uses the `connector.polled` mechanism to monitor the VGA's presence in real time and
>>> update the `epoch_counter`, which might resolve the issue. However, upon further consideration, I don't think this is
>>> the optimal solution. If we create a separate connector for KVM and distinguish between older-generation BMC chips and
>>> newer-generation BMC chips, the problem will be easily solved. In addition, DP and VGA, as well as VGA and KVM, will be
>>> decoupled.
>>>
>>> A temporary solution:
>>> /* called by poll work */
>>> vdac_detect()
>>> {
>>> /* Let’s examine this logic on its own to gain a better understanding. */
>>> if (older-generation)
>>> return connected;
>>>
>>> vdac.phys_state = detect_from_hw();
>>> if (vdac.phys_state changed)
>>> ++epoch_counter;
>>>
>>> if (dp.phys_state != connected) {
>>> return connected;
>>> }
>>>
>>> return vdac.phys_state;
>>> }
>>>
>>>
>>> A more elegant solution:
>>> |--connector0(KVM): always connected, do not update epoch_counter.
>>> |
>>> crtc--|--connector1(VGA): detect real time by `connector.polled`, update epoch_counter.
>>> |
>>> |--connector1(DP): detect real time by hpd interrupt, update epoch_counter.
>>>
>>> kvm_detect()
>>> {
>>> return connected;
>>> }
>>>
>>> /* called by poll work */
>>> vdac_detect()
>>> {
>>> /* for older-generation */
>>> if (older-generation)
>>> return connected;
>>>
>>> /* for newer-generation */
>>> vdac.phys_state = detect_from_hw();
>>>
>>> /* epoch_counter update by drm framework */
>>> return vdac.phys_state;
>>> }
>>>
>>> dp_detect()
>>> {
>>> dp.phys_state = detect_from_hw();
>>>
>>> /* epoch_counter update by drm framework */
>>> return dp.phys_state;
>>> }
>>>
>>> Thanks,
>>> Yongbang.
>>>
>>>> Best regards
>>>> Thomas
>>>>
>>>>> }
>>>>>
>>>>> Sorry for the delay; it took me a little while to figure out how best to
>>>>> explain this bug and our current implementation.
>>>>>
>>>>> Thanks,
>>>>> Yongbang.
>>>>>
>>>>>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>>>>>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>>>>>> ast_vga.c#L47
>>>>>>
>>>>>> Best regards
>>>>>> Thomas
>>>>>>
>>>>>>> +}
>>>>>>> +
>>>>>>> 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 = {
>>>>>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>>>>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>>>>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>>>>>> + vdac->phys_state = connector_status_connected;
>>>>>>> +
>>>>>>> return 0;
>>>>>>> err:
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected
2026-04-21 7:44 ` Thomas Zimmermann
@ 2026-04-21 7:52 ` Yongbang Shi
0 siblings, 0 replies; 13+ messages in thread
From: Yongbang Shi @ 2026-04-21 7:52 UTC (permalink / raw)
To: Thomas Zimmermann, dmitry.baryshkov, tiantao6, xinliang.liu,
maarten.lankhorst, mripard, airlied, daniel, kong.kongxinwei
Cc: liangjian010, chenjianmin, fengsheng5, helin52, shenjian15,
shaojijie, dri-devel, linux-kernel, shiyongbang
> Hi
>
> Am 21.04.26 um 09:24 schrieb Yongbang Shi:
> [...]
>>> That's not really much of a problem. Just filter the older boards by some board identifier and handle it separately. We
>>> use that all over the kernel; including graphics drives. See for example DMI_MATCH. [1]
>>>
>> Okay, we'll need to verify this with the BIOS and do some analysis. If necessary, we'll submit a patch as a feature
>> later on.
>
> Right. It's a separate thing.
>
>
>>> I think the design in the current patch is sound. It just needs to increment epoch_count if the physical status changes;
>>> and it would trigger these user-space bugs. But we can only work around the latter.
>>>
>> Okay, I understand, but there's one more thing I need to confirm: simply adding logic to increment `epoch_count` within
>> `vdac_detect` isn't enough, is it? We still need to enable the `connector.polled` mechanism for periodic detection,
>> right?
>
> Exactly. The poll helper will periodically run the detect helper to test if the display is still attached. This is
> required on connectors that do not auto-detect this, such as VGA.
>
> The VGA standard assumes that the display would be connected while the computer was running. But everyone always
> connected and disconnected monitors at runtime, so we have to support that.
>
Okay, this will further improve our hibmc-drm driver. The v5 patches are coming soon.
Thanks,
Yongbang.
> Best regards
> Thomas
>
>>
>> like this:
>> hibmc_kms_init()
>> {
>> ...
>>
>> drm_kms_helper_poll_init(dev);
>>
>> ...
>> }
>>
>> a little change like this:
>> vdac_detect()
>> {
>> phys_state = detect_from_hw()
>>
>> if (dp.phys_state == connected) {
>> vdac->phys_state = phys_state;
>> return vdac->phys_state; /* return from here, epoch_counter will be update by drm framework */
>> }
>>
>> if (phys_state != vdac->phys_state)
>> ++epoch_counter;
>>
>> vdac->phys_state = phys_state;
>>
>> return connector_status_connected;
>> }
>>
>> Thanks,
>> Yongbang.
>>
>>> Best regards
>>> Thomas
>>>
>>>
>>>>>> Over the next few days, we will focus on testing relevant scenarios
>>>>>> while setting both the VGA and DP ports to `connected` to see if we
>>>>>> encounter similar issues or warnings.
>>>>>>
>>>>>>> You also need to increment the connector's epoch_counter if the physical
>>>>>>> status changed. Doing this will trigger DRM clients to re-read the
>>>>>>> connector state and reconfigure display.
>>>>>>>
>>>>>>> Something like that
>>>>>>>
>>>>>>> dp_detect()
>>>>>>> {
>>>>>>> dp.phys_state = detect_from_hw()
>>>>>>>
>>>>>>> if (dp.phys_state changed)
>>>>>>> ++epoch_counter
>>>>>>> return connected
>>>>>>> }
>>>>>>>
>>>>>>> vdac_detect()
>>>>>>> {
>>>>>>> if (dp.phys_state == connected)
>>>>>>> return disconnected
>>>>>>>
>>>>>> Only one option is displayed here, but it does not meet our specifications.
>>>>>>
>>>>>>> vdac.phys_state = detect_from_hw()
>>>>>>>
>>>>>>> if (vdac.phys_state changed)
>>>>>>> ++epoch_counter
>>>>>>> return connected
>>>>>>> }
>>>>>>>
>>>>>>> This handles the KVM in each connector's helper. The ast driver is
>>>>>>> probably the best reference for the current logic. See [2].
>>>>>>>
>>>>>> I looked at the implementations of `detect_ctx` in ATS and MGAG200;
>>>>>> these implementations generally always return `connected`.
>>>>>>
>>>>>> If my analysis is correct, the logic should be as follows:
>>>>>> - If the `detect_ctx` function implemented by each vendor returns the
>>>>>> actual hardware state, there is no need to modify `epoch_counter`;
>>>>>> the DRM framework will execute `epoch_counter++` based on the return
>>>>>> value of the `detect_ctx` function;
>>>>>>
>>>>>> - If the `detect_ctx` function in a vendor’s code always returns
>>>>>> `connected`, then `epoch_counter++` must be performed within the
>>>>>> vendor’s `detect_ctx` function; the implementations in ATS and
>>>>>> MGAG200 appear to be like this;
>>>>> Exactly. In ast/mgag200, we had the case that the VGA got disconnected. We'd still return connected, as the BMC/KVM
>>>>> was
>>>>> present. We now had to reconfigure for the KVM. That requires modifying epoch_counter. You can see at [1] that we only
>>>>> increment if the physical status changes. [1] Same goes for re-connecting the VGA display.
>>>>>
>>>>> [1] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/ast_vga.c#L56
>>>>>
>>>>>> Here is the pseudocode for our current logic. This logic is indeed a bit
>>>>>> hard to grasp, so I've added some more comments; it might be a bit
>>>>>> clearer than the patch:
>>>>>>
>>>>>> dp_detect()
>>>>>> {
>>>>>> dp.phys_state = detect_from_hw()
>>>>>> /* epoch_counter update by drm framework */
>>>>>> return dp.phys_state;
>>>>>> }
>>>>>>
>>>>>> vdac_detect()
>>>>>> {
>>>>>> /*
>>>>>> * Scene 1: The driver runs on an older version of the BMC chip,
>>>>>> * and `dp.phys_state` is initialized to 0. To maintain
>>>>>> * consistency with the previous hibmc-drm driver
>>>>>> * logic, always return `connected`.
>>>>>> * Scene 2: The driver runs on an new version of the BMC chip,
>>>>>> * and `dp.phys_state` is real status, witch is real
>>>>>> * `disconnect`. In this scenario, we must ensure that
>>>>>> * the VGA is `connected` to guarantee that the KVM
>>>>>> * displays properly.
>>>>>> */
>>>>>> if (dp.phys_state != connected)
>>>>>> return connected;
>>>>>>
>>>>>> /*
>>>>>> * DP is connected: This driver is definitely running on the
>>>>>> * latest BMC chip, and the DDC I2C is definitely
>>>>>> * connected to the VGA port, so we can confirm whether
>>>>>> * the VGA is present by reading the EDID directly via
>>>>>> * I2C.
>>>>>> */
>>>>>> vdac.phys_state = detect_from_hw()
>>>>>> /* epoch_counter update by drm framework */
>>>>>> return vdac.phys_state;
>>>>> Let's assume the DP is disconnected. If VGA's physical status goes from connected to disconnected, user space will not
>>>>> know that it needs to reconfigure for the BMC. (or vice versa)
>>>>>
>>>>> To give you some context from earlier discussions around the other drivers: We had the scenario that the user boots up
>>>>> without a connected VGA display. This would enable the BMC, which sometimes picks a large resolution; say >2k per
>>>>> dimension. That is problematic for KVM over networks. And if the user now plugs in a physical VGA display, they
>>>>> would be
>>>>> stuck with the large resolution on the framebuffer console. Maybe the VGA display wouldn't even support such a
>>>>> high-res
>>>>> mode. So we set the default for the BMC to 1024x768. That is well manageable for all of today's VGA displays and does
>>>>> not impose too much overhead for KVM over networks. As a drawback, it's a bit small on monitors and not nice to look
>>>>> at. So we modify epoch_counter whenever the physical status changes. This triggers compositors to reconfigure their
>>>>> screens for the new display.
>>>>>
>>>> Yes, this issue does exist. If we uses the `connector.polled` mechanism to monitor the VGA's presence in real time and
>>>> update the `epoch_counter`, which might resolve the issue. However, upon further consideration, I don't think this is
>>>> the optimal solution. If we create a separate connector for KVM and distinguish between older-generation BMC chips and
>>>> newer-generation BMC chips, the problem will be easily solved. In addition, DP and VGA, as well as VGA and KVM, will be
>>>> decoupled.
>>>>
>>>> A temporary solution:
>>>> /* called by poll work */
>>>> vdac_detect()
>>>> {
>>>> /* Let’s examine this logic on its own to gain a better understanding. */
>>>> if (older-generation)
>>>> return connected;
>>>>
>>>> vdac.phys_state = detect_from_hw();
>>>> if (vdac.phys_state changed)
>>>> ++epoch_counter;
>>>>
>>>> if (dp.phys_state != connected) {
>>>> return connected;
>>>> }
>>>>
>>>> return vdac.phys_state;
>>>> }
>>>>
>>>>
>>>> A more elegant solution:
>>>> |--connector0(KVM): always connected, do not update epoch_counter.
>>>> |
>>>> crtc--|--connector1(VGA): detect real time by `connector.polled`, update epoch_counter.
>>>> |
>>>> |--connector1(DP): detect real time by hpd interrupt, update epoch_counter.
>>>>
>>>> kvm_detect()
>>>> {
>>>> return connected;
>>>> }
>>>>
>>>> /* called by poll work */
>>>> vdac_detect()
>>>> {
>>>> /* for older-generation */
>>>> if (older-generation)
>>>> return connected;
>>>>
>>>> /* for newer-generation */
>>>> vdac.phys_state = detect_from_hw();
>>>>
>>>> /* epoch_counter update by drm framework */
>>>> return vdac.phys_state;
>>>> }
>>>>
>>>> dp_detect()
>>>> {
>>>> dp.phys_state = detect_from_hw();
>>>>
>>>> /* epoch_counter update by drm framework */
>>>> return dp.phys_state;
>>>> }
>>>>
>>>> Thanks,
>>>> Yongbang.
>>>>
>>>>> Best regards
>>>>> Thomas
>>>>>
>>>>>> }
>>>>>>
>>>>>> Sorry for the delay; it took me a little while to figure out how best to
>>>>>> explain this bug and our current implementation.
>>>>>>
>>>>>> Thanks,
>>>>>> Yongbang.
>>>>>>
>>>>>>> [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/3858
>>>>>>> [2] https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/ast/
>>>>>>> ast_vga.c#L47
>>>>>>>
>>>>>>> Best regards
>>>>>>> Thomas
>>>>>>>
>>>>>>>> +}
>>>>>>>> +
>>>>>>>> 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 = {
>>>>>>>> @@ -130,6 +145,8 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>>>>>>>> connector->polled = DRM_CONNECTOR_POLL_CONNECT |
>>>>>>>> DRM_CONNECTOR_POLL_DISCONNECT;
>>>>>>>> + vdac->phys_state = connector_status_connected;
>>>>>>>> +
>>>>>>>> return 0;
>>>>>>>> err:
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-04-21 7:52 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-16 9:24 [PATCH for drm-misc-fixes v4 0/4] Fix some bugs in the hibmc driver Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 1/4] drm/hisilicon/hibmc: add updating link cap in DP detect() Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 2/4] drm/hisilicon/hibmc: fix no showing when no connectors connected Yongbang Shi
2026-04-17 7:54 ` Thomas Zimmermann
2026-04-20 8:40 ` Yongbang Shi
2026-04-20 9:32 ` Thomas Zimmermann
2026-04-20 14:00 ` Yongbang Shi
2026-04-20 14:54 ` Thomas Zimmermann
2026-04-21 7:24 ` Yongbang Shi
2026-04-21 7:44 ` Thomas Zimmermann
2026-04-21 7:52 ` Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 3/4] drm/hisilicon/hibmc: move display contrl config to hibmc_probe() Yongbang Shi
2026-04-16 9:24 ` [PATCH for drm-misc-fixes v4 4/4] drm/hisilicon/hibmc: use clock to look up the PLL value Yongbang Shi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome