]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/rps: store struct dma_fence in struct wait_rps_boost
authorJani Nikula <jani.nikula@intel.com>
Mon, 17 Nov 2025 09:16:13 +0000 (11:16 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 19 Nov 2025 17:33:43 +0000 (19:33 +0200)
Prefer the more generic pointer rather than i915 specific data
type. Also use dma_fence_put() for symmetry with the dma_fence_get()

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/950948ae6d3d5fbc4af3401ea77e609945b73a77.1763370931.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_rps.c

index 82ea1ec482e417ac6e8ae4c451559f4c2fa470b4..b6720f7c09d9afbd6b12853ce2fefa9719a32084 100644 (file)
@@ -18,14 +18,14 @@ struct wait_rps_boost {
        struct wait_queue_entry wait;
 
        struct drm_crtc *crtc;
-       struct i915_request *request;
+       struct dma_fence *fence;
 };
 
 static int do_rps_boost(struct wait_queue_entry *_wait,
                        unsigned mode, int sync, void *key)
 {
        struct wait_rps_boost *wait = container_of(_wait, typeof(*wait), wait);
-       struct i915_request *rq = wait->request;
+       struct i915_request *rq = to_request(wait->fence);
 
        /*
         * If we missed the vblank, but the request is already running it
@@ -34,7 +34,7 @@ static int do_rps_boost(struct wait_queue_entry *_wait,
         */
        if (!i915_request_started(rq))
                intel_rps_boost(rq);
-       i915_request_put(rq);
+       dma_fence_put(wait->fence);
 
        drm_crtc_vblank_put(wait->crtc);
 
@@ -64,7 +64,7 @@ void intel_display_rps_boost_after_vblank(struct drm_crtc *crtc,
                return;
        }
 
-       wait->request = to_request(dma_fence_get(fence));
+       wait->fence = dma_fence_get(fence);
        wait->crtc = crtc;
 
        wait->wait.func = do_rps_boost;