Skip to contentSkip to conversation

omapfb: dss: Fix max fclk divider for omap36xx

PATCH Applied Adam Ford 5 participants 8 messages Jun 30, 2020 – Jul 10, 2020

Subsystems (3)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 omapfb: dss: Fix max fclk divider for omap36xx

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
 };
 
 static const struct dss_features omap3630_dss_feats = {
-	.fck_div_max		=	32,
+	.fck_div_max		=	31,
 	.dss_fck_multiplier	=	1,
 	.parent_clk_name	=	"dpll4_ck",
 	.dpi_select_source	=	&dss_dpi_select_source_omap2_omap3,
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

drivers/video/fbdev/omap2/omapfb/dss/dss.c +0 -0
index 7252d22dd117..bfc5c4c5a26a 100644

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 8 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
  };
 
  static const struct dss_features omap3630_dss_feats = {
-	.fck_div_max		=	32,
+	.fck_div_max		=	31,
  	.dss_fck_multiplier	=	1,
  	.parent_clk_name	=	"dpll4_ck",
  	.dpi_select_source	=	&dss_dpi_select_source_omap2_omap3,

Tomi

Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
#2 lore raw

Hi Tomi.

Quoted 19 lines · Tomi Valkeinen
Quoted 18 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

Quoted 15 lines

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 13 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
  };
  static const struct dss_features omap3630_dss_feats = {
-	.fck_div_max		=	32,
+	.fck_div_max		=	31,
  	.dss_fck_multiplier	=	1,
  	.parent_clk_name	=	"dpll4_ck",
  	.dpi_select_source	=	&dss_dpi_select_source_omap2_omap3,
 

Will you apply to drm-misc?

Note following output from "dim fixes":

$ dim fixes f76ee892a99e
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Cc: Tomi Valkeinen <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: "Andrew F. Davis" <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: <[email protected]> # v4.5+

Here it says the fix is valid from v4.5 onwards.

Sam

Quoted 10 lines

Tomi

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

Hi,

Quoted 37 lines · Sam Ravnborg

Hi Tomi.

Quoted 19 lines · Tomi Valkeinen
Quoted 18 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

Quoted 15 lines

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 13 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
   };
   static const struct dss_features omap3630_dss_feats = {
-	.fck_div_max		=	32,
+	.fck_div_max		=	31,
   	.dss_fck_multiplier	=	1,
   	.parent_clk_name	=	"dpll4_ck",
   	.dpi_select_source	=	&dss_dpi_select_source_omap2_omap3,
 
Quoted 1 line

Will you apply to drm-misc?

This is for fbdev, so I presume Bartlomiej will pick this one.

Quoted 14 lines

Note following output from "dim fixes":

$ dim fixes f76ee892a99e
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Cc: Tomi Valkeinen <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: "Andrew F. Davis" <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: <[email protected]> # v4.5+
Quoted 1 line

Here it says the fix is valid from v4.5 onwards.

Hmm... Adam, you marked the fix to apply to v4.9+, and then you said v4.4 needs a new patch (that's before the big copy/rename). Did you check the versions between 4.4 and 4.9? I would guess this one applies to v4.5+.

Tomi

Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
author
#4 lore raw
Quoted 59 lines · Tomi Valkeinen

Hi,

Quoted 37 lines · Sam Ravnborg

Hi Tomi.

Quoted 19 lines · Tomi Valkeinen
Quoted 18 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

Quoted 15 lines

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 13 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
   };
   static const struct dss_features omap3630_dss_feats = {
-   .fck_div_max            =       32,
+   .fck_div_max            =       31,
    .dss_fck_multiplier     =       1,
    .parent_clk_name        =       "dpll4_ck",
    .dpi_select_source      =       &dss_dpi_select_source_omap2_omap3,
 
Quoted 1 line

Will you apply to drm-misc?

This is for fbdev, so I presume Bartlomiej will pick this one.

Quoted 14 lines

Note following output from "dim fixes":

$ dim fixes f76ee892a99e
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Cc: Tomi Valkeinen <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: "Andrew F. Davis" <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: <[email protected]> # v4.5+
Quoted 6 lines
Quoted 1 line

Here it says the fix is valid from v4.5 onwards.

Hmm... Adam, you marked the fix to apply to v4.9+, and then you said v4.4 needs a new patch (that's before the big copy/rename). Did you check the versions between 4.4 and 4.9? I would guess this one applies to v4.5+.

I only tried 4.9 because it's listed as an LTS kernel. The stuff
between 4.4 and 4.9 were EOL, so I didn't go back further. The 4.5+
is probably more accurate. I would like to do the same thing for the 4.4 kernel, but I am not sure the proper way to do that.

adam

Quoted 6 lines

Tomi

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

author
#5 lore raw
Quoted 68 lines · Adam Ford
Quoted 59 lines · Tomi Valkeinen

Hi,

Quoted 37 lines · Sam Ravnborg

Hi Tomi.

Quoted 19 lines · Tomi Valkeinen
Quoted 18 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

Quoted 15 lines

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 13 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
   };
   static const struct dss_features omap3630_dss_feats = {
-   .fck_div_max            =       32,
+   .fck_div_max            =       31,
    .dss_fck_multiplier     =       1,
    .parent_clk_name        =       "dpll4_ck",
    .dpi_select_source      =       &dss_dpi_select_source_omap2_omap3,
 
Quoted 1 line

Will you apply to drm-misc?

This is for fbdev, so I presume Bartlomiej will pick this one.

Quoted 14 lines

Note following output from "dim fixes":

$ dim fixes f76ee892a99e
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Cc: Tomi Valkeinen <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: "Andrew F. Davis" <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: <[email protected]> # v4.5+
Quoted 6 lines
Quoted 1 line

Here it says the fix is valid from v4.5 onwards.

Hmm... Adam, you marked the fix to apply to v4.9+, and then you said v4.4 needs a new patch (that's before the big copy/rename). Did you check the versions between 4.4 and 4.9? I would guess this one applies to v4.5+.

Quoted 4 lines

I only tried 4.9 because it's listed as an LTS kernel. The stuff
between 4.4 and 4.9 were EOL, so I didn't go back further. The 4.5+
is probably more accurate. I would like to do the same thing for the 4.4 kernel, but I am not sure the proper way to do that.

What is the correct protocol for patching 4.4? I'd like to do that, but the patch would be unique to the 4.4. Should I just submit the patch directly to stable and cc Tomi?

adam

Quoted 8 lines

adam

Quoted 6 lines

Tomi

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

maintainer
#6 lore raw
Quoted 69 lines · Adam Ford
Quoted 68 lines · Adam Ford
Quoted 65 lines · Tomi Valkeinen

Hi,

Quoted 37 lines · Sam Ravnborg

Hi Tomi.

Quoted 19 lines · Tomi Valkeinen
Quoted 18 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

Quoted 15 lines

drivers/video/fbdev/omap2/omapfb/dss/dss.c static const struct dss_features omap34xx_dss_feats = { · line 839

Quoted 13 lines
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
   };
   static const struct dss_features omap3630_dss_feats = {
-   .fck_div_max            =       32,
+   .fck_div_max            =       31,
    .dss_fck_multiplier     =       1,
    .parent_clk_name        =       "dpll4_ck",
    .dpi_select_source      =       &dss_dpi_select_source_omap2_omap3,
 
Quoted 1 line

Will you apply to drm-misc?

This is for fbdev, so I presume Bartlomiej will pick this one.

Quoted 14 lines

Note following output from "dim fixes":

$ dim fixes f76ee892a99e
Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Cc: Tomi Valkeinen <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: "Andrew F. Davis" <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: <[email protected]> # v4.5+
Quoted 1 line

Here it says the fix is valid from v4.5 onwards.

Hmm... Adam, you marked the fix to apply to v4.9+, and then you said v4.4 needs a new patch (that's before the big copy/rename). Did you check the versions between 4.4 and 4.9? I would guess this one applies to v4.5+.

Quoted 8 lines
Quoted 4 lines

I only tried 4.9 because it's listed as an LTS kernel. The stuff
between 4.4 and 4.9 were EOL, so I didn't go back further. The 4.5+
is probably more accurate. I would like to do the same thing for the 4.4 kernel, but I am not sure the proper way to do that.

What is the correct protocol for patching 4.4? I'd like to do that, but the patch would be unique to the 4.4. Should I just submit the patch directly to stable and cc Tomi?

Yes, and document the heck out of why this is a 4.4-only patch, and why we can't take whatever happened in newer kernels instead.

thanks,

greg k-h

#7 lore raw
In reply to Adam Ford
Quoted 11 lines · Adam Ford

The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver.

This patch fixes the divider for fbdev driver instead of the drm.

Fixes f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

Applied to drm-misc-next tree, thanks.

(I marked patch as applicable to stable 4.5+ while merging)

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 21 lines

---
Linux 4.4 will need a similar patch, but it doesn't apply cleanly.

The DRM version of this same fix is:
e2c4ed148cf3 ("drm/omap: fix max fclk divider for omap36xx")

drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
index 7252d22dd117..bfc5c4c5a26a 100644
@@ -833,7 +833,7 @@ static const struct dss_features omap34xx_dss_feats = {
 };
 
 static const struct dss_features omap3630_dss_feats = {
-	.fck_div_max		=	32,
+	.fck_div_max		=	31,
 	.dss_fck_multiplier	=	1,
 	.parent_clk_name	=	"dpll4_ck",
 	.dpi_select_source	=	&dss_dpi_select_source_omap2_omap3,