From: Robert Foss <robert.foss@linaro.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Paul Cercueil <paul@crapouillou.net>,
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>,
Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Ezequiel Garcia <ezequiel@collabora.com>,
Harry Wentland <harry.wentland@amd.com>,
Sam Ravnborg <sam@ravnborg.org>,
Maxime Ripard <maxime@cerno.tech>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
linux-mips@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
letux-kernel@openphoenux.org, Paul Boddie <paul@boddie.org.uk>,
Jonas Karlman <jonas@kwiboo.se>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2 1/8] drm/bridge: synopsis: Add mode_fixup and bridge timings support
Date: Thu, 5 Aug 2021 16:32:17 +0200 [thread overview]
Message-ID: <CAG3jFyu50h2oLW0U6hJSpxiKp3Hb5Ow8Ujvg2qdKRuy+uhaahw@mail.gmail.com> (raw)
In-Reply-To: <15187eccabf39561de226acd8be40b93503cac49.1628172477.git.hns@goldelico.com>
Hey Nikolaus,
Thanks for submitting this series.
On Thu, 5 Aug 2021 at 16:08, H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> From: Paul Boddie <paul@boddie.org.uk>
>
> The platform-specific configuration structure is augmented with
> mode_fixup and timings members so that specialisations of the
> Synopsys driver can introduce mode flags and bus flags.
>
> Signed-off-by: Paul Boddie <paul@boddie.org.uk>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 16 ++++++++++++++++
> include/drm/bridge/dw_hdmi.h | 5 +++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index e7c7c9b9c646f..e8499eb11328c 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2810,6 +2810,19 @@ dw_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
> return mode_status;
> }
>
> +static bool
> +dw_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,
> + const struct drm_display_mode *mode,
> + struct drm_display_mode *adjusted_mode)
> +{
> + struct dw_hdmi *hdmi = bridge->driver_private;
> +
> + if (hdmi->plat_data->mode_fixup)
> + return hdmi->plat_data->mode_fixup(bridge, mode, adjusted_mode);
> +
> + return true;
> +}
> +
> static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
> const struct drm_display_mode *orig_mode,
> const struct drm_display_mode *mode)
> @@ -2883,6 +2896,7 @@ static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
> .atomic_disable = dw_hdmi_bridge_atomic_disable,
> .mode_set = dw_hdmi_bridge_mode_set,
> .mode_valid = dw_hdmi_bridge_mode_valid,
> + .mode_fixup = dw_hdmi_bridge_mode_fixup,
mode_fixup() has been deprecated[1] in favor of atomic_check(), care
has to be taken when switching to atomic_check() as it has access to
the full atomic commit.
Looking at this driver, it's using mode_set as well, which should be fixed.
[1] https://lore.kernel.org/dri-devel/20210722062246.2512666-8-sam@ravnborg.org/
> .detect = dw_hdmi_bridge_detect,
> .get_edid = dw_hdmi_bridge_get_edid,
> };
> @@ -3364,6 +3378,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> #ifdef CONFIG_OF
> hdmi->bridge.of_node = pdev->dev.of_node;
> #endif
> + if (plat_data->timings)
> + hdmi->bridge.timings = plat_data->timings;
>
> memset(&pdevinfo, 0, sizeof(pdevinfo));
> pdevinfo.parent = dev;
> diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
> index 6a5716655619b..677137445d534 100644
> --- a/include/drm/bridge/dw_hdmi.h
> +++ b/include/drm/bridge/dw_hdmi.h
> @@ -8,6 +8,7 @@
>
> #include <sound/hdmi-codec.h>
>
> +struct drm_bridge;
> struct drm_display_info;
> struct drm_display_mode;
> struct drm_encoder;
> @@ -140,6 +141,10 @@ struct dw_hdmi_plat_data {
> enum drm_mode_status (*mode_valid)(struct dw_hdmi *hdmi, void *data,
> const struct drm_display_info *info,
> const struct drm_display_mode *mode);
> + bool (*mode_fixup)(struct drm_bridge *bridge,
> + const struct drm_display_mode *mode,
> + struct drm_display_mode *adjusted_mode);
> + const struct drm_bridge_timings *timings;
>
> /* Vendor PHY support */
> const struct dw_hdmi_phy_ops *phy_ops;
> --
> 2.31.1
>
next prev parent reply other threads:[~2021-08-05 14:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 14:07 [PATCH v2 0/8] MIPS: jz4780 HDMI H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 1/8] drm/bridge: synopsis: Add mode_fixup and bridge timings support H. Nikolaus Schaller
2021-08-05 14:32 ` Robert Foss [this message]
2021-08-05 14:45 ` H. Nikolaus Schaller
2021-08-08 4:50 ` H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 2/8] drm/ingenic: Add jz4780 Synopsys HDMI driver H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 3/8] drm/ingenic: Add support for JZ4780 and HDMI output H. Nikolaus Schaller
2021-08-05 15:22 ` Paul Cercueil
2021-08-05 16:01 ` H. Nikolaus Schaller
2021-08-08 5:04 ` H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 4/8] dt-bindings: display: Add ingenic-jz4780-hdmi DT Schema H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 5/8] MIPS: DTS: jz4780: account for Synopsys HDMI driver and LCD controller H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 6/8] MIPS: DTS: CI20: add HDMI setup H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 7/8] MIPS: CI20: defconfig: configure for DRM_DW_HDMI_JZ4780 H. Nikolaus Schaller
2021-08-05 14:07 ` [PATCH v2 8/8] [RFC] drm/ingenic: convert to component framework for jz4780 hdmi H. Nikolaus Schaller
2021-08-05 15:04 ` Laurent Pinchart
2021-08-05 16:07 ` H. Nikolaus Schaller
2021-08-05 16:17 ` Paul Cercueil
2021-08-05 16:22 ` H. Nikolaus Schaller
2021-08-10 9:31 ` Daniel Vetter
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=CAG3jFyu50h2oLW0U6hJSpxiKp3Hb5Ow8Ujvg2qdKRuy+uhaahw@mail.gmail.com \
--to=robert.foss@linaro.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ebiederm@xmission.com \
--cc=ezequiel@collabora.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=letux-kernel@openphoenux.org \
--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=paul@crapouillou.net \
--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;
as well as URLs for NNTP newsgroup(s).