From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@intel.com>,
dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 1/3] drm/nouveau/kms/nv50-: Use state helper instead of crtc pointer
Date: Mon, 2 Nov 2020 18:06:30 +0200 [thread overview]
Message-ID: <20201102160630.GP6112@intel.com> (raw)
In-Reply-To: <20201102133834.1176740-1-maxime@cerno.tech>
On Mon, Nov 02, 2020 at 02:38:32PM +0100, Maxime Ripard wrote:
> dispnv50 references the crtc->state pointer in order to get the current
> CRTC state in its atomic_check hook, which would be the old CRTC state in
> the global atomic state.
>
> Use the drm_atomic_get_old_crtc_state helper to get that state to make it
> more obvious.
>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Looks correct
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/nouveau/dispnv50/head.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
> index 0542ca22b33a..537c1ef2e464 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/head.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
> @@ -313,11 +313,13 @@ nv50_head_atomic_check_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
> static int
> nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
> {
> + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
> + crtc);
> struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
> crtc);
> struct nouveau_drm *drm = nouveau_drm(crtc->dev);
> struct nv50_head *head = nv50_head(crtc);
> - struct nv50_head_atom *armh = nv50_head_atom(crtc->state);
> + struct nv50_head_atom *armh = nv50_head_atom(old_crtc_state);
> struct nv50_head_atom *asyh = nv50_head_atom(crtc_state);
> struct nouveau_conn_atom *asyc = NULL;
> struct drm_connector_state *conns;
> --
> 2.28.0
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-11-02 16:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 13:38 [PATCH 1/3] drm/nouveau/kms/nv50-: Use state helper instead of crtc pointer Maxime Ripard
2020-11-02 13:38 ` [PATCH 2/3] drm: Use state helper instead of CRTC state pointer Maxime Ripard
2020-11-02 16:04 ` Ville Syrjälä
2020-11-03 16:15 ` Maxime Ripard
2020-11-03 16:28 ` Ville Syrjälä
2020-11-05 16:35 ` Maxime Ripard
2020-11-05 16:56 ` Ville Syrjälä
2020-11-02 13:38 ` [PATCH 3/3] drm: Use the state pointer directly in atomic_check Maxime Ripard
2020-11-02 16:06 ` Ville Syrjälä
2020-11-03 10:07 ` Maxime Ripard
2020-11-02 16:06 ` Ville Syrjälä [this message]
2020-11-03 10:07 ` [PATCH 1/3] drm/nouveau/kms/nv50-: Use state helper instead of crtc pointer Maxime Ripard
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=20201102160630.GP6112@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maxime@cerno.tech \
--cc=tzimmermann@suse.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