From: Arun R Murthy <arun.r.murthy@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCH 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Date: Fri, 5 Jul 2024 15:25:50 +0530 [thread overview]
Message-ID: <20240705095551.1244154-5-arun.r.murthy@intel.com> (raw)
In-Reply-To: <20240705095551.1244154-1-arun.r.murthy@intel.com>
The delay counter for histogram does not reset and as a result the
histogram bin never gets updated. Woraround would be to use save and
restore histogram register.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/i915/display/intel_histogram.c | 17 +++++++++++++++++
drivers/gpu/drm/i915/display/intel_histogram.h | 1 +
2 files changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_histogram.c b/drivers/gpu/drm/i915/display/intel_histogram.c
index 740019fdf0df..61a8cd623f19 100644
--- a/drivers/gpu/drm/i915/display/intel_histogram.c
+++ b/drivers/gpu/drm/i915/display/intel_histogram.c
@@ -22,6 +22,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
u32 dpstbin;
int i, try = 0;
+ /* Wa: 14014889975 */
+ if (IS_DISPLAY_VER(i915, 12, 13))
+ intel_de_rmw(i915, DPST_CTL(histogram->pipe),
+ DPST_CTL_RESTORE, 0);
+
/*
* TODO: PSR to be exited while reading the Histogram data
* Set DPST_CTL Bin Reg function select to TC
@@ -59,6 +64,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
histogram_event))
drm_err(&i915->drm, "sending HISTOGRAM event failed\n");
+ /* Wa: 14014889975 */
+ if (IS_DISPLAY_VER(i915, 12, 13))
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
+ intel_de_write(i915, DPST_CTL(histogram->pipe), intel_de_read(i915,
+ DPST_CTL(histogram->pipe)) | DPST_CTL_RESTORE);
+
/* Enable histogram interrupt */
intel_de_rmw(i915, DPST_GUARD(histogram->pipe), DPST_GUARD_HIST_INT_EN,
DPST_GUARD_HIST_INT_EN);
@@ -127,6 +138,12 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)
/* Pipe Dithering should be enabled with GLOBAL_HIST */
intel_histogram_enable_dithering(i915, pipe);
+ /* Wa: 14014889975 */
+ if (IS_DISPLAY_VER(i915, 12, 13))
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
+ intel_de_write(i915, DPST_CTL(histogram->pipe), intel_de_read(i915,
+ DPST_CTL(histogram->pipe)) | DPST_CTL_RESTORE);
+
/*
* enable DPST_CTL Histogram mode
* Clear DPST_CTL Bin Reg function select to TC
diff --git a/drivers/gpu/drm/i915/display/intel_histogram.h b/drivers/gpu/drm/i915/display/intel_histogram.h
index f07683dde005..88942564fdc0 100644
--- a/drivers/gpu/drm/i915/display/intel_histogram.h
+++ b/drivers/gpu/drm/i915/display/intel_histogram.h
@@ -19,6 +19,7 @@
#define DPST_CTL_RESTORE REG_BIT(28)
#define DPST_CTL_IE_MODI_TABLE_EN REG_BIT(27)
#define DPST_CTL_HIST_MODE REG_BIT(24)
+#define DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT REG_GENMASK(23, 16)
#define DPST_CTL_ENHANCEMENT_MODE_MASK REG_GENMASK(14, 13)
#define DPST_CTL_EN_MULTIPLICATIVE REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
#define DPST_CTL_IE_TABLE_VALUE_FORMAT REG_BIT(15)
--
2.25.1
next prev parent reply other threads:[~2024-07-05 10:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 9:55 [PATCH 0/5] Display Global Histogram Arun R Murthy
2024-07-05 9:55 ` [PATCH 1/5] drm/i915/display: Add support for histogram Arun R Murthy
2024-08-05 6:46 ` Kulkarni, Vandita
2024-08-22 6:37 ` Murthy, Arun R
2024-08-22 10:54 ` Kulkarni, Vandita
2024-08-22 11:00 ` Murthy, Arun R
2024-08-22 11:14 ` Kulkarni, Vandita
2024-08-07 9:31 ` Jani Nikula
2024-08-07 10:28 ` Murthy, Arun R
2024-08-07 9:55 ` Jani Nikula
2024-07-05 9:55 ` [PATCH 2/5] drm/i915/display: histogram interrupt handling Arun R Murthy
2024-08-07 9:42 ` Jani Nikula
2024-07-05 9:55 ` [PATCH 3/5] Add crtc properties for global histogram Arun R Murthy
2024-09-10 12:06 ` Shankar, Uma
2024-09-11 5:15 ` Kulkarni, Vandita
2024-09-11 8:49 ` Kulkarni, Vandita
2024-09-11 9:46 ` Kulkarni, Vandita
2024-09-17 15:40 ` Murthy, Arun R
2024-09-17 15:16 ` Murthy, Arun R
2024-09-12 9:09 ` Murthy, Arun R
2024-09-12 9:52 ` Murthy, Arun R
2024-07-05 9:55 ` Arun R Murthy [this message]
2024-07-05 9:55 ` [PATCH 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+ Arun R Murthy
2024-08-07 9:53 ` Jani Nikula
2024-07-05 13:36 ` ✗ Fi.CI.CHECKPATCH: warning for Display Global Histogram Patchwork
2024-07-05 13:36 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-07-05 13:44 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-06 18:17 ` ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240705095551.1244154-5-arun.r.murthy@intel.com \
--to=arun.r.murthy@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox