[RFC PATCH 15/22] drm/i915/psr: Remove origin from frontbuffer flush callback
Jouni Högander
jouni.hogander at intel.com
Mon Mar 27 12:37:25 UTC 2023
Only dirtyfb is now used to perform frontbuffer flush. We can remove
origin from psr flush callback.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_frontbuffer.c | 2 +-
drivers/gpu/drm/i915/display/intel_psr.c | 12 ++++--------
drivers/gpu/drm/i915/display/intel_psr.h | 4 +---
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index 2d29591768a1..f57a6e56fe6d 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -84,7 +84,7 @@ void frontbuffer_flush(struct drm_i915_private *i915,
might_sleep();
intel_drrs_flush(i915, frontbuffer_bits);
- intel_psr_flush(i915, frontbuffer_bits, origin);
+ intel_psr_flush(i915, frontbuffer_bits);
intel_fbc_flush(i915, frontbuffer_bits);
}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 6cf4d5d19d89..6dc51e36cacc 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2173,8 +2173,7 @@ static void intel_psr_work(struct work_struct *work)
* accordingly in future.
*/
static void
-tgl_dc3co_flush_locked(struct intel_dp *intel_dp, unsigned int frontbuffer_bits,
- enum fb_op_origin origin)
+tgl_dc3co_flush_locked(struct intel_dp *intel_dp, unsigned int frontbuffer_bits)
{
if (!intel_dp->psr.dc3co_exitline || !intel_dp->psr.psr2_enabled ||
!intel_dp->psr.active)
@@ -2197,7 +2196,6 @@ tgl_dc3co_flush_locked(struct intel_dp *intel_dp, unsigned int frontbuffer_bits,
* intel_psr_flush - Flush PSR
* @dev_priv: i915 device
* @frontbuffer_bits: frontbuffer plane tracking bits
- * @origin: which operation caused the flush
*
* Since the hardware frontbuffer tracking has gaps we need to integrate
* with the software frontbuffer tracking. This function gets called every
@@ -2207,7 +2205,7 @@ tgl_dc3co_flush_locked(struct intel_dp *intel_dp, unsigned int frontbuffer_bits,
* Dirty frontbuffers relevant to PSR are tracked in busy_frontbuffer_bits.
*/
void intel_psr_flush(struct drm_i915_private *dev_priv,
- unsigned frontbuffer_bits, enum fb_op_origin origin)
+ unsigned int frontbuffer_bits)
{
struct intel_encoder *encoder;
@@ -2233,10 +2231,8 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,
if (intel_dp->psr.paused)
goto unlock;
- if (origin == ORIGIN_FLIP ||
- (origin == ORIGIN_CURSOR_UPDATE &&
- !intel_dp->psr.psr2_sel_fetch_enabled)) {
- tgl_dc3co_flush_locked(intel_dp, frontbuffer_bits, origin);
+ if (!intel_dp->psr.psr2_sel_fetch_enabled) {
+ tgl_dc3co_flush_locked(intel_dp, frontbuffer_bits);
goto unlock;
}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index 8e76c9b05bf3..9d3bf5834444 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -8,7 +8,6 @@
#include <linux/types.h>
-enum fb_op_origin;
struct drm_connector;
struct drm_connector_state;
struct drm_i915_private;
@@ -29,8 +28,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,
const struct intel_crtc_state *old_crtc_state);
int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
void intel_psr_flush(struct drm_i915_private *dev_priv,
- unsigned frontbuffer_bits,
- enum fb_op_origin origin);
+ unsigned int frontbuffer_bits);
void intel_psr_init(struct intel_dp *intel_dp);
void intel_psr_compute_config(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state,
--
2.34.1
More information about the Intel-gfx-trybot
mailing list