Files
LibreELEC.tv/packages/linux/patches/rockchip/rockchip-0101-WIP-FRL-drm-rockchip-dw_hdmi_qp-Fixup-usage-of-enabl.patch
Christian Hewitt 5b2b97c29c linux: update rockchip to Linux 6.17-rc6
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2025-09-16 15:18:29 +00:00

68 lines
2.8 KiB
Diff

From 9c8e2ebcd3c861e744af01cf35e4dd45fde33b70 Mon Sep 17 00:00:00 2001
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Date: Thu, 29 May 2025 19:50:25 +0300
Subject: [PATCH 101/110] [WIP-FRL] drm/rockchip: dw_hdmi_qp: Fixup usage of
enable_gpio member in main struct
The name of the enable_gpio member in struct rockchip_hdmi_qp is too
generic, as initially "borrowed" from downstream BSP code. Moreover,
this hasn't been really in use so far, since there is neither a DT
providing an "enable-gpios" property to any of the "hdmi" nodes, nor a
binding documenting it.
The actual purpose of this GPIO line is to control the level shifters
for the HDMI TX data lines when switching between TMDS and FRL operating
modes, i.e. asserted for the former and deasserted for the latter.
A previous patch introduced the "tmds-enable-gpios" property of the
RK3588 HDMI TX Controller binding, hence pass the updated string to
devm_gpiod_get_optional() and rename the struct member accordingly.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index 75a0ea019ede..c18c0a9bf06c 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -96,7 +96,7 @@ struct rockchip_hdmi_qp {
struct rockchip_encoder encoder;
struct dw_hdmi_qp *hdmi;
struct phy *phy;
- struct gpio_desc *enable_gpio;
+ struct gpio_desc *tmds_enable_gpio;
struct delayed_work hpd_work;
int port_id;
const struct rockchip_hdmi_qp_ctrl_ops *ctrl_ops;
@@ -123,7 +123,7 @@ static void dw_hdmi_qp_rockchip_encoder_enable(struct drm_encoder *encoder)
struct drm_crtc *crtc = encoder->crtc;
/* Unconditionally switch to TMDS as FRL is not yet supported */
- gpiod_set_value(hdmi->enable_gpio, 1);
+ gpiod_set_value(hdmi->tmds_enable_gpio, 1);
if (!crtc || !crtc->state)
return;
@@ -592,11 +592,11 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
plat_data.ref_clk_rate = clk_get_rate(ref_clk);
clk_put(ref_clk);
- hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
- GPIOD_OUT_HIGH);
- if (IS_ERR(hdmi->enable_gpio))
- return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->enable_gpio),
- "Failed to request enable GPIO\n");
+ hdmi->tmds_enable_gpio = devm_gpiod_get_optional(hdmi->dev, "tmds-enable",
+ GPIOD_OUT_HIGH);
+ if (IS_ERR(hdmi->tmds_enable_gpio))
+ return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->tmds_enable_gpio),
+ "Failed to request TMDS enable GPIO\n");
hdmi->phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
if (IS_ERR(hdmi->phy))
--
2.34.1