@@ -29,6 +29,13 @@ struct intel_histogram {
u32 bin_data[HISTOGRAM_BIN_COUNT];
};
+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)
@@ -197,6 +204,9 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)
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),
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 | 10 ++++++++++ 1 file changed, 10 insertions(+)