From: Priit Laes <plaes@plaes.org>
To: Roman Stratiienko <r.stratiienko@gmail.com>
Cc: linux-kernel@vger.kernel.org, mripard@kernel.org, wens@csie.org,
jernej.skrabec@siol.net, megous@megous.com,
linux-sunxi@googlegroups.com, dri-devel@lists.freedesktop.org
Subject: Re: [linux-sunxi] [PATCH v4 1/2] drm/sun4i: Add mode_set callback to the engine
Date: Mon, 31 May 2021 08:38:12 +0000 [thread overview]
Message-ID: <20210531083812.GB7041@plaes.org> (raw)
In-Reply-To: <20210528203036.17999-2-r.stratiienko@gmail.com>
On Fri, May 28, 2021 at 11:30:35PM +0300, Roman Stratiienko wrote:
> Create callback to allow updating engine's registers on mode change.
>
> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
> drivers/gpu/drm/sun4i/sun4i_crtc.c | 3 +++
> drivers/gpu/drm/sun4i/sunxi_engine.h | 12 ++++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> index 45d9eb552d86..8f01a6b2bbef 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> @@ -146,6 +146,9 @@ static void sun4i_crtc_mode_set_nofb(struct drm_crtc *crtc)
> struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc);
>
> sun4i_tcon_mode_set(scrtc->tcon, encoder, mode);
> +
> + if (scrtc->engine->ops->mode_set)
> + scrtc->engine->ops->mode_set(scrtc->engine, mode);
> }
>
> static const struct drm_crtc_helper_funcs sun4i_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
> index 548710a936d5..7faa844646ff 100644
> --- a/drivers/gpu/drm/sun4i/sunxi_engine.h
> +++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
> @@ -9,6 +9,7 @@
> struct drm_plane;
> struct drm_device;
> struct drm_crtc_state;
> +struct drm_display_mode;
>
> struct sunxi_engine;
>
> @@ -108,6 +109,17 @@ struct sunxi_engine_ops {
> * This function is optional.
> */
> void (*vblank_quirk)(struct sunxi_engine *engine);
> +
> + /**
> + * @mode_set:
> + *
> + * This callback is used to update engine registers that
> + * responsible for display frame size and other mode attributes.
This sentence needs a little grammatical fixup.
> + *
> + * This function is optional.
> + */
> + void (*mode_set)(struct sunxi_engine *engine,
> + struct drm_display_mode *mode);
> };
>
> /**
> --
> 2.30.2
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210528203036.17999-2-r.stratiienko%40gmail.com.
next prev parent reply other threads:[~2021-05-31 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 20:30 [PATCH v4 0/2] drm/sun4i: Set mixer frame to display size for DE2.0+ Roman Stratiienko
2021-05-28 20:30 ` [PATCH v4 1/2] drm/sun4i: Add mode_set callback to the engine Roman Stratiienko
2021-05-31 8:38 ` Priit Laes [this message]
2021-05-31 17:24 ` Jernej Škrabec
2021-05-31 17:48 ` Jernej Škrabec
2021-05-28 20:30 ` [PATCH v4 2/2] drm/sun4i: Use CRTC size instead of primary plane size as mixer frame Roman Stratiienko
2021-05-28 20:41 ` Roman Stratiienko
2021-05-31 17:43 ` Jernej Škrabec
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=20210531083812.GB7041@plaes.org \
--to=plaes@plaes.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=megous@megous.com \
--cc=mripard@kernel.org \
--cc=r.stratiienko@gmail.com \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).