Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: tzimmermann@suse.de, ville.syrjala@linux.intel.com,
	Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH v2 12/25] drm/vblank: pass vblank to drm_queue_vblank_event()
Date: Thu,  4 Dec 2025 12:57:40 +0200	[thread overview]
Message-ID: <f8ccb5d4e590edc32292a0bb96b596a96ae9e4ed.1764845757.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1764845757.git.jani.nikula@intel.com>

Use the vblank pointer instead of a dev, pipe pair to simplify
code. Rename to drm_vblank_crtc_queue_event().

v2: Rename (Thomas)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_vblank.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index d0460cd5d345..6be354415529 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1599,12 +1599,13 @@ void drm_crtc_vblank_restore(struct drm_crtc *crtc)
 }
 EXPORT_SYMBOL(drm_crtc_vblank_restore);
 
-static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
-				  u64 req_seq,
-				  union drm_wait_vblank *vblwait,
-				  struct drm_file *file_priv)
+static int drm_vblank_crtc_queue_event(struct drm_vblank_crtc *vblank,
+				       u64 req_seq,
+				       union drm_wait_vblank *vblwait,
+				       struct drm_file *file_priv)
 {
-	struct drm_vblank_crtc *vblank = drm_vblank_crtc(dev, pipe);
+	struct drm_device *dev = vblank->dev;
+	unsigned int pipe = vblank->pipe;
 	struct drm_pending_vblank_event *e;
 	ktime_t now;
 	u64 seq;
@@ -1825,7 +1826,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
 		/* must hold on to the vblank ref until the event fires
 		 * drm_vblank_crtc_put will be called asynchronously
 		 */
-		return drm_queue_vblank_event(dev, pipe, req_seq, vblwait, file_priv);
+		return drm_vblank_crtc_queue_event(vblank, req_seq, vblwait, file_priv);
 	}
 
 	if (req_seq != seq) {
-- 
2.47.3


  parent reply	other threads:[~2025-12-04 10:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 10:57 [PATCH v2 00/25] drm/vblank: refactoring and cleanups Jani Nikula
2025-12-04 10:57 ` [PATCH v2 01/25] drm/vblank: Unexport drm_wait_one_vblank() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 02/25] drm/vblank: remove drm_wait_one_vblank() completely Jani Nikula
2025-12-04 10:57 ` [PATCH v2 03/25] drm/vblank: remove superfluous pipe check Jani Nikula
2025-12-04 10:57 ` [PATCH v2 04/25] drm/vblank: add return value to drm_crtc_wait_one_vblank() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 05/25] drm/vblank: limit vblank variable scope to atomic Jani Nikula
2025-12-04 10:57 ` [PATCH v2 06/25] drm/vblank: use the drm_vblank_crtc() and drm_crtc_vblank_crtc() helpers more Jani Nikula
2025-12-04 10:57 ` [PATCH v2 07/25] drm/vblank: prefer drm_crtc_vblank_crtc() over drm_vblank_crtc() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 08/25] drm/vblank: pass vlank to drm_vblank_get()/_put()/_count() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 09/25] drm/vblank: pass vblank to drm_update_vblank_count() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 10/25] drm/vblank: pass vblank to drm_handle_vblank_events() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 11/25] drm/vblank: use the vblank based interfaces more Jani Nikula
2025-12-04 10:57 ` Jani Nikula [this message]
2025-12-04 10:57 ` [PATCH v2 13/25] drm/vblank: pass vblank to drm_wait_vblank_reply() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 14/25] drm/vblank: pass vblank to drm_vblank_count_and_time() Jani Nikula
2025-12-05  5:18   ` kernel test robot
2025-12-04 10:57 ` [PATCH v2 15/25] drm/vblank: pass vblank to drm_reset_vblank_timestamp() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 16/25] drm/vblank: pass vblank to store_vblank() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 17/25] drm/vblank: pass vblank to drm_vblank_enable() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 18/25] drm/vblank: merge drm_vblank_restore() into drm_crtc_vblank_restore() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 19/25] drm/vblank: add drm_crtc_from_vblank() helper Jani Nikula
2025-12-04 10:57 ` [PATCH v2 20/25] drm/vblank: pass vblank to __get_vblank_counter() and drm_max_vblank_count() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 21/25] drm/vblank: pass vblank to __{enable, disable}_vblank() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 22/25] drm/vblank: pass vblank to drm_get_last_vbltimestamp() Jani Nikula
2025-12-04 10:57 ` [PATCH v2 23/25] drm/vblank: pass vblank to drm_vblank_disable_and_save(), make static Jani Nikula
2025-12-04 10:57 ` [PATCH v2 24/25] drm/vblank: reduce pipe checks Jani Nikula
2025-12-04 10:57 ` [PATCH v2 25/25] drm/vblank: clean up debug logging Jani Nikula
2025-12-04 12:46 ` [PATCH v2 00/25] drm/vblank: refactoring and cleanups Thomas Zimmermann
2025-12-04 12:57   ` Jani Nikula
2025-12-04 13:06     ` Thomas Zimmermann
2025-12-04 13:07       ` Thomas Zimmermann
2025-12-04 13:12         ` Jani Nikula
2025-12-04 13:15           ` Thomas Zimmermann
2025-12-04 13:55 ` ✗ CI.KUnit: failure for drm/vblank: refactoring and cleanups (rev2) Patchwork

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=f8ccb5d4e590edc32292a0bb96b596a96ae9e4ed.1764845757.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    /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