drm/nouveau: Use drm_crtc_vblank_crtc()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 8 Apr 2024 19:06:10 +0000 (22:06 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Apr 2024 10:29:05 +0000 (13:29 +0300)
Replace the open coded drm_crtc_vblank_crtc() with the real
thing.

Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240408190611.24914-4-ville.syrjala@linux.intel.com
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/nouveau_display.c

index f28f9a857458682f80f0a8687ed2edd92fa921d9..aed5d5b51b43d623fd90e9f2cde3925e8d58bad9 100644 (file)
@@ -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;