mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Devarsh Thakkar <devarsht@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Jyri Sarha <jyri.sarha@iki.fi>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	Jonathan Cormier <jcormier@criticallink.com>
Subject: Re: [PATCH 4/7] drm/tidss: Add printing of underflows
Date: Fri, 22 Nov 2024 13:37:45 +0530	[thread overview]
Message-ID: <f51c5f0a-7fcf-971b-f190-fa52a939158d@ti.com> (raw)
In-Reply-To: <20241021-tidss-irq-fix-v1-4-82ddaec94e4a@ideasonboard.com>



On 21/10/24 19:37, Tomi Valkeinen wrote:
> Add printing of underflows the same way as we handle sync losts.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

Reviewed-by: Devarsh Thakkar <devarsht@ti.com>

Regards
Devarsh

> ---
>  drivers/gpu/drm/tidss/tidss_irq.c   | 14 ++++++++++++++
>  drivers/gpu/drm/tidss/tidss_plane.c |  8 ++++++++
>  drivers/gpu/drm/tidss/tidss_plane.h |  2 ++
>  3 files changed, 24 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tidss/tidss_irq.c b/drivers/gpu/drm/tidss/tidss_irq.c
> index 91498ff664a2..3cc4024ec7ff 100644
> --- a/drivers/gpu/drm/tidss/tidss_irq.c
> +++ b/drivers/gpu/drm/tidss/tidss_irq.c
> @@ -78,6 +78,14 @@ static irqreturn_t tidss_irq_handler(int irq, void *arg)
>  			tidss_crtc_error_irq(crtc, irqstatus);
>  	}
>  
> +	for (unsigned int i = 0; i < tidss->num_planes; ++i) {
> +		struct drm_plane *plane = tidss->planes[i];
> +		struct tidss_plane *tplane = to_tidss_plane(plane);
> +
> +		if (irqstatus & DSS_IRQ_PLANE_FIFO_UNDERFLOW(tplane->hw_plane_id))
> +			tidss_plane_error_irq(plane, irqstatus);
> +	}
> +
>  	return IRQ_HANDLED;
>  }
>  
> @@ -112,6 +120,12 @@ int tidss_irq_install(struct drm_device *ddev, unsigned int irq)
>  		tidss->irq_mask |= DSS_IRQ_VP_FRAME_DONE(tcrtc->hw_videoport);
>  	}
>  
> +	for (unsigned int i = 0; i < tidss->num_planes; ++i) {
> +		struct tidss_plane *tplane = to_tidss_plane(tidss->planes[i]);
> +
> +		tidss->irq_mask |= DSS_IRQ_PLANE_FIFO_UNDERFLOW(tplane->hw_plane_id);
> +	}
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/tidss/tidss_plane.c b/drivers/gpu/drm/tidss/tidss_plane.c
> index a5d86822c9e3..116de124bddb 100644
> --- a/drivers/gpu/drm/tidss/tidss_plane.c
> +++ b/drivers/gpu/drm/tidss/tidss_plane.c
> @@ -18,6 +18,14 @@
>  #include "tidss_drv.h"
>  #include "tidss_plane.h"
>  
> +void tidss_plane_error_irq(struct drm_plane *plane, u64 irqstatus)
> +{
> +	struct tidss_plane *tplane = to_tidss_plane(plane);
> +
> +	dev_err_ratelimited(plane->dev->dev, "Plane%u underflow (irq %llx)\n",
> +			    tplane->hw_plane_id, irqstatus);
> +}
> +
>  /* drm_plane_helper_funcs */
>  
>  static int tidss_plane_atomic_check(struct drm_plane *plane,
> diff --git a/drivers/gpu/drm/tidss/tidss_plane.h b/drivers/gpu/drm/tidss/tidss_plane.h
> index e933e158b617..aecaf2728406 100644
> --- a/drivers/gpu/drm/tidss/tidss_plane.h
> +++ b/drivers/gpu/drm/tidss/tidss_plane.h
> @@ -22,4 +22,6 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
>  				       u32 crtc_mask, const u32 *formats,
>  				       u32 num_formats);
>  
> +void tidss_plane_error_irq(struct drm_plane *plane, u64 irqstatus);
> +
>  #endif
> 

  reply	other threads:[~2024-11-22  8:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 14:07 [PATCH 0/7] drm/tidss: Interrupt fixes and cleanups Tomi Valkeinen
2024-10-21 14:07 ` [PATCH 1/7] drm/tidss: Fix issue in irq handling causing irq-flood issue Tomi Valkeinen
2024-10-21 15:21   ` Jon Cormier
2024-11-24 17:18   ` Aradhya Bhatia
2024-11-25 11:08     ` Tomi Valkeinen
2024-10-21 14:07 ` [PATCH 2/7] drm/tidss: Remove unused OCP error flag Tomi Valkeinen
2024-11-22  8:00   ` Devarsh Thakkar
2024-11-24 17:19   ` Aradhya Bhatia
2024-10-21 14:07 ` [PATCH 3/7] drm/tidss: Remove extra K2G check Tomi Valkeinen
2024-11-22  8:00   ` Devarsh Thakkar
2024-11-24 17:20   ` Aradhya Bhatia
2024-10-21 14:07 ` [PATCH 4/7] drm/tidss: Add printing of underflows Tomi Valkeinen
2024-11-22  8:07   ` Devarsh Thakkar [this message]
2024-11-24 17:26   ` Aradhya Bhatia
2024-10-21 14:07 ` [PATCH 5/7] drm/tidss: Clear the interrupt status for interrupts being disabled Tomi Valkeinen
2024-10-21 15:13   ` Jon Cormier
2024-11-24 17:28   ` Aradhya Bhatia
2024-10-21 14:07 ` [PATCH 6/7] drm/tidss: Fix race condition while handling interrupt registers Tomi Valkeinen
2024-10-21 15:14   ` Jon Cormier
2024-11-24 17:29   ` Aradhya Bhatia
2024-10-21 14:07 ` [PATCH 7/7] drm/tidss: Rename 'wait_lock' to 'irq_lock' Tomi Valkeinen
2024-11-22  8:09   ` Devarsh Thakkar
2024-11-24 17:30   ` Aradhya Bhatia

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=f51c5f0a-7fcf-971b-f190-fa52a939158d@ti.com \
    --to=devarsht@ti.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jcormier@criticallink.com \
    --cc=jyri.sarha@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®