From: Ville Syrjälä Date: Tue, 15 Mar 2022 13:27:51 +0000 (+0200) Subject: drm/i915: Deal with bigjoiner vs. DRRS X-Git-Tag: v5.19-rc1~153^2~20^2~116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=579899c7da714fac736b13fdb202e0a2cb9d3d27;p=thirdparty%2Fkernel%2Flinux.git drm/i915: Deal with bigjoiner vs. DRRS DRRS operates on transcoder level, so we should only poke at it from the master crtc rather than letting every joined pipe give it potentially conflicting input. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220315132752.11849-9-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare --- diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c index 44c9af8f8b9b9..9a341ab1a848a 100644 --- a/drivers/gpu/drm/i915/display/intel_drrs.c +++ b/drivers/gpu/drm/i915/display/intel_drrs.c @@ -176,8 +176,16 @@ static void intel_drrs_schedule_work(struct intel_crtc *crtc) static unsigned int intel_drrs_frontbuffer_bits(const struct intel_crtc_state *crtc_state) { struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); + struct drm_i915_private *i915 = to_i915(crtc->base.dev); + unsigned int frontbuffer_bits; - return INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe); + frontbuffer_bits = INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe); + + for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, + crtc_state->bigjoiner_pipes) + frontbuffer_bits |= INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe); + + return frontbuffer_bits; } /** @@ -196,6 +204,9 @@ void intel_drrs_enable(const struct intel_crtc_state *crtc_state) if (!crtc_state->hw.active) return; + if (intel_crtc_is_bigjoiner_slave(crtc_state)) + return; + mutex_lock(&crtc->drrs.mutex); crtc->drrs.cpu_transcoder = crtc_state->cpu_transcoder; @@ -223,6 +234,9 @@ void intel_drrs_disable(const struct intel_crtc_state *old_crtc_state) if (!old_crtc_state->hw.active) return; + if (intel_crtc_is_bigjoiner_slave(old_crtc_state)) + return; + mutex_lock(&crtc->drrs.mutex); if (intel_drrs_is_enabled(crtc))