From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 8/9] video: sunxi: dw-hdmi: read source_id later
Date: Thu, 22 Apr 2021 01:14:33 +0100 [thread overview]
Message-ID: <20210422001434.11367-9-andre.przywara@arm.com> (raw)
In-Reply-To: <20210422001434.11367-1-andre.przywara@arm.com>
From: Jernej Skrabec <jernej.skrabec@siol.net>
There is no real need to read source_id at probe time. It also doesn't
make sense to store it in driver private data since it's already stored
in class platform data. While this looks like cleanup (and it is), it's
also important for DE2 driver rework because this info will be filled
later (after probe is already executed).
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/video/sunxi/sunxi_dw_hdmi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index 6d2bc206fc2..19ed80b48a4 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -20,7 +20,6 @@
struct sunxi_dw_hdmi_priv {
struct dw_hdmi hdmi;
- int mux;
};
struct sunxi_hdmi_phy {
@@ -294,6 +293,7 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
{
struct sunxi_hdmi_phy * const phy =
(struct sunxi_hdmi_phy *)(SUNXI_HDMI_BASE + HDMI_PHY_OFFS);
+ struct display_plat *uc_plat = dev_get_uclass_plat(dev);
struct sunxi_dw_hdmi_priv *priv = dev_get_priv(dev);
int ret;
@@ -301,7 +301,7 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
if (ret)
return ret;
- sunxi_dw_hdmi_lcdc_init(priv->mux, edid, panel_bpp);
+ sunxi_dw_hdmi_lcdc_init(uc_plat->source_id, edid, panel_bpp);
if (edid->flags & DISPLAY_FLAGS_VSYNC_LOW)
setbits_le32(&phy->pol, 0x200);
@@ -324,7 +324,6 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
static int sunxi_dw_hdmi_probe(struct udevice *dev)
{
- struct display_plat *uc_plat = dev_get_uclass_plat(dev);
struct sunxi_dw_hdmi_priv *priv = dev_get_priv(dev);
struct sunxi_ccm_reg * const ccm =
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
@@ -353,7 +352,6 @@ static int sunxi_dw_hdmi_probe(struct udevice *dev)
priv->hdmi.i2c_clk_low = 0xfe;
priv->hdmi.reg_io_width = 1;
priv->hdmi.phy_set = sunxi_dw_hdmi_phy_cfg;
- priv->mux = uc_plat->source_id;
ret = dw_hdmi_phy_wait_for_hpd(&priv->hdmi);
if (ret < 0) {
--
2.17.5
next prev parent reply other threads:[~2021-04-22 0:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 0:14 [PATCH v3 0/9] video: sunxi: rework DE2 driver Andre Przywara
2021-04-22 0:14 ` [PATCH v3 1/9] video: sunxi: Add mode_valid callback to sunxi_dw_hdmi Andre Przywara
2021-04-22 0:14 ` [PATCH v3 2/9] common: edid: check for digital display earlier Andre Przywara
2021-04-22 0:14 ` [PATCH v3 3/9] common: edid: extract code for detailed timing search Andre Przywara
2021-04-22 0:14 ` [PATCH v3 4/9] common: edid: Search for valid timing in extension block Andre Przywara
2021-05-03 13:00 ` Neil Armstrong
2021-04-22 0:14 ` [PATCH v3 5/9] video: sunxi: Use DW-HDMI hpd function Andre Przywara
2021-04-22 0:14 ` [PATCH v3 6/9] video: sunxi: Remove check for ddc-i2c-bus property Andre Przywara
2021-04-22 0:14 ` [PATCH v3 7/9] video: sunxi: Remove TV probe from DE2 Andre Przywara
2021-04-22 0:14 ` Andre Przywara [this message]
2021-04-22 0:14 ` [PATCH v3 9/9] video: sunxi: de2: switch to public uclass functions Andre Przywara
2021-04-24 14:39 ` [PATCH v3 0/9] video: sunxi: rework DE2 driver Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210422001434.11367-9-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox