All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 09/23] drm: omapdrm: Handle OCP error IRQ directly
Date: Tue, 10 May 2016 16:10:59 +0300	[thread overview]
Message-ID: <5731DDE3.8020706@ti.com> (raw)
In-Reply-To: <1461702945-14185-10-git-send-email-laurent.pinchart@ideasonboard.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 3698 bytes --]

On 26/04/16 23:35, Laurent Pinchart wrote:
> Instead of going through a complicated registration mechanism, just
> call the OCP error IRQ handler directly from the main IRQ handler.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.h |  1 -
>  drivers/gpu/drm/omapdrm/omap_irq.c | 29 +++++++++++------------------
>  2 files changed, 11 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
> index 2d8fbdb2d39f..17dd3b98fc1a 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -104,7 +104,6 @@ struct omap_drm_private {
>  	/* irq handling: */
>  	struct list_head irq_list;    /* list of omap_drm_irq */
>  	uint32_t irq_mask;		/* enabled irqs in addition to irq_list */
> -	struct omap_drm_irq error_handler;
>  
>  	/* atomic commit */
>  	struct {
> diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
> index a90e093f5f42..499da6e2c5a4 100644
> --- a/drivers/gpu/drm/omapdrm/omap_irq.c
> +++ b/drivers/gpu/drm/omapdrm/omap_irq.c
> @@ -21,12 +21,6 @@
>  
>  static DEFINE_SPINLOCK(list_lock);
>  
> -static void omap_irq_error_handler(struct omap_drm_irq *irq,
> -		uint32_t irqstatus)
> -{
> -	DRM_ERROR("errors: %08x\n", irqstatus);
> -}
> -
>  /* call with list_lock and dispc runtime held */
>  static void omap_irq_update(struct drm_device *dev)
>  {
> @@ -219,6 +213,14 @@ static void omap_irq_fifo_underflow(uint32_t irqstatus)
>  	pr_cont("(0x%08x)\n", irqstatus);
>  }
>  
> +static void omap_irq_error_handler(uint32_t irqstatus)

I think the function should mention "ocp_error".

> +{
> +	if (!(irqstatus & DISPC_IRQ_OCP_ERR))
> +		return;
> +
> +	DRM_ERROR("errors: %08x\n", irqstatus);

Now we have a separate print for OCP error, so we could instead of
printing hex numbers, print "OCP error".

> +}
> +
>  static irqreturn_t omap_irq_handler(int irq, void *arg)
>  {
>  	struct drm_device *dev = (struct drm_device *) arg;
> @@ -245,6 +247,7 @@ static irqreturn_t omap_irq_handler(int irq, void *arg)
>  			omap_crtc_error_irq(crtc, irqstatus);
>  	}
>  
> +	omap_irq_error_handler(irqstatus);
>  	omap_irq_fifo_underflow(irqstatus);
>  
>  	spin_lock_irqsave(&list_lock, flags);
> @@ -270,14 +273,14 @@ static irqreturn_t omap_irq_handler(int irq, void *arg)
>  int omap_drm_irq_install(struct drm_device *dev)
>  {
>  	struct omap_drm_private *priv = dev->dev_private;
> -	struct omap_drm_irq *error_handler = &priv->error_handler;
>  	unsigned int num_mgrs = dss_feat_get_num_mgrs();
>  	unsigned int i;
>  	int ret;
>  
>  	INIT_LIST_HEAD(&priv->irq_list);
>  
> -	priv->irq_mask = DISPC_IRQ_GFX_FIFO_UNDERFLOW
> +	priv->irq_mask = DISPC_IRQ_OCP_ERR
> +		       | DISPC_IRQ_GFX_FIFO_UNDERFLOW
>  		       | DISPC_IRQ_VID1_FIFO_UNDERFLOW
>  		       | DISPC_IRQ_VID2_FIFO_UNDERFLOW
>  		       | DISPC_IRQ_VID3_FIFO_UNDERFLOW;
> @@ -293,16 +296,6 @@ int omap_drm_irq_install(struct drm_device *dev)
>  	if (ret < 0)
>  		return ret;
>  
> -	error_handler->irq = omap_irq_error_handler;
> -	error_handler->irqmask = DISPC_IRQ_OCP_ERR;
> -
> -	/* for now ignore DISPC_IRQ_SYNC_LOST_DIGIT.. really I think
> -	 * we just need to ignore it while enabling tv-out
> -	 */
> -	error_handler->irqmask &= ~DISPC_IRQ_SYNC_LOST_DIGIT;
> -
> -	omap_irq_register(dev, error_handler);

This makes me wonder is the previous patch correct... It doesn't ignore
the SYNC_LOST_DIGIT. Oh, but is this ignore only for the error handler
that only prints. Ah, confusing =).

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-05-10 13:11 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 20:35 [PATCH 00/23] OMAP DRM fixes and improvements Laurent Pinchart
2016-04-26 20:35 ` [PATCH 01/23] drm: omapdrm: fb: Limit number of planes per framebuffer to two Laurent Pinchart
2016-04-26 20:35 ` [PATCH 02/23] drm: omapdrm: fb: Don't store format BPP for each plane Laurent Pinchart
2016-05-02 15:43   ` Tomi Valkeinen
2016-05-02 21:01     ` Rob Clark
2016-05-03  6:08       ` Tomi Valkeinen
2016-05-03 11:22         ` Ville Syrjälä
2016-05-09 20:57       ` Laurent Pinchart
2016-05-10  7:14         ` Tomi Valkeinen
2016-06-06  1:39           ` Laurent Pinchart
2016-06-06  6:27             ` Daniel Vetter
2016-05-09 20:55     ` Laurent Pinchart
2016-05-10  7:34       ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 03/23] drm: omapdrm: fb: Store number of planes in format structure Laurent Pinchart
2016-04-26 20:35 ` [PATCH 04/23] drm: omapdrm: fb: Simplify objects lookup when creating framebuffer Laurent Pinchart
2016-05-09 14:20   ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 05/23] drm: omapdrm: fb: Simplify mode command checks " Laurent Pinchart
2016-05-09 15:15   ` Tomi Valkeinen
2016-06-06  0:24     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 06/23] drm: omapdrm: fb: Turn framebuffer creation error messages into debug Laurent Pinchart
2016-05-09 14:28   ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 07/23] drm: omapdrm: Handle FIFO underflow IRQs internally Laurent Pinchart
2016-05-09 14:42   ` Tomi Valkeinen
2016-06-05 23:21     ` Laurent Pinchart
2016-06-06 10:50       ` Tomi Valkeinen
2016-06-06 22:51         ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 08/23] drm: omapdrm: Handle CRTC error IRQs directly Laurent Pinchart
2016-05-10 12:58   ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 09/23] drm: omapdrm: Handle OCP error IRQ directly Laurent Pinchart
2016-05-10 13:10   ` Tomi Valkeinen [this message]
2016-06-06  0:45     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 10/23] drm: omapdrm: Use atomic state instead of local device state Laurent Pinchart
2016-05-10 13:24   ` Tomi Valkeinen
2016-05-11  7:37     ` Daniel Vetter
2016-06-06  1:14       ` Laurent Pinchart
2016-06-06 10:37         ` Tomi Valkeinen
2016-06-06 22:53           ` Laurent Pinchart
2016-09-18 10:37         ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 11/23] drm: omapdrm: Check DSS manager state in the enable/disable helpers Laurent Pinchart
2016-05-10 13:28   ` Tomi Valkeinen
2016-05-11  7:40     ` Daniel Vetter
2016-06-06  1:36       ` Laurent Pinchart
2016-06-06  1:38     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 12/23] drm: omapdrm: Prevent processing the same event multiple times Laurent Pinchart
2016-04-26 20:35 ` [PATCH 13/23] drm: omapdrm: Use a spinlock to protect the CRTC pending flag Laurent Pinchart
2016-04-26 20:35 ` [PATCH 14/23] drm: omapdrm: Keep vblank interrupt enabled while CRTC is active Laurent Pinchart
2016-04-26 20:35 ` [PATCH 15/23] drm: omapdrm: Don't expose the omap_irq_(un)register() functions Laurent Pinchart
2016-05-11 11:05   ` Tomi Valkeinen
2016-06-06  0:53     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 16/23] drm: omapdrm: Don't call DISPC power handling in IRQ wait functions Laurent Pinchart
2016-04-26 20:35 ` [PATCH 17/23] drm: omapdrm: Make pipe2vbl function static Laurent Pinchart
2016-05-11 11:01   ` Tomi Valkeinen
2016-06-06  0:49     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 18/23] drm: omapdrm: Simplify IRQ wait implementation Laurent Pinchart
2016-04-26 20:35 ` [PATCH 19/23] drm: omapdrm: Remove global variables Laurent Pinchart
2016-04-26 20:35 ` [PATCH 20/23] drm: omapdrm: panel-lgphilips-lb035q02: Remove unused backlight GPIO Laurent Pinchart
2016-05-10 10:55   ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 21/23] drm: omapdrm: Remove unused omap_framebuffer_bo function Laurent Pinchart
2016-05-10 11:00   ` Tomi Valkeinen
2016-06-06  0:29     ` Laurent Pinchart
2016-04-26 20:35 ` [PATCH 22/23] drm: omapdrm: Remove unused omap_gem_tiled_size function Laurent Pinchart
2016-05-10 10:57   ` Tomi Valkeinen
2016-04-26 20:35 ` [PATCH 23/23] drm: omapdrm: Remove buffer synchronization support Laurent Pinchart
2016-05-11 11:12   ` Tomi Valkeinen

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=5731DDE3.8020706@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.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.