public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Patrice.chotard@st.com,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCHv6 03/10] exynos_hdmi: add CEC notifier support
Date: Fri, 07 Apr 2017 14:07:31 +0200	[thread overview]
Message-ID: <c8a28cd7-e11d-892e-5f76-3fb18f94118d@samsung.com> (raw)
In-Reply-To: <20170331122036.55706-4-hverkuil@xs4all.nl>

On 31.03.2017 14:20, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Implement the CEC notifier support to allow CEC drivers to
> be informed when there is a new physical address.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

 --
Regards
Andrzej

> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 88ccc0469316..bc4c8d0a66f4 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -43,6 +43,8 @@
>  
>  #include <drm/exynos_drm.h>
>  
> +#include <media/cec-notifier.h>
> +
>  #include "exynos_drm_drv.h"
>  #include "exynos_drm_crtc.h"
>  
> @@ -119,6 +121,7 @@ struct hdmi_context {
>  	bool				dvi_mode;
>  	struct delayed_work		hotplug_work;
>  	struct drm_display_mode		current_mode;
> +	struct cec_notifier		*notifier;
>  	const struct hdmi_driver_data	*drv_data;
>  
>  	void __iomem			*regs;
> @@ -822,6 +825,7 @@ static enum drm_connector_status hdmi_detect(struct drm_connector *connector,
>  	if (gpiod_get_value(hdata->hpd_gpio))
>  		return connector_status_connected;
>  
> +	cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
>  	return connector_status_disconnected;
>  }
>  
> @@ -860,6 +864,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>  		edid->width_cm, edid->height_cm);
>  
>  	drm_mode_connector_update_edid_property(connector, edid);
> +	cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid);
>  
>  	ret = drm_add_edid_modes(connector, edid);
>  
> @@ -1503,6 +1508,7 @@ static void hdmi_disable(struct drm_encoder *encoder)
>  	if (funcs && funcs->disable)
>  		(*funcs->disable)(crtc);
>  
> +	cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
>  	cancel_delayed_work(&hdata->hotplug_work);
>  
>  	hdmiphy_disable(hdata);
> @@ -1878,15 +1884,22 @@ static int hdmi_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	hdata->notifier = cec_notifier_get(&pdev->dev);
> +	if (hdata->notifier == NULL) {
> +		ret = -ENOMEM;
> +		goto err_hdmiphy;
> +	}
> +
>  	pm_runtime_enable(dev);
>  
>  	ret = component_add(&pdev->dev, &hdmi_component_ops);
>  	if (ret)
> -		goto err_disable_pm_runtime;
> +		goto err_notifier_put;
>  
>  	return ret;
>  
> -err_disable_pm_runtime:
> +err_notifier_put:
> +	cec_notifier_put(hdata->notifier);
>  	pm_runtime_disable(dev);
>  
>  err_hdmiphy:
> @@ -1905,9 +1918,11 @@ static int hdmi_remove(struct platform_device *pdev)
>  	struct hdmi_context *hdata = platform_get_drvdata(pdev);
>  
>  	cancel_delayed_work_sync(&hdata->hotplug_work);
> +	cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
>  
>  	component_del(&pdev->dev, &hdmi_component_ops);
>  
> +	cec_notifier_put(hdata->notifier);
>  	pm_runtime_disable(&pdev->dev);
>  
>  	if (!IS_ERR(hdata->reg_hdmi_en))

  reply	other threads:[~2017-04-07 12:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 12:20 [PATCHv6 00/10] video/exynos/sti/cec: add CEC notifier & use in drivers Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 01/10] media: add CEC notifier support Hans Verkuil
2017-03-31 20:46   ` Russell King - ARM Linux
2017-04-01  9:22     ` Hans Verkuil
2017-04-01  9:39       ` Russell King - ARM Linux
2017-04-01  9:43         ` Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 02/10] cec: integrate " Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 03/10] exynos_hdmi: add " Hans Verkuil
2017-04-07 12:07   ` Andrzej Hajda [this message]
2017-03-31 12:20 ` [PATCHv6 04/10] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 05/10] s5p-cec.txt: document the HDMI controller phandle Hans Verkuil
2017-04-03 16:43   ` Rob Herring
2017-03-31 12:20 ` [PATCHv6 06/10] s5p-cec: add cec-notifier support, move out of staging Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 07/10] sti: hdmi: add CEC notifier support Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 08/10] stih-cec.txt: document new hdmi phandle Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 09/10] stih-cec: add CEC notifier support Hans Verkuil
2017-03-31 12:20 ` [PATCHv6 10/10] ARM: dts: STiH410: update sti-cec for " Hans Verkuil
2017-03-31 14:39 ` [PATCHv6 00/10] video/exynos/sti/cec: add CEC notifier & use in drivers Russell King - ARM Linux
2017-03-31 16:35   ` 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=c8a28cd7-e11d-892e-5f76-3fb18f94118d@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=Patrice.chotard@st.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=javier@osg.samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=m.szyprowski@samsung.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