diff mbox series

[v8,14/14] drm/i915/histogram: Enable pipe dithering

Message ID 20250128-dpst-v8-14-871b94d777f8@intel.com (mailing list archive)
State New, archived
Headers show
Series Display Global Histogram | expand

Commit Message

Arun R Murthy Jan. 28, 2025, 3:51 p.m. UTC
Enable pipe dithering while enabling histogram to overcome some
atrifacts seen on the screen.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_histogram.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Kandpal, Suraj Feb. 17, 2025, 6:20 a.m. UTC | #1
> -----Original Message-----
> From: Murthy, Arun R <arun.r.murthy@intel.com>
> Sent: Tuesday, January 28, 2025 9:21 PM
> To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; dri-
> devel@lists.freedesktop.org
> Cc: Kandpal, Suraj <suraj.kandpal@intel.com>; dmitry.baryshkov@linaro.org;
> Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: [PATCH v8 14/14] drm/i915/histogram: Enable pipe dithering
> 
> Enable pipe dithering while enabling histogram to overcome some atrifacts

Typo: *artifacts

> seen on the screen.
> 
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_histogram.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_histogram.c
> b/drivers/gpu/drm/i915/display/intel_histogram.c
> index
> f6844449e4bb6167116d223af316e5f3a5e8707c..ead9c2391d460f459dfca8e99
> ea423a34418e67d 100644
> --- a/drivers/gpu/drm/i915/display/intel_histogram.c
> +++ b/drivers/gpu/drm/i915/display/intel_histogram.c
> @@ -22,6 +22,13 @@
>  #define HISTOGRAM_BIN_READ_RETRY_COUNT 5  #define
> IET_SAMPLE_FORMAT_1_INT_9_FRACT 0x1000009
> 
> +static void intel_histogram_enable_dithering(struct intel_display *display,
> +					     enum pipe pipe)

Align with parenthesis

With the above fixed.
LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>

> +{
> +	intel_de_rmw(display, PIPE_MISC(pipe), PIPE_MISC_DITHER_ENABLE,
> +		     PIPE_MISC_DITHER_ENABLE);
> +}
> +
>  static void set_bin_index_0(struct intel_display *display, enum pipe pipe)  {
>  	if (DISPLAY_VER(display) >= 20)
> @@ -200,6 +207,10 @@ static int intel_histogram_enable(struct intel_crtc
> *intel_crtc, u8 mode)
> 
>  	if (histogram->enable)
>  		return 0;
> +
> +	/* Pipe Dithering should be enabled with histogram */
> +	intel_histogram_enable_dithering(display, pipe);
> +
>  	 /* enable histogram, clear DPST_BIN reg and select TC function */
>  	if (DISPLAY_VER(display) >= 20)
>  		intel_de_rmw(display, DPST_CTL(pipe),
> 
> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_histogram.c b/drivers/gpu/drm/i915/display/intel_histogram.c
index f6844449e4bb6167116d223af316e5f3a5e8707c..ead9c2391d460f459dfca8e99ea423a34418e67d 100644
--- a/drivers/gpu/drm/i915/display/intel_histogram.c
+++ b/drivers/gpu/drm/i915/display/intel_histogram.c
@@ -22,6 +22,13 @@ 
 #define HISTOGRAM_BIN_READ_RETRY_COUNT 5
 #define IET_SAMPLE_FORMAT_1_INT_9_FRACT 0x1000009
 
+static void intel_histogram_enable_dithering(struct intel_display *display,
+					     enum pipe pipe)
+{
+	intel_de_rmw(display, PIPE_MISC(pipe), PIPE_MISC_DITHER_ENABLE,
+		     PIPE_MISC_DITHER_ENABLE);
+}
+
 static void set_bin_index_0(struct intel_display *display, enum pipe pipe)
 {
 	if (DISPLAY_VER(display) >= 20)
@@ -200,6 +207,10 @@  static int intel_histogram_enable(struct intel_crtc *intel_crtc, u8 mode)
 
 	if (histogram->enable)
 		return 0;
+
+	/* Pipe Dithering should be enabled with histogram */
+	intel_histogram_enable_dithering(display, pipe);
+
 	 /* enable histogram, clear DPST_BIN reg and select TC function */
 	if (DISPLAY_VER(display) >= 20)
 		intel_de_rmw(display, DPST_CTL(pipe),