linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: omapdrm: displays: fix port_num for opa362 output
@ 2018-07-27 14:24 H. Nikolaus Schaller
  2018-08-19 14:07 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: H. Nikolaus Schaller @ 2018-07-27 14:24 UTC (permalink / raw)
  To: Tomi Valkeinen, David Airlie, Sebastian Reichel,
	Laurent Pinchart, Andrew F. Davis, H. Nikolaus Schaller
  Cc: dri-devel, linux-kernel, linux-omap, letux-kernel

The opa362 amplifier has two ports, an input (usually connected
to the OMAP3 VENC) and an output port connected to the external
connector.

These are usually defined as input port@0 and outpt port@1 in
the DT and really distinguished by the reg = <port_num> property
of these nodes.

But we are missing to define the output port as number 1 so
it does not match the DT entry.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index afee1b8b457a..296d46f060b2 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -208,6 +208,7 @@ static int opa362_probe(struct platform_device *pdev)
 	dssdev->type = OMAP_DISPLAY_TYPE_VENC;
 	dssdev->output_type = OMAP_DISPLAY_TYPE_VENC;
 	dssdev->owner = THIS_MODULE;
+	dssdev->port_num = 1;	/* second port */
 
 	r = omapdss_register_output(dssdev);
 	if (r) {
-- 
2.12.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: omapdrm: displays: fix port_num for opa362 output
  2018-07-27 14:24 [PATCH] drm: omapdrm: displays: fix port_num for opa362 output H. Nikolaus Schaller
@ 2018-08-19 14:07 ` Laurent Pinchart
  2018-08-22  7:46   ` H. Nikolaus Schaller
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2018-08-19 14:07 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Tomi Valkeinen, David Airlie, Sebastian Reichel, Andrew F. Davis,
	dri-devel, linux-kernel, linux-omap, letux-kernel

Hi Nikolaus,

Thank you for the patch.

On Friday, 27 July 2018 17:24:32 EEST H. Nikolaus Schaller wrote:
> The opa362 amplifier has two ports, an input (usually connected
> to the OMAP3 VENC) and an output port connected to the external
> connector.
> 
> These are usually defined as input port@0 and outpt port@1 in
> the DT and really distinguished by the reg = <port_num> property
> of these nodes.
> 
> But we are missing to define the output port as number 1 so
> it does not match the DT entry.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

I think this patch is superseded by "[PATCH v3 36/61] drm/omap: dss: Replace 
omap_dss_device port number with bitmask" which should get merged in v4.20.

> ---
>  drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index
> afee1b8b457a..296d46f060b2 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> @@ -208,6 +208,7 @@ static int opa362_probe(struct platform_device *pdev)
>  	dssdev->type = OMAP_DISPLAY_TYPE_VENC;
>  	dssdev->output_type = OMAP_DISPLAY_TYPE_VENC;
>  	dssdev->owner = THIS_MODULE;
> +	dssdev->port_num = 1;	/* second port */
> 
>  	r = omapdss_register_output(dssdev);
>  	if (r) {

-- 
Regards,

Laurent Pinchart




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: omapdrm: displays: fix port_num for opa362 output
  2018-08-19 14:07 ` Laurent Pinchart
@ 2018-08-22  7:46   ` H. Nikolaus Schaller
  0 siblings, 0 replies; 3+ messages in thread
From: H. Nikolaus Schaller @ 2018-08-22  7:46 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Tomi Valkeinen, David Airlie, Sebastian Reichel, Andrew F. Davis,
	dri-devel, linux-kernel, linux-omap, letux-kernel

Hi Laurent,

> Am 19.08.2018 um 16:07 schrieb Laurent Pinchart <laurent.pinchart@ideasonboard.com>:
> 
> Hi Nikolaus,
> 
> Thank you for the patch.
> 
> On Friday, 27 July 2018 17:24:32 EEST H. Nikolaus Schaller wrote:
>> The opa362 amplifier has two ports, an input (usually connected
>> to the OMAP3 VENC) and an output port connected to the external
>> connector.
>> 
>> These are usually defined as input port@0 and outpt port@1 in
>> the DT and really distinguished by the reg = <port_num> property
>> of these nodes.
>> 
>> But we are missing to define the output port as number 1 so
>> it does not match the DT entry.
>> 
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> 
> I think this patch is superseded by "[PATCH v3 36/61] drm/omap: dss: Replace 
> omap_dss_device port number with bitmask"

looks good and from cursory review it seems to resolve the opa362
bug as a side-effect. Maybe this can be noted in the commit description.

What I am not sure how this magically defines the output as
reg=<1> or if we have to swap reg number definitions in the DT.
But encoder-tfp410.c and encoder-tpd12s015.c seem to do it the
same way, so it is very likely that it works as defined.

> which should get merged in v4.20.

Well, I had hoped our bug fix makes it into v4.19 and can be
potentially backported to stable.

Do you plan to backport you patch? It seems to be quite independent
and should apply to older releases.

BR,
Nikolaus


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-22  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 14:24 [PATCH] drm: omapdrm: displays: fix port_num for opa362 output H. Nikolaus Schaller
2018-08-19 14:07 ` Laurent Pinchart
2018-08-22  7:46   ` H. Nikolaus Schaller

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).