All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	uma.shankar@intel.com, animesh.manna@intel.com
Subject: Re: [PATCH 06/11] drm/i915/dsb: Add support for GOSUB interrupt
Date: Mon, 7 Apr 2025 19:30:57 +0300	[thread overview]
Message-ID: <Z_P9wdRcMKAb1sDs@intel.com> (raw)
In-Reply-To: <20250407142359.1398410-7-chaitanya.kumar.borah@intel.com>

On Mon, Apr 07, 2025 at 07:53:54PM +0530, Chaitanya Kumar Borah wrote:
> DSB raises an interrupt when there is a nested GOSUB command or
> illegal Head/Tail. Add support to log such errors in the DSB
> interrupt handler.
> 
> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c      | 5 ++++-
>  drivers/gpu/drm/i915/display/intel_dsb_regs.h | 2 ++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index bffa02a0442c..da58f1c821c3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -787,7 +787,7 @@ static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
>  
>  	intel_de_write_fw(display, DSB_INTERRUPT(pipe, dsb->id),
>  			  dsb_error_int_status(display) | DSB_PROG_INT_STATUS |
> -			  dsb_error_int_en(display) | DSB_PROG_INT_EN);
> +			  dsb_error_int_en(display) | DSB_PROG_INT_EN | DSB_GOSUB_INT_EN);

You need to add that to dsb_error_int_{en,status}(), with the
appropriate platform checks to avoid the interrupt handler getting
confused on platforms that don't have GOSUB.

>  
>  	intel_de_write_fw(display, DSB_HEAD(pipe, dsb->id),
>  			  intel_dsb_head(dsb));
> @@ -980,4 +980,7 @@ void intel_dsb_irq_handler(struct intel_display *display,
>  	if (errors & DSB_POLL_ERR_INT_STATUS)
>  		drm_err(display->drm, "[CRTC:%d:%s] DSB %d poll error\n",
>  			crtc->base.base.id, crtc->base.name, dsb_id);
> +	if (errors & DSB_GOSUB_INT_STATUS)
> +		drm_err(display->drm, "[CRTC:%d:%s] DSB %d gosub int error\n",

Maybe something like:
"... GOSUB programming error"

> +			crtc->base.base.id, crtc->base.name, dsb_id);
>  }
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb_regs.h b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> index cb6e0e5624a6..230104f36145 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> @@ -51,11 +51,13 @@
>  #define   DSB_RESET_SM_STATE_MASK	REG_GENMASK(5, 4)
>  #define   DSB_RUN_SM_STATE_MASK		REG_GENMASK(2, 0)
>  #define DSB_INTERRUPT(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x28)
> +#define   DSB_GOSUB_INT_EN		REG_BIT(21) /* ptl+ */
>  #define   DSB_ATS_FAULT_INT_EN		REG_BIT(20) /* mtl+ */
>  #define   DSB_GTT_FAULT_INT_EN		REG_BIT(19)
>  #define   DSB_RSPTIMEOUT_INT_EN		REG_BIT(18)
>  #define   DSB_POLL_ERR_INT_EN		REG_BIT(17)
>  #define   DSB_PROG_INT_EN		REG_BIT(16)
> +#define   DSB_GOSUB_INT_STATUS		REG_BIT(5) /* ptl+ */
>  #define   DSB_ATS_FAULT_INT_STATUS	REG_BIT(4) /* mtl+ */
>  #define   DSB_GTT_FAULT_INT_STATUS	REG_BIT(3)
>  #define   DSB_RSPTIMEOUT_INT_STATUS	REG_BIT(2)
> -- 
> 2.25.1

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-04-07 16:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 14:23 [PATCH 00/11] drm/xe/display: Program double buffered LUT registers Chaitanya Kumar Borah
2025-04-07 14:23 ` [PATCH 01/11] drm/i915/dsb: Extract intel_dsb_ins_align() Chaitanya Kumar Borah
2025-05-14  8:01   ` Shankar, Uma
2025-05-14 11:16   ` Jani Nikula
2025-05-14 11:58     ` Borah, Chaitanya Kumar
2025-04-07 14:23 ` [PATCH 02/11] drm/i915/dsb: Extract assert_dsb_tail_is_aligned() Chaitanya Kumar Borah
2025-04-07 14:23 ` [PATCH 03/11] drm/i915/dsb: Extract intel_dsb_{head,tail}() Chaitanya Kumar Borah
2025-04-07 14:23 ` [PATCH 04/11] drm/i915/dsb: Implement intel_dsb_gosub() Chaitanya Kumar Borah
2025-05-14  9:18   ` Shankar, Uma
2025-04-07 14:23 ` [PATCH 05/11] drm/i915/dsb: add intel_dsb_gosub_finish() Chaitanya Kumar Borah
2025-04-07 16:19   ` Ville Syrjälä
2025-04-07 14:23 ` [PATCH 06/11] drm/i915/dsb: Add support for GOSUB interrupt Chaitanya Kumar Borah
2025-04-07 16:30   ` Ville Syrjälä [this message]
2025-04-07 14:23 ` [PATCH 07/11] drm/i915: s/dsb_color_vblank/dsb_color Chaitanya Kumar Borah
2025-04-07 16:39   ` Ville Syrjälä
2025-04-07 14:23 ` [PATCH 08/11] drm/i915: use GOSUB to program doubled buffered LUT registers Chaitanya Kumar Borah
2025-04-07 16:51   ` Ville Syrjälä
2025-04-07 14:23 ` [PATCH 09/11] drm/i915: Program DB LUT registers before vblank Chaitanya Kumar Borah
2025-04-07 16:54   ` Ville Syrjälä
2025-04-07 14:23 ` [PATCH 10/11] drm/i915/color: Do not pre-load LUTs with DB registers Chaitanya Kumar Borah
2025-04-07 14:23 ` [PATCH 11/11] drm/i915: Disable updating of LUT values during vblank Chaitanya Kumar Borah
2025-04-07 14:49 ` ✓ CI.Patch_applied: success for drm/xe/display: Program double buffered LUT registers (rev5) Patchwork
2025-04-07 14:49 ` ✓ CI.checkpatch: " Patchwork
2025-04-07 14:50 ` ✓ CI.KUnit: " Patchwork
2025-04-07 14:54 ` ✗ CI.Build: failure " Patchwork
2025-04-07 17:05 ` ✗ Fi.CI.SPARSE: warning " Patchwork
2025-04-07 17:28 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-07 19:32 ` ✗ i915.CI.Full: 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=Z_P9wdRcMKAb1sDs@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=animesh.manna@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=uma.shankar@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.