mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kernel@pengutronix.de
Subject: Re: [PATCH 4/7] imx-drm: ipu-dc: Wait for DC_FC_1 / DP_SF_END interrupt
Date: Mon, 14 Apr 2014 22:45:07 +0100	[thread overview]
Message-ID: <20140414214507.GO24070@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1397488895-17930-5-git-send-email-p.zabel@pengutronix.de>

On Mon, Apr 14, 2014 at 05:21:32PM +0200, Philipp Zabel wrote:
> Wait for the DC Frame Complete or DP Sync Flow End interrupts
> before disabling DC channels.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 71 +++++++++++++++++++++++----------
>  1 file changed, 50 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> index d5de8bb..13b7538 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> @@ -18,6 +18,7 @@
>  #include <linux/types.h>
>  #include <linux/errno.h>
>  #include <linux/delay.h>
> +#include <linux/interrupt.h>
>  #include <linux/io.h>
>  
>  #include "../imx-drm.h"
> @@ -110,6 +111,9 @@ struct ipu_dc_priv {
>  	struct device		*dev;
>  	struct ipu_dc		channels[IPU_DC_NUM_CHANNELS];
>  	struct mutex		mutex;
> +	struct completion	comp;
> +	int			dc_irq;
> +	int			dp_irq;
>  };
>  
>  static void dc_link_event(struct ipu_dc *dc, int event, int addr, int priority)
> @@ -239,38 +243,46 @@ void ipu_dc_enable_channel(struct ipu_dc *dc)
>  }
>  EXPORT_SYMBOL_GPL(ipu_dc_enable_channel);
>  
> +static irqreturn_t dc_irq_handler(int irq, void *dev_id)
> +{
> +	struct ipu_dc *dc = dev_id;
> +	u32 reg;
> +
> +	reg = readl(dc->base + DC_WR_CH_CONF);
> +	reg &= ~DC_WR_CH_CONF_PROG_TYPE_MASK;
> +	writel(reg, dc->base + DC_WR_CH_CONF);
> +
> +	/* The Freescale BSP kernel clears DIx_COUNTER_RELEASE here */
> +
> +	disable_irq(irq);

Shouldn't this be disable_irq_nosync() ?

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

  reply	other threads:[~2014-04-14 21:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 15:21 [PATCH 0/7] Reorder i.MX IPU display enable/disable sequence Philipp Zabel
2014-04-14 15:21 ` [PATCH 1/7] imx-drm: ipu-common: add ipu_map_irq to request non-IDMAC interrupts Philipp Zabel
2014-04-14 15:21 ` [PATCH 2/7] imx-drm: ipu-common: Add helpers to check for a busy IDMAC channel and to busywait for an interrupt Philipp Zabel
2014-04-14 15:21 ` [PATCH 3/7] imx-drm: ipu-dmfc: Wait for FIFOs to run empty before disabling Philipp Zabel
2014-04-14 15:21 ` [PATCH 4/7] imx-drm: ipu-dc: Wait for DC_FC_1 / DP_SF_END interrupt Philipp Zabel
2014-04-14 21:45   ` Russell King - ARM Linux [this message]
2014-04-14 15:21 ` [PATCH 5/7] imx-drm: ipu-dp: Split disabling the DP foreground channel from disabling the DP module Philipp Zabel
2014-04-14 15:21 ` [PATCH 6/7] imx-drm: imx-dp: When disabling the DP foreground channel, wait until the DP background channel is finished before disabling the IDMAC channel Philipp Zabel
2014-04-14 15:21 ` [PATCH 7/7] imx-drm: ipuv3-crtc: Change display enable/disable order Philipp Zabel
2014-04-14 19:57 ` [PATCH 0/7] Reorder i.MX IPU display enable/disable sequence Russell King - ARM Linux
2014-04-14 21:31 ` Russell King - ARM Linux

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=20140414214507.GO24070@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.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®