Commit 95c04f44 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915/rps: store struct dma_fence in struct wait_rps_boost



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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/950948ae6d3d5fbc4af3401ea77e609945b73a77.1763370931.git.jani.nikula@intel.com


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 4799ff41
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;