All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Subject: [PATCH] nouveau: use proper atomic accessor to get crtc state
Date: Mon,  1 Dec 2025 07:42:06 +1000	[thread overview]
Message-ID: <20251130214206.1469934-1-airlied@gmail.com> (raw)

From: Dave Airlie <airlied@redhat.com>

This gets the crtc state from the current state, instead of
trying to lookup or create a state.

atomic core started warning about this recently.

Fixes: 0a0e79a2d9ed ("drm/atomic: WARN about invalid drm_foo_get_state() usage")
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/nouveau/dispnv50/atom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/atom.h b/drivers/gpu/drm/nouveau/dispnv50/atom.h
index 93f8f4f64578..ada8fb6f1a9a 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/atom.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/atom.h
@@ -151,7 +151,7 @@ struct nv50_head_atom {
 static inline struct nv50_head_atom *
 nv50_head_atom_get(struct drm_atomic_state *state, struct drm_crtc *crtc)
 {
-	struct drm_crtc_state *statec = drm_atomic_get_crtc_state(state, crtc);
+	struct drm_crtc_state *statec = drm_atomic_get_new_crtc_state(state, crtc);
 	if (IS_ERR(statec))
 		return (void *)statec;
 	return nv50_head_atom(statec);
-- 
2.51.1


             reply	other threads:[~2025-11-30 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-30 21:42 Dave Airlie [this message]
2025-12-03 12:27 ` [PATCH] nouveau: use proper atomic accessor to get crtc state Ville Syrjälä

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=20251130214206.1469934-1-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.