From: Ville Syrjälä Date: Mon, 8 Apr 2024 19:06:10 +0000 (+0300) Subject: drm/nouveau: Use drm_crtc_vblank_crtc() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5cdc75eec091d00a406f0f6b5de03748b43ae3f4;p=linux.git drm/nouveau: Use drm_crtc_vblank_crtc() Replace the open coded drm_crtc_vblank_crtc() with the real thing. Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouveau@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408190611.24914-4-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul --- diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index f28f9a8574586..aed5d5b51b43d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -83,7 +83,7 @@ static bool nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, ktime_t *stime, ktime_t *etime) { - struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)]; + struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc); struct nvif_head *head = &nouveau_crtc(crtc)->head; struct nvif_head_scanoutpos_v0 args; int retry = 20;