diff mbox series

[08/13] drm/i915/dsb: Skip DSB command buffer setup if we have no LUTs

Message ID 20230118163040.29808-9-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Load LUTs with DSB | expand

Commit Message

Ville Syrjälä Jan. 18, 2023, 4:30 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

If we have no LUTs to load there is no point in setting up
the DSB command buffer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Animesh Manna Feb. 3, 2023, 10:01 a.m. UTC | #1
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, January 18, 2023 10:01 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 08/13] drm/i915/dsb: Skip DSB command buffer
> setup if we have no LUTs
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> If we have no LUTs to load there is no point in setting up the DSB command
> buffer.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

LGTM.
Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 162d671182e3..f4a527a3c265 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1383,6 +1383,9 @@ void intel_color_prepare_commit(struct
> intel_crtc_state *crtc_state)
>  	/* FIXME DSB has issues loading LUTs, disable it for now */
>  	return;
> 
> +	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
> +		return;
> +
>  	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);  }
> 
> --
> 2.38.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 162d671182e3..f4a527a3c265 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1383,6 +1383,9 @@  void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 	/* FIXME DSB has issues loading LUTs, disable it for now */
 	return;
 
+	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
+		return;
+
 	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
 }