Re: [PATCH 4/7] imx-drm: ipu-dc: Wait for DC_FC_1 / DP_SF_END interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
>  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.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux