From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
kernel@collabora.com, dafna3@gmail.com, chunkuang.hu@kernel.org,
p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch,
enric.balletbo@collabora.com
Subject: Re: [PATCH v2 1/3] drm/mediatek: Switch the hdmi bridge ops to the atomic versions
Date: Tue, 30 Mar 2021 03:02:20 +0300 [thread overview]
Message-ID: <YGJqjPp2COsP18As@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20210329153632.17559-2-dafna.hirschfeld@collabora.com>
Hi Dafna,
Thank you for the patch.
On Mon, Mar 29, 2021 at 05:36:30PM +0200, Dafna Hirschfeld wrote:
> The bridge operation '.enable' and the audio cb '.get_eld'
> access hdmi->conn. In the future we will want to support
> the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR and then we will
> not have direct access to the connector.
> The atomic version '.atomic_enable' allows accessing the
> current connector from the state.
> This patch switches the bridge to the atomic version to
> prepare access to the connector in later patches.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 23 +++++++++++++++--------
> 1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index 8ee55f9e2954..f2c810b767ef 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1357,7 +1357,8 @@ static bool mtk_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,
> return true;
> }
>
> -static void mtk_hdmi_bridge_disable(struct drm_bridge *bridge)
> +static void mtk_hdmi_bridge_atomic_disable(struct drm_bridge *bridge,
> + struct drm_bridge_state *old_bridge_state)
> {
> struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
>
> @@ -1371,7 +1372,8 @@ static void mtk_hdmi_bridge_disable(struct drm_bridge *bridge)
> hdmi->enabled = false;
> }
>
> -static void mtk_hdmi_bridge_post_disable(struct drm_bridge *bridge)
> +static void mtk_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
> + struct drm_bridge_state *old_state)
> {
> struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
>
> @@ -1406,7 +1408,8 @@ static void mtk_hdmi_bridge_mode_set(struct drm_bridge *bridge,
> drm_mode_copy(&hdmi->mode, adjusted_mode);
> }
>
> -static void mtk_hdmi_bridge_pre_enable(struct drm_bridge *bridge)
> +static void mtk_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
> + struct drm_bridge_state *old_state)
> {
> struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
>
> @@ -1426,7 +1429,8 @@ static void mtk_hdmi_send_infoframe(struct mtk_hdmi *hdmi,
> mtk_hdmi_setup_vendor_specific_infoframe(hdmi, mode);
> }
>
> -static void mtk_hdmi_bridge_enable(struct drm_bridge *bridge)
> +static void mtk_hdmi_bridge_atomic_enable(struct drm_bridge *bridge,
> + struct drm_bridge_state *old_state)
> {
> struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
>
> @@ -1440,13 +1444,16 @@ static void mtk_hdmi_bridge_enable(struct drm_bridge *bridge)
> }
>
> static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = {
> + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
> + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
> + .atomic_reset = drm_atomic_helper_bridge_reset,
> .attach = mtk_hdmi_bridge_attach,
> .mode_fixup = mtk_hdmi_bridge_mode_fixup,
> - .disable = mtk_hdmi_bridge_disable,
> - .post_disable = mtk_hdmi_bridge_post_disable,
> + .atomic_disable = mtk_hdmi_bridge_atomic_disable,
> + .atomic_post_disable = mtk_hdmi_bridge_atomic_post_disable,
> .mode_set = mtk_hdmi_bridge_mode_set,
> - .pre_enable = mtk_hdmi_bridge_pre_enable,
> - .enable = mtk_hdmi_bridge_enable,
> + .atomic_pre_enable = mtk_hdmi_bridge_atomic_pre_enable,
> + .atomic_enable = mtk_hdmi_bridge_atomic_enable,
> };
>
> static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2021-03-30 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 15:36 [PATCH v2 0/3] drm/mediatek: Don't support hdmi connector creation Dafna Hirschfeld
2021-03-29 15:36 ` [PATCH v2 1/3] drm/mediatek: Switch the hdmi bridge ops to the atomic versions Dafna Hirschfeld
2021-03-30 0:02 ` Laurent Pinchart [this message]
2021-03-29 15:36 ` [PATCH v2 2/3] drm/mediatek: Don't support hdmi connector creation Dafna Hirschfeld
2021-03-30 0:08 ` Laurent Pinchart
2021-03-30 9:44 ` Dafna Hirschfeld
2021-03-29 15:36 ` [PATCH v2 3/3] drm/mediatek: in struct mtk_hdmi, replace conn field with curr_conn ptr Dafna Hirschfeld
2021-03-30 0:10 ` Laurent Pinchart
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=YGJqjPp2COsP18As@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=chunkuang.hu@kernel.org \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=enric.balletbo@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=p.zabel@pengutronix.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
all inboxes | Powered by JetHome®