From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ssd130x: Use drm_atomic_get_new_plane_state()
Date: Mon, 26 Sep 2022 09:24:26 +0200 [thread overview]
Message-ID: <8a974e5a-949a-5eb8-4f01-64e6114dafa7@suse.de> (raw)
In-Reply-To: <20220923083447.1679780-1-javierm@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2270 bytes --]
Am 23.09.22 um 10:34 schrieb Javier Martinez Canillas:
> The struct drm_plane .state shouldn't be accessed directly but instead the
> drm_atomic_get_new_plane_state() helper function should be used.
>
> This is based on a similar patch from Thomas Zimmermann for the simpledrm
> driver. No functional changes.
>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>
> drivers/gpu/drm/solomon/ssd130x.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
> index 7fae9480aa11..a537692100d1 100644
> --- a/drivers/gpu/drm/solomon/ssd130x.c
> +++ b/drivers/gpu/drm/solomon/ssd130x.c
> @@ -566,10 +566,10 @@ static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb, const struct iosys_m
> }
>
> static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
> - struct drm_atomic_state *old_state)
> + struct drm_atomic_state *state)
> {
> - struct drm_plane_state *plane_state = plane->state;
> - struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(old_state, plane);
> + struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
> + struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
> struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
> struct drm_device *drm = plane->dev;
> struct drm_rect src_clip, dst_clip;
> @@ -591,7 +591,7 @@ static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
> }
>
> static void ssd130x_primary_plane_helper_atomic_disable(struct drm_plane *plane,
> - struct drm_atomic_state *old_state)
> + struct drm_atomic_state *state)
> {
> struct drm_device *drm = plane->dev;
> struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-09-26 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 8:34 Javier Martinez Canillas
2022-09-23 9:05 ` Ville Syrjälä
2022-09-23 9:16 ` Javier Martinez Canillas
2022-09-23 9:43 ` Ville Syrjälä
2022-09-26 7:24 ` Thomas Zimmermann [this message]
2022-09-27 11:36 ` Javier Martinez Canillas
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=8a974e5a-949a-5eb8-4f01-64e6114dafa7@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.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®