linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: mythripk@ti.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/3] OMAPDSS: HDMI: Add support for DSS_HDMI Interrupt
Date: Tue, 27 Mar 2012 13:30:01 +0300	[thread overview]
Message-ID: <1332844201.1867.111.camel@deskari> (raw)
In-Reply-To: <1332249307-26875-3-git-send-email-mythripk@ti.com>

[-- Attachment #1: Type: text/plain, Size: 2319 bytes --]

On Tue, 2012-03-20 at 18:45 +0530, mythripk@ti.com wrote:
> From: Mythri P K <mythripk@ti.com>
> 
> Add support for DSS_HDMI interrupt handling in HDMI driver
> by registering for the same. This is the path for many necessary HDMI
> interrupts such as PLL lock/unlock, PHY connect/disconnet, video frame
> done etc.
> 
> Signed-off-by: Mythri P K <mythripk@ti.com>
> ---
>  drivers/video/omap2/dss/dss_features.c    |    1 +
>  drivers/video/omap2/dss/hdmi.c            |   21 +++++++++++++++++++++
>  drivers/video/omap2/dss/ti_hdmi.h         |    3 +++
>  drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c |   13 +++++++++++++
>  4 files changed, 38 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
> index ce14aa6..29c5548 100644
> --- a/drivers/video/omap2/dss/dss_features.c
> +++ b/drivers/video/omap2/dss/dss_features.c
> @@ -566,6 +566,7 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
>  	.dump_core		=	ti_hdmi_4xxx_core_dump,
>  	.dump_pll		=	ti_hdmi_4xxx_pll_dump,
>  	.dump_phy		=	ti_hdmi_4xxx_phy_dump,
> +	.irq_handle		=	ti_hdmi_4xxx_intr_handler,
>  #if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
>  	defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
>  	.audio_enable		=       ti_hdmi_4xxx_wp_audio_enable,
> diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
> index c4b4f69..14e90b5 100644
> --- a/drivers/video/omap2/dss/hdmi.c
> +++ b/drivers/video/omap2/dss/hdmi.c
> @@ -67,6 +67,8 @@ static struct {
>  	struct platform_device *pdev;
>  	struct hdmi_ip_data ip_data;
>  
> +	int irq;
> +	spinlock_t irq_lock;
>  	struct clk *sys_clk;
>  } hdmi;
>  
> @@ -790,6 +792,19 @@ static void hdmi_put_clocks(void)
>  		clk_put(hdmi.sys_clk);
>  }
>  
> +static irqreturn_t hdmi_irq_handler(int irq, void *arg)
> +{
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&hdmi.irq_lock, flags);
> +
> +	hdmi.ip_data.ops->irq_handle(&hdmi.ip_data);
> +
> +	spin_unlock_irqrestore(&hdmi.irq_lock, flags);

So what is this spinlock supposed to protect? This is the only place you
use it.

> +
> +	return IRQ_HANDLED;
> +}

I think all this code should be in the ti_hdmi_4xxx_ip.c, as it's
dealing with on omap4 hdmi interrupt.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-03-27 10:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 13:15 [PATCH 0/3] OMAPDSS: HDMI: Interrupt and PHY state handling support mythripk
2012-03-20 13:15 ` [PATCH 1/3] OMAPDSS: HDMI: support for interrupt enabling mythripk
2012-03-20 13:15   ` [PATCH 2/3] OMAPDSS: HDMI: Add support for DSS_HDMI Interrupt mythripk
2012-03-20 13:15     ` [PATCH 3/3] OMAPDSS: HDMI: wait for TMDS to be high before putting mythripk
2012-03-27 10:30       ` Tomi Valkeinen
2012-03-27 10:30     ` Tomi Valkeinen [this message]
2012-03-27 10:29   ` [PATCH 1/3] OMAPDSS: HDMI: support for interrupt enabling Tomi Valkeinen
2012-03-27 10:29 ` [PATCH 0/3] OMAPDSS: HDMI: Interrupt and PHY state handling support 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=1332844201.1867.111.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mythripk@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).