All of lore.kernel.org
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] drm/bridge: dw-hdmi: add cec notifier support
Date: Wed, 02 Aug 2017 17:11:41 +0300	[thread overview]
Message-ID: <2091520.p8lH1xBY9c@avalon> (raw)
In-Reply-To: <E1dcBhV-00088e-8x@rmk-PC.armlinux.org.uk>

Hi Russell,

Thank you for the patch.

On Monday 31 Jul 2017 15:29:41 Russell King wrote:
> Add CEC notifier support to the HDMI bridge driver, so that the CEC
> part of the IP can receive its physical address.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/gpu/drm/bridge/synopsys/Kconfig   |  1 +
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 +++++++++++++++++++++-
>  2 files changed, 22 insertions(+), 1 deletion(-)

[snip]

> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index
> ead11242c4b9..82e55ee8e4fa 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

[snip]

> @@ -2376,6 +2387,12 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  	if (ret)
>  		goto err_iahb;
> 
> +	hdmi->cec_notifier = cec_notifier_get(dev);
> +	if (!hdmi->cec_notifier) {
> +		ret = -ENOMEM;
> +		goto err_iahb;
> +	}
> +
>  	/*
>  	 * To prevent overflows in HDMI_IH_FC_STAT2, set the clk regenerator
>  	 * N and cts values before enabling phy
> @@ -2452,6 +2469,9 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  		hdmi->ddc = NULL;
>  	}
> 
> +	if (hdmi->cec_notifier)
> +		cec_notifier_put(hdmi->cec_notifier);
> +
>  	clk_disable_unprepare(hdmi->iahb_clk);
>  err_isfr:
>  	clk_disable_unprepare(hdmi->isfr_clk);

I'm not very familiar yet with the CEC API so I made have missed something, 
but shouldn't you call cec_notifier_put() in the remove() handler ?

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] drm/bridge: dw-hdmi: add cec notifier support
Date: Wed, 02 Aug 2017 17:11:41 +0300	[thread overview]
Message-ID: <2091520.p8lH1xBY9c@avalon> (raw)
In-Reply-To: <E1dcBhV-00088e-8x@rmk-PC.armlinux.org.uk>

Hi Russell,

Thank you for the patch.

On Monday 31 Jul 2017 15:29:41 Russell King wrote:
> Add CEC notifier support to the HDMI bridge driver, so that the CEC
> part of the IP can receive its physical address.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/gpu/drm/bridge/synopsys/Kconfig   |  1 +
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 +++++++++++++++++++++-
>  2 files changed, 22 insertions(+), 1 deletion(-)

[snip]

> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index
> ead11242c4b9..82e55ee8e4fa 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

[snip]

> @@ -2376,6 +2387,12 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  	if (ret)
>  		goto err_iahb;
> 
> +	hdmi->cec_notifier = cec_notifier_get(dev);
> +	if (!hdmi->cec_notifier) {
> +		ret = -ENOMEM;
> +		goto err_iahb;
> +	}
> +
>  	/*
>  	 * To prevent overflows in HDMI_IH_FC_STAT2, set the clk regenerator
>  	 * N and cts values before enabling phy
> @@ -2452,6 +2469,9 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  		hdmi->ddc = NULL;
>  	}
> 
> +	if (hdmi->cec_notifier)
> +		cec_notifier_put(hdmi->cec_notifier);
> +
>  	clk_disable_unprepare(hdmi->iahb_clk);
>  err_isfr:
>  	clk_disable_unprepare(hdmi->isfr_clk);

I'm not very familiar yet with the CEC API so I made have missed something, 
but shouldn't you call cec_notifier_put() in the remove() handler ?

-- 
Regards,

Laurent Pinchart

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

  parent reply	other threads:[~2017-08-02 14:11 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 14:29 [PATCH v2 0/4] dw-hdmi CEC support Russell King - ARM Linux
2017-07-31 14:29 ` Russell King - ARM Linux
2017-07-31 14:29 ` [PATCH v2 1/4] drm/bridge: dw-hdmi: add cec notifier support Russell King
2017-07-31 14:29   ` Russell King
2017-07-31 14:33   ` Neil Armstrong
2017-07-31 14:33     ` Neil Armstrong
2017-07-31 15:25   ` Hans Verkuil
2017-07-31 15:25     ` Hans Verkuil
2017-08-04 13:36     ` Archit Taneja
2017-08-04 13:36       ` Archit Taneja
2017-08-05  9:23       ` Hans Verkuil
2017-08-05  9:23         ` Hans Verkuil
2017-08-07  3:59         ` Archit Taneja
2017-08-07  3:59           ` Archit Taneja
2017-08-02 14:11   ` Laurent Pinchart [this message]
2017-08-02 14:11     ` Laurent Pinchart
2017-08-02 14:17     ` Hans Verkuil
2017-08-02 14:17       ` Hans Verkuil
2017-08-02 17:44       ` Russell King - ARM Linux
2017-08-02 17:44         ` Russell King - ARM Linux
2017-07-31 14:29 ` [PATCH v2 2/4] drm/bridge: dw-hdmi: add better clock disable control Russell King
2017-07-31 14:29   ` Russell King
2017-07-31 15:26   ` Hans Verkuil
2017-07-31 15:26     ` Hans Verkuil
2017-08-04 13:39     ` Archit Taneja
2017-08-04 13:39       ` Archit Taneja
2017-07-31 14:29 ` [PATCH v2 3/4] drm/bridge: dw-hdmi: add cec driver Russell King
2017-07-31 14:29   ` Russell King
2017-07-31 15:35   ` Hans Verkuil
2017-07-31 15:35     ` Hans Verkuil
2017-08-01 22:32   ` Laurent Pinchart
2017-08-01 22:32     ` Laurent Pinchart
2017-08-02  6:47     ` Hans Verkuil
2017-08-02  6:47       ` Hans Verkuil
2017-08-02 13:14       ` Laurent Pinchart
2017-08-02 13:14         ` Laurent Pinchart
2017-08-02 13:27         ` Russell King - ARM Linux
2017-08-02 13:27           ` Russell King - ARM Linux
2017-08-02 13:34           ` Hans Verkuil
2017-08-02 13:34             ` Hans Verkuil
2017-08-02 14:22             ` Laurent Pinchart
2017-08-02 14:22               ` Laurent Pinchart
2017-08-02 17:43               ` Russell King - ARM Linux
2017-08-02 17:43                 ` Russell King - ARM Linux
2017-08-02 14:17         ` Neil Armstrong
2017-07-31 14:29 ` [PATCH v2 4/4] drm/bridge: dw-hdmi: remove CEC engine register definitions Russell King
2017-07-31 14:29   ` Russell King
2017-07-31 15:26   ` Hans Verkuil
2017-07-31 15:26     ` Hans Verkuil
2017-08-01 22:29 ` [PATCH v2 0/4] dw-hdmi CEC support Laurent Pinchart
2017-08-01 22:29   ` Laurent Pinchart

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=2091520.p8lH1xBY9c@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.