From: Neil Armstrong <narmstrong@baylibre.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@siol.net>
Cc: maxime.ripard@bootlin.com, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, airlied@linux.ie, wens@csie.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver
Date: Mon, 25 Mar 2019 09:33:11 +0100 [thread overview]
Message-ID: <5C989247.6090709@baylibre.com> (raw)
In-Reply-To: <20190325013531.GB4540@pendragon.ideasonboard.com>
Le 25/03/2019 02:35, Laurent Pinchart a écrit :
> Hi Jernej,
>
> Thank you for the patch.
>
> On Sun, Mar 24, 2019 at 10:21:42PM +0100, Jernej Skrabec wrote:
>> DW HDMI controller on some Allwinner SoCs has support for CEC, but due
>> to additional logic put between CEC controller and pins, it doesn't work
>> correctly, at least not with a lot of instrusive changes. Fortunately,
>> it's still possible to bitbang protocol.
>>
>> For such cases, add a platform option to suppress loading CEC driver. If
>> DW HDMI CEC driver would be loaded, it wouldn't work anyway and only
>> cause a confusion with multiple /dev entries.
>>
>> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>> ---
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
>> include/drm/bridge/dw_hdmi.h | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> index a63e5f0dae56..fdda26f8b056 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> @@ -2634,7 +2634,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
>> hdmi->audio = platform_device_register_full(&pdevinfo);
>> }
>>
>> - if (config0 & HDMI_CONFIG0_CEC) {
>> + if (!plat_data->is_cec_unusable && (config0 & HDMI_CONFIG0_CEC)) {
>> cec.hdmi = hdmi;
>> cec.ops = &dw_hdmi_cec_ops;
>> cec.irq = irq;
>> diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
>> index 66e70770cce5..764b8bcfa62c 100644
>> --- a/include/drm/bridge/dw_hdmi.h
>> +++ b/include/drm/bridge/dw_hdmi.h
>> @@ -144,6 +144,8 @@ struct dw_hdmi_plat_data {
>> int (*configure_phy)(struct dw_hdmi *hdmi,
>> const struct dw_hdmi_plat_data *pdata,
>> unsigned long mpixelclock);
>> +
>> + unsigned int is_cec_unusable : 1;
>
> Strictly speaking your CEC controller isn't unusable, it's just a bit
> difficult to use it according to your commit message. Would disable_cec
> be a more appropriate field name ?
Actually, it would be useful to have in for Amlogic SoCs also, the dw-hdmi
is configured with the CEC engine, but isn't connected to an external I/O.
And we have easy way to disable it unless disabling the DW-HDMI CEC driver...
With a more appropriate name,
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
> And how difficult would it be to
> support the hardware CEC controller, would that result in changes that
> could be useful to other vendors too ?
>
>> };
>>
>> struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@siol.net>
Cc: maxime.ripard@bootlin.com, airlied@linux.ie,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
wens@csie.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver
Date: Mon, 25 Mar 2019 09:33:11 +0100 [thread overview]
Message-ID: <5C989247.6090709@baylibre.com> (raw)
In-Reply-To: <20190325013531.GB4540@pendragon.ideasonboard.com>
Le 25/03/2019 02:35, Laurent Pinchart a écrit :
> Hi Jernej,
>
> Thank you for the patch.
>
> On Sun, Mar 24, 2019 at 10:21:42PM +0100, Jernej Skrabec wrote:
>> DW HDMI controller on some Allwinner SoCs has support for CEC, but due
>> to additional logic put between CEC controller and pins, it doesn't work
>> correctly, at least not with a lot of instrusive changes. Fortunately,
>> it's still possible to bitbang protocol.
>>
>> For such cases, add a platform option to suppress loading CEC driver. If
>> DW HDMI CEC driver would be loaded, it wouldn't work anyway and only
>> cause a confusion with multiple /dev entries.
>>
>> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>> ---
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
>> include/drm/bridge/dw_hdmi.h | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> index a63e5f0dae56..fdda26f8b056 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> @@ -2634,7 +2634,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
>> hdmi->audio = platform_device_register_full(&pdevinfo);
>> }
>>
>> - if (config0 & HDMI_CONFIG0_CEC) {
>> + if (!plat_data->is_cec_unusable && (config0 & HDMI_CONFIG0_CEC)) {
>> cec.hdmi = hdmi;
>> cec.ops = &dw_hdmi_cec_ops;
>> cec.irq = irq;
>> diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
>> index 66e70770cce5..764b8bcfa62c 100644
>> --- a/include/drm/bridge/dw_hdmi.h
>> +++ b/include/drm/bridge/dw_hdmi.h
>> @@ -144,6 +144,8 @@ struct dw_hdmi_plat_data {
>> int (*configure_phy)(struct dw_hdmi *hdmi,
>> const struct dw_hdmi_plat_data *pdata,
>> unsigned long mpixelclock);
>> +
>> + unsigned int is_cec_unusable : 1;
>
> Strictly speaking your CEC controller isn't unusable, it's just a bit
> difficult to use it according to your commit message. Would disable_cec
> be a more appropriate field name ?
Actually, it would be useful to have in for Amlogic SoCs also, the dw-hdmi
is configured with the CEC engine, but isn't connected to an external I/O.
And we have easy way to disable it unless disabling the DW-HDMI CEC driver...
With a more appropriate name,
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
> And how difficult would it be to
> support the hardware CEC controller, would that result in changes that
> could be useful to other vendors too ?
>
>> };
>>
>> struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>
next prev parent reply other threads:[~2019-03-25 8:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 21:21 [PATCH 0/2] drm/sun4i: dw-hdmi: Improve CEC support Jernej Skrabec
2019-03-24 21:21 ` Jernej Skrabec
2019-03-24 21:21 ` [PATCH 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver Jernej Skrabec
2019-03-24 21:21 ` Jernej Skrabec
2019-03-25 1:35 ` Laurent Pinchart
2019-03-25 1:35 ` Laurent Pinchart
2019-03-25 1:35 ` Laurent Pinchart
2019-03-25 6:18 ` Jernej Škrabec
2019-03-25 6:18 ` Jernej Škrabec
2019-03-25 8:33 ` Neil Armstrong [this message]
2019-03-25 8:33 ` Neil Armstrong
2019-03-24 21:21 ` [PATCH 2/2] drm/sun4i: dw-hdmi: Bit bang CEC on some SoCs Jernej Skrabec
2019-03-24 21:21 ` Jernej Skrabec
-- strict thread matches above, loose matches on Subject: below --
2021-04-16 9:27 [PATCH 0/2] drm/bridge: dw-hdmi: disable loading of DW-HDMI CEC sub-driver Neil Armstrong
2021-04-16 9:27 ` [PATCH 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver Neil Armstrong
2021-04-16 9:27 ` Neil Armstrong
2021-04-16 9:27 ` Neil Armstrong
2021-04-16 9:27 ` Neil Armstrong
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=5C989247.6090709@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=wens@csie.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.