dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching
@ 2017-11-20  9:51 Peter Ujfalusi
  2017-11-21  7:04 ` Laurent Pinchart
  2017-11-21 10:23 ` Tomi Valkeinen
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2017-11-20  9:51 UTC (permalink / raw)
  To: tomi.valkeinen, laurent.pinchart, jsarha
  Cc: airlied, dri-devel, daniel, stable

I believe the intention of the commit 2c9fc9bf45f8
("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver")
was to identify omap4430 ES1.x, omap4430 ES2.x and other OMAP4 revisions,
like omap4460.

By using family=OMAP4 in the match the code will treat omap4460 ES1.x in a
same way as it would treat omap4430 ES1.x

This breaks HDMI audio on OMAP4460 devices (PandaES for example).

Correct the match rule so we are not going to get false positive match.

Fixes: 2c9fc9bf45f8 ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver")

CC: stable@vger.kernel.org # 4.14
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi,

Changes since v1:
- fix the hdmi4_features structure names for clarity.

Regards,
Peter

 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index 62e451162d96..b06f9956e733 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -886,25 +886,36 @@ struct hdmi4_features {
 	bool audio_use_mclk;
 };
 
-static const struct hdmi4_features hdmi4_es1_features = {
+static const struct hdmi4_features hdmi4430_es1_features = {
 	.cts_swmode = false,
 	.audio_use_mclk = false,
 };
 
-static const struct hdmi4_features hdmi4_es2_features = {
+static const struct hdmi4_features hdmi4430_es2_features = {
 	.cts_swmode = true,
 	.audio_use_mclk = false,
 };
 
-static const struct hdmi4_features hdmi4_es3_features = {
+static const struct hdmi4_features hdmi4_features = {
 	.cts_swmode = true,
 	.audio_use_mclk = true,
 };
 
 static const struct soc_device_attribute hdmi4_soc_devices[] = {
-	{ .family = "OMAP4", .revision = "ES1.?", .data = &hdmi4_es1_features },
-	{ .family = "OMAP4", .revision = "ES2.?", .data = &hdmi4_es2_features },
-	{ .family = "OMAP4",			  .data = &hdmi4_es3_features },
+	{
+		.machine = "OMAP4430",
+		.revision = "ES1.?",
+		.data = &hdmi4430_es1_features,
+	},
+	{
+		.machine = "OMAP4430",
+		.revision = "ES2.?",
+		.data = &hdmi4430_es2_features,
+	},
+	{
+		.family = "OMAP4",
+		.data = &hdmi4_features,
+	},
 	{ /* sentinel */ }
 };
 
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching
  2017-11-20  9:51 [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching Peter Ujfalusi
@ 2017-11-21  7:04 ` Laurent Pinchart
  2017-11-21 10:23 ` Tomi Valkeinen
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2017-11-21  7:04 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: tomi.valkeinen, jsarha, airlied, dri-devel, daniel, stable

Hi Peter,

Thank you for the patch.

On Monday, 20 November 2017 11:51:40 EET Peter Ujfalusi wrote:
> I believe the intention of the commit 2c9fc9bf45f8
> ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver")
> was to identify omap4430 ES1.x, omap4430 ES2.x and other OMAP4 revisions,
> like omap4460.
> 
> By using family=OMAP4 in the match the code will treat omap4460 ES1.x in a
> same way as it would treat omap4430 ES1.x
> 
> This breaks HDMI audio on OMAP4460 devices (PandaES for example).

Sorry for breaking this :-(

> Correct the match rule so we are not going to get false positive match.
> 
> Fixes: 2c9fc9bf45f8 ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4
> driver")
> 
> CC: stable@vger.kernel.org # 4.14
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> Hi,
> 
> Changes since v1:
> - fix the hdmi4_features structure names for clarity.
> 
> Regards,
> Peter
> 
>  drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c index 62e451162d96..b06f9956e733
> 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -886,25 +886,36 @@ struct hdmi4_features {
>  	bool audio_use_mclk;
>  };
> 
> -static const struct hdmi4_features hdmi4_es1_features = {
> +static const struct hdmi4_features hdmi4430_es1_features = {
>  	.cts_swmode = false,
>  	.audio_use_mclk = false,
>  };
> 
> -static const struct hdmi4_features hdmi4_es2_features = {
> +static const struct hdmi4_features hdmi4430_es2_features = {
>  	.cts_swmode = true,
>  	.audio_use_mclk = false,
>  };
> 
> -static const struct hdmi4_features hdmi4_es3_features = {
> +static const struct hdmi4_features hdmi4_features = {
>  	.cts_swmode = true,
>  	.audio_use_mclk = true,
>  };
> 
>  static const struct soc_device_attribute hdmi4_soc_devices[] = {
> -	{ .family = "OMAP4", .revision = "ES1.?", .data = &hdmi4_es1_features },
> -	{ .family = "OMAP4", .revision = "ES2.?", .data = &hdmi4_es2_features },
> -	{ .family = "OMAP4",			  .data = &hdmi4_es3_features },
> +	{
> +		.machine = "OMAP4430",
> +		.revision = "ES1.?",
> +		.data = &hdmi4430_es1_features,
> +	},
> +	{
> +		.machine = "OMAP4430",
> +		.revision = "ES2.?",
> +		.data = &hdmi4430_es2_features,
> +	},
> +	{
> +		.family = "OMAP4",
> +		.data = &hdmi4_features,
> +	},
>  	{ /* sentinel */ }
>  };

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching
  2017-11-20  9:51 [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching Peter Ujfalusi
  2017-11-21  7:04 ` Laurent Pinchart
@ 2017-11-21 10:23 ` Tomi Valkeinen
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2017-11-21 10:23 UTC (permalink / raw)
  To: Peter Ujfalusi, laurent.pinchart, jsarha; +Cc: airlied, stable, dri-devel

On 20/11/17 11:51, Peter Ujfalusi wrote:
> I believe the intention of the commit 2c9fc9bf45f8
> ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver")
> was to identify omap4430 ES1.x, omap4430 ES2.x and other OMAP4 revisions,
> like omap4460.
> 
> By using family=OMAP4 in the match the code will treat omap4460 ES1.x in a
> same way as it would treat omap4430 ES1.x
> 
> This breaks HDMI audio on OMAP4460 devices (PandaES for example).
> 
> Correct the match rule so we are not going to get false positive match.
> 
> Fixes: 2c9fc9bf45f8 ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver")
> 
> CC: stable@vger.kernel.org # 4.14
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Thanks, I have picked this up.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2017-11-21 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20  9:51 [PATCH v2] omapdrm: hdmi4: Correct the SoC revision matching Peter Ujfalusi
2017-11-21  7:04 ` Laurent Pinchart
2017-11-21 10:23 ` Tomi Valkeinen

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