mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
From afc0d2ce443fae831951445c9f819331815738a1 Mon Sep 17 00:00:00 2001
|
|
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
|
Date: Wed, 3 Sep 2025 21:51:03 +0300
|
|
Subject: [PATCH 055/110] FROMLIST(v4): drm/rockchip: dw_hdmi_qp: Provide ref
|
|
clock rate in dw_hdmi_qp_plat_data
|
|
|
|
In order to support correct initialization of the timer base in the HDMI
|
|
QP IP block, setup platform data to include the required reference clock
|
|
rate.
|
|
|
|
While at it, ensure plat_data is zero-initialized in
|
|
dw_hdmi_qp_rockchip_bind().
|
|
|
|
Reviewed-by: Daniel Stone <daniels@collabora.com>
|
|
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
|
---
|
|
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 11 ++++++++++-
|
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
|
|
index 39b46327afd8..5280383febe2 100644
|
|
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
|
|
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
|
|
@@ -431,14 +431,15 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
|
|
void *data)
|
|
{
|
|
struct platform_device *pdev = to_platform_device(dev);
|
|
+ struct dw_hdmi_qp_plat_data plat_data = {};
|
|
const struct rockchip_hdmi_qp_cfg *cfg;
|
|
- struct dw_hdmi_qp_plat_data plat_data;
|
|
struct drm_device *drm = data;
|
|
struct drm_connector *connector;
|
|
struct drm_encoder *encoder;
|
|
struct rockchip_hdmi_qp *hdmi;
|
|
struct resource *res;
|
|
struct clk_bulk_data *clks;
|
|
+ struct clk *ref_clk;
|
|
int ret, irq, i;
|
|
|
|
if (!pdev->dev.of_node)
|
|
@@ -508,6 +509,14 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
|
|
if (ret < 0)
|
|
return dev_err_probe(hdmi->dev, ret, "Failed to get clocks\n");
|
|
|
|
+ ref_clk = clk_get(hdmi->dev, "ref");
|
|
+ if (IS_ERR(ref_clk))
|
|
+ return dev_err_probe(hdmi->dev, PTR_ERR(ref_clk),
|
|
+ "Failed to get ref clock\n");
|
|
+
|
|
+ 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))
|
|
--
|
|
2.34.1
|
|
|