From: Neil Armstrong <narmstrong@baylibre.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
Jonas Karlman <jonas@kwiboo.se>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
linux-renesas-soc@vger.kernel.org,
Andrzej Hajda <a.hajda@samsung.com>,
linux-amlogic@lists.infradead.org,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 14/27] drm: meson: dw-hdmi: Use dw_hdmi context to replace hack
Date: Tue, 26 May 2020 14:32:37 +0200 [thread overview]
Message-ID: <16f998ea-6666-c2ca-56f9-dfde14bb8769@baylibre.com> (raw)
In-Reply-To: <20200526011505.31884-15-laurent.pinchart+renesas@ideasonboard.com>
On 26/05/2020 03:14, Laurent Pinchart wrote:
> The meson-dw-hdmi driver needs to access its own context from the
> .mode_valid() operation. It currently gets it from the dev_private field
> of the drm_device retrieved from the connector, which is a hack. Use the
> private data passed to the .mode_valid() operation instead.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/meson/meson_dw_hdmi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index 5cc311c1b8e0..34ba94922605 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -634,7 +634,8 @@ dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
> struct drm_connector *connector,
> const struct drm_display_mode *mode)
> {
> - struct meson_drm *priv = connector->dev->dev_private;
> + struct meson_dw_hdmi *dw_hdmi = data;
> + struct meson_drm *priv = dw_hdmi->priv;
> bool is_hdmi2_sink = connector->display_info.hdmi.scdc.supported;
> unsigned int phy_freq;
> unsigned int vclk_freq;
> @@ -693,7 +694,7 @@ dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
> if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> venc_freq /= 2;
>
> - dev_dbg(connector->dev->dev, "%s: vclk:%d phy=%d venc=%d hdmi=%d\n",
> + dev_dbg(dw_hdmi->dev, "%s: vclk:%d phy=%d venc=%d hdmi=%d\n",
> __func__, phy_freq, vclk_freq, venc_freq, hdmi_freq);
>
> return meson_vclk_vic_supported_freq(priv, phy_freq, vclk_freq);
> @@ -1068,6 +1069,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>
> /* Bridge / Connector */
>
> + dw_plat_data->priv_data = meson_dw_hdmi;
> dw_plat_data->mode_valid = dw_hdmi_mode_valid;
> dw_plat_data->phy_ops = &meson_dw_hdmi_phy_ops;
> dw_plat_data->phy_name = "meson_dw_hdmi_phy";
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2020-05-26 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200526011505.31884-1-laurent.pinchart+renesas@ideasonboard.com>
2020-05-26 1:14 ` [PATCH 11/27] drm: bridge: dw-hdmi: Pass private data pointer to .mode_valid() Laurent Pinchart
2020-05-26 9:44 ` Neil Armstrong
2020-05-26 1:14 ` [PATCH 14/27] drm: meson: dw-hdmi: Use dw_hdmi context to replace hack Laurent Pinchart
2020-05-26 12:32 ` Neil Armstrong [this message]
2020-05-26 1:14 ` [PATCH 15/27] drm: bridge: dw-hdmi: Pass drm_display_info to .mode_valid() Laurent Pinchart
2020-05-26 9:46 ` Neil Armstrong
2020-05-26 1:14 ` [PATCH 16/27] drm: bridge: dw-hdmi: Constify mode argument to dw_hdmi_phy_ops .init() Laurent Pinchart
2020-05-26 9:46 ` Neil Armstrong
2020-05-26 1:14 ` [PATCH 18/27] drm: bridge: dw-hdmi: Pass drm_display_info to dw_hdmi_support_scdc() Laurent Pinchart
2020-05-26 9:48 ` Neil Armstrong
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=16f998ea-6666-c2ca-56f9-dfde14bb8769@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=sam@ravnborg.org \
/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
all inboxes | Powered by JetHome®