[PATCH v2 4/8] drm/i915/dsb: Compute use_dsb earlier

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Tue Feb 11 09:39:37 UTC 2025


On 2/8/2025 4:01 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Skip all the commit completion interrupt stuff on the
> chained DSB when we don't take the full DSB path (ie. when
> the plane/pipe programming is done via MMIO). The commit
> completion will be done via the CPU side vblank interrupt.
>
> Currently this is just a redundant interrupt, so not a big
> deal. But in the future we'll be moving the TRANS_PUSH write
> into the chained DSB as well, and that we definitely don't
> want to do when it's also being done by the CPU from
> intel_pipe_update_end().
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>


> ---
>   drivers/gpu/drm/i915/display/intel_color.c   |  6 ++++--
>   drivers/gpu/drm/i915/display/intel_display.c | 15 +++++++++------
>   2 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 8400a97f7e43..792cf7cef58a 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1987,8 +1987,10 @@ void intel_color_prepare_commit(struct intel_atomic_state *state,
>   
>   	display->funcs.color->load_luts(crtc_state);
>   
> -	intel_dsb_wait_vblank_delay(state, crtc_state->dsb_color_vblank);
> -	intel_dsb_interrupt(crtc_state->dsb_color_vblank);
> +	if (crtc_state->use_dsb) {
> +		intel_dsb_wait_vblank_delay(state, crtc_state->dsb_color_vblank);
> +		intel_dsb_interrupt(crtc_state->dsb_color_vblank);
> +	}
>   
>   	intel_dsb_finish(crtc_state->dsb_color_vblank);
>   }
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index a50b0a008231..452b70ffe97c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7676,12 +7676,6 @@ static void intel_atomic_prepare_plane_clear_colors(struct intel_atomic_state *s
>   
>   static void intel_atomic_dsb_prepare(struct intel_atomic_state *state,
>   				     struct intel_crtc *crtc)
> -{
> -	intel_color_prepare_commit(state, crtc);
> -}
> -
> -static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
> -				    struct intel_crtc *crtc)
>   {
>   	const struct intel_crtc_state *old_crtc_state =
>   		intel_atomic_get_old_crtc_state(state, crtc);
> @@ -7704,6 +7698,15 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
>   		!intel_crtc_needs_modeset(new_crtc_state) &&
>   		!intel_crtc_needs_fastset(new_crtc_state);
>   
> +	intel_color_prepare_commit(state, crtc);
> +}
> +
> +static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
> +				    struct intel_crtc *crtc)
> +{
> +	struct intel_crtc_state *new_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, crtc);
> +
>   	if (!new_crtc_state->use_dsb && !new_crtc_state->dsb_color_vblank)
>   		return;
>   


More information about the Intel-xe mailing list