Skip to contentSkip to conversation

Fix pxafb nonstd field documentation and add errata info

PATCH New Petr Cvek 3 participants 5 messages Aug 8, 2015 – Aug 21, 2015

Subsystems (2)
lore
Share & tools
lore

Petr Cvek

author
#0 lore raw

PATCH 1/1 Fix pxafb nonstd field documentation and add errata info

Fix pxafb nonstd field documentation and add warning comment to Kconfig and pxafb.c (errata: YUV420 hangs LCD).

---
 Documentation/fb/pxafb.txt  | 8 ++++----
 drivers/video/fbdev/Kconfig | 5 +++++
 drivers/video/fbdev/pxafb.c | 4 ++++
 3 files changed, 13 insertions(+), 4 deletions(-)
Documentation/fb/pxafb.txt +4 -4
index d143a0a..dbbf5eb 100644
@@ -123,12 +123,12 @@ Overlay Support for PXA27x and later LCD controllers
      framebuffer framework, application has to take care of the offsets
      and lengths of each component within the framebuffer.
 
-  4. var->nonstd is used to pass starting (x, y) position and color format,
+  4. var->nonstd is used to pass starting (y, x) position and color format,
      the detailed bit fields are shown below:
 
     31                23  20         10          0
      +-----------------+---+----------+----------+
-     |  ... unused ... |FOR|   XPOS   |   YPOS   |
+     |  ... unused ... |FOR|   YPOS   |   XPOS   | (as in OVLxC2 register)
      +-----------------+---+----------+----------+
 
      FOR  - color format, as defined by OVERLAY_FORMAT_* in pxafb.h
@@ -136,7 +136,7 @@ Overlay Support for PXA27x and later LCD controllers
 	    1 - YUV444 PACKED
 	    2 - YUV444 PLANAR
 	    3 - YUV422 PLANAR
-	    4 - YUR420 PLANAR
+	    4 - YUV420 PLANAR
 
-     XPOS - starting horizontal position
      YPOS - starting vertical position
+     XPOS - starting horizontal position
drivers/video/fbdev/Kconfig +5 -0
index 2d98de5..8f485ec 100644
@@ -1893,6 +1893,11 @@ config FB_PXA_OVERLAY
 	bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
 	default n
 	depends on FB_PXA && (PXA27x || PXA3xx)
+	---help---
+	  Using the overlay 2 and YUV420 mode on a PXA27x C0 chip revision will
+	  hang the LCD until the next SoC restart (errata E24).
+
+	  If unsure, say N or check /proc/cpuinfo for "CPU revision : 4".
 
 config FB_PXA_SMARTPANEL
 	bool "PXA Smartpanel LCD support"
drivers/video/fbdev/pxafb.c +4 -0
index 7245611..e573699 100644
@@ -30,6 +30,10 @@
  *
  *   Copyright (C) 2006-2008 Marvell International Ltd.
  *   All Rights Reserved
+ *
+ * NOTICE
+ * According to PXA27x errata E24 an enable of the overlay 2 in YUV420 mode
+ * on C0 chip revision will hang the LCD until the next SoC reset.
  */
 
 #include <linux/module.h>
Signature · 1 line
1.7.12.1
#2 lore raw

PATCH 1/1 Fix pxafb nonstd field documentation and add errata info

In reply to Petr Cvek

drivers/video/fbdev/Kconfig config FB_PXA_OVERLAY · line 1898

Quoted 11 lines · Petr Cvek
drivers/video/fbdev/Kconfig +3 -0
index 2d98de5..8f485ec 100644
@@ -1893,6 +1893,11 @@ config FB_PXA_OVERLAY
 	bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
 	default n
 	depends on FB_PXA && (PXA27x || PXA3xx)
+	---help---
+	  Using the overlay 2 and YUV420 mode on a PXA27x C0 chip revision will
+	  hang the LCD until the next SoC restart (errata E24).

Shouldn't the driver handle this? It should not allow the combination to be used.

Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/042b80a1/attachment.sig>

author
#3 lore raw

PATCH 1/1 Fix pxafb nonstd field documentation and add errata info

Dne 20.8.2015 v 12:55 Tomi Valkeinen napsal(a):

Quoted 19 lines · Petr Cvek

drivers/video/fbdev/Kconfig config FB_PXA_OVERLAY · line 1898

Quoted 12 lines
drivers/video/fbdev/Kconfig +3 -0
index 2d98de5..8f485ec 100644
@@ -1893,6 +1893,11 @@ config FB_PXA_OVERLAY
 	bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
 	default n
 	depends on FB_PXA && (PXA27x || PXA3xx)
+	---help---
+	  Using the overlay 2 and YUV420 mode on a PXA27x C0 chip revision will
+	  hang the LCD until the next SoC restart (errata E24).

Shouldn't the driver handle this? It should not allow the combination to be used.

Quoted 2 lines

Tomi

Probably, but I don't know which revisions are OK and which are not. Errata document:

	Marvell? PXA270M Processor Specification Update
	MV-S900957-00

has only 3 revisions, but PXA Manual lists 6 (2.2.5.1 Processor ID Register) and one revision from errata is not shown in my PXA Manual. I can exclude mine revision (from "system_rev" variable), but there should be some warning somewhere in configuration.

BTW There is software workaround, but I was not able to set registers right (it requires to send some data through FIFO in different mode).

Petr

#4 lore raw

PATCH 1/1 Fix pxafb nonstd field documentation and add errata info

Quoted 23 lines · Petr Cvek

Dne 20.8.2015 v 12:55 Tomi Valkeinen napsal(a):

Quoted 19 lines · Petr Cvek

drivers/video/fbdev/Kconfig config FB_PXA_OVERLAY · line 1898

Quoted 12 lines
drivers/video/fbdev/Kconfig +3 -0
index 2d98de5..8f485ec 100644
@@ -1893,6 +1893,11 @@ config FB_PXA_OVERLAY
 	bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
 	default n
 	depends on FB_PXA && (PXA27x || PXA3xx)
+	---help---
+	  Using the overlay 2 and YUV420 mode on a PXA27x C0 chip revision will
+	  hang the LCD until the next SoC restart (errata E24).

Shouldn't the driver handle this? It should not allow the combination to be used.

Quoted 2 lines

Tomi

Quoted 6 lines

Probably, but I don't know which revisions are OK and which are not. Errata document:

	Marvell? PXA270M Processor Specification Update
	MV-S900957-00

has only 3 revisions, but PXA Manual lists 6 (2.2.5.1 Processor ID Register) and one revision from errata is not shown in my PXA Manual. I can exclude mine revision (from "system_rev" variable), but there should be some warning somewhere in configuration.

No, configuration or kernel docs is not the right place for this. The user is not going to see that. And a single kernel image is supposed to run on different soc/board versions, so you can't do selections like this in the kernel config.

The driver should detect the bad revision, and then apply the workaround, or if that's not possible, refuse the use of the configuration that leads to the HW bug. Or if even that's not possible, the driver should print a warning when starting, so that the user is able to see it.

Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150821/16323465/attachment.sig>