From: Paul Cercueil <paul@crapouillou.net>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Kees Cook <keescook@chromium.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Harry Wentland <harry.wentland@amd.com>,
Sam Ravnborg <sam@ravnborg.org>,
Maxime Ripard <maxime@cerno.tech>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Paul Boddie <paul@boddie.org.uk>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org,
Jonas Karlman <jonas@kwiboo.se>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v13 5/9] drm/synopsys+ingenic: repair hot plug detection
Date: Wed, 09 Feb 2022 12:01:16 +0000 [thread overview]
Message-ID: <4ED17R.TVHQS4U654LE@crapouillou.net> (raw)
In-Reply-To: <08fb9549042d35c1904fd977e68aa52f74f755b0.1643819482.git.hns@goldelico.com>
Hi Nikolaus,
Le mer., févr. 2 2022 at 17:31:19 +0100, H. Nikolaus Schaller
<hns@goldelico.com> a écrit :
> so that it calls drm_kms_helper_hotplug_event().
>
> We need to set .poll_enabled but that struct component
> can only be accessed in the core code. Hence we add a public
> setter function.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 +++++++++
> drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c | 2 ++
> include/drm/bridge/dw_hdmi.h | 1 +
> 3 files changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 54d8fdad395f5..52e7cd2e020d3 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -3216,6 +3216,15 @@ static int dw_hdmi_parse_dt(struct dw_hdmi
> *hdmi)
> return 0;
> }
>
> +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable)
> +{
> + if (hdmi->bridge.dev)
> + hdmi->bridge.dev->mode_config.poll_enabled = enable;
> + else
> + dev_warn(hdmi->dev, "no hdmi->bridge.dev");
> +}
> +EXPORT_SYMBOL_GPL(dw_hdmi_enable_poll);
> +
> struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> const struct dw_hdmi_plat_data *plat_data)
> {
> diff --git a/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c
> b/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c
> index 34e986dd606cf..90547a28dc5c7 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c
> @@ -55,6 +55,8 @@ ingenic_dw_hdmi_mode_valid(struct dw_hdmi *hdmi,
> void *data,
> if (mode->clock > 216000)
> return MODE_CLOCK_HIGH;
>
> + dw_hdmi_enable_poll(hdmi, true);
> +
It would be a better idea to move this patch before the patch that
creates ingenic-dw-hdmi.c. Then you wouldn't have to patch a file that
was just introduced.
As for the patch itself, I guess it's fine, but is that really needed?
My understanding is that it's the hdmi-connector's job to poll.
Cheers,
-Paul
> return MODE_OK;
> }
>
> diff --git a/include/drm/bridge/dw_hdmi.h
> b/include/drm/bridge/dw_hdmi.h
> index 2a1f85f9a8a3f..963960794b40e 100644
> --- a/include/drm/bridge/dw_hdmi.h
> +++ b/include/drm/bridge/dw_hdmi.h
> @@ -196,5 +196,6 @@ enum drm_connector_status
> dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi,
> void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data,
> bool force, bool disabled, bool rxsense);
> void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data);
> +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable);
>
> #endif /* __IMX_HDMI_H__ */
> --
> 2.33.0
>
next prev parent reply other threads:[~2022-02-09 12:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 16:31 [PATCH v13 0/9] MIPS: JZ4780 and CI20 HDMI H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 1/9] drm/ingenic: prepare ingenic drm for later addition of JZ4780 H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 2/9] drm/ingenic: Add support for JZ4780 and HDMI output H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 3/9] dt-bindings: display: Add ingenic,jz4780-dw-hdmi DT Schema H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 4/9] drm/ingenic: Add dw-hdmi driver specialization for jz4780 H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 5/9] drm/synopsys+ingenic: repair hot plug detection H. Nikolaus Schaller
2022-02-09 12:01 ` Paul Cercueil [this message]
2022-02-09 13:51 ` H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 6/9] dw-hdmi/ingenic-dw-hdmi: repair interworking with hdmi-connector H. Nikolaus Schaller
2022-02-09 12:18 ` Paul Cercueil
2022-02-09 13:51 ` H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 7/9] drm/bridge: display-connector: add ddc-en gpio support H. Nikolaus Schaller
2022-02-02 16:31 ` [PATCH v13 8/9] MIPS: DTS: CI20: fix how ddc power is enabled H. Nikolaus Schaller
2022-02-09 13:34 ` Thomas Bogendoerfer
2022-02-09 11:52 ` [PATCH v13 0/9] MIPS: JZ4780 and CI20 HDMI Paul Cercueil
2022-02-09 13:51 ` H. Nikolaus Schaller
2022-02-09 14:02 ` Paul Cercueil
2022-02-12 13:50 ` H. Nikolaus Schaller
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=4ED17R.TVHQS4U654LE@crapouillou.net \
--to=paul@crapouillou.net \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=broonie@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ebiederm@xmission.com \
--cc=geert+renesas@glider.be \
--cc=harry.wentland@amd.com \
--cc=hns@goldelico.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=keescook@chromium.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=letux-kernel@openphoenux.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime@cerno.tech \
--cc=miquel.raynal@bootlin.com \
--cc=narmstrong@baylibre.com \
--cc=paul@boddie.org.uk \
--cc=robert.foss@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=tsbogend@alpha.franken.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