Skip to contentSkip to conversation

OMAP:DSS:Add support for Additional color modes supported by OMAP4

PATCH K, Mythri P 3 participants 8 messages Aug 11, 2010 – Aug 18, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of OMAP4

---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/plat/display.h +15 -1
index 7a6eedd..ebf1020 100644
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */
+	OMAP_DSS_COLOR_XRGB12	= 1 << 16, /* xRGB12, 16-bit container */
+	OMAP_DSS_COLOR_ARGB16_1555	= 1 << 17, /* ARGB16-1555 */
+	OMAP_DSS_COLOR_RGBX24_32_ALGN	= 1 << 18, /* 32-msb aligned 24bit */
+	OMAP_DSS_COLOR_XRGB15	= 1 << 19, /* xRGB15: 1555*/
 
 	OMAP_DSS_COLOR_GFX_OMAP2 =
 		OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
@@ -112,9 +118,17 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_VID1_OMAP3 =
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
 		OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
-		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
+		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY |
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
+		OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGBA32 |
+		OMAP_DSS_COLOR_RGBX32,
 
 	OMAP_DSS_COLOR_VID2_OMAP3 =
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
 		OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
 		OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
drivers/video/omap2/dss/dispc.c +40 -13

73 lines not on this page · raw message

drivers/video/omap2/dss/overlay.c +4 -2
index 0c189f8..c5d6ba9 100644
@@ -598,7 +598,8 @@ void dss_init_overlays(struct platform_device *pdev)
 		case 1:
 			ovl->name = "vid1";
 			ovl->id = OMAP_DSS_VIDEO1;
-			ovl->supported_modes = cpu_is_omap34xx() ?
+			ovl->supported_modes = (cpu_is_omap44xx() |
+				cpu_is_omap34xx()) ?
 				OMAP_DSS_COLOR_VID1_OMAP3 :
 				OMAP_DSS_COLOR_VID_OMAP2;
 			ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
@@ -611,7 +612,8 @@ void dss_init_overlays(struct platform_device *pdev)
 		case 2:
 			ovl->name = "vid2";
 			ovl->id = OMAP_DSS_VIDEO2;
-			ovl->supported_modes = cpu_is_omap34xx() ?
+			ovl->supported_modes = (cpu_is_omap44xx() |
+				cpu_is_omap34xx()) ?
 				OMAP_DSS_COLOR_VID2_OMAP3 :
 				OMAP_DSS_COLOR_VID_OMAP2;
 			ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
Signature · 1 line
1.5.6.3
#2 lore raw
Quoted 29 lines · Mythri P

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of OMAP4

---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/plat/display.h +0 -0
index 7a6eedd..ebf1020 100644

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 94

Quoted 6 lines
arch/arm/plat-omap/include/plat/display.h +3 -0
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */
+	OMAP_DSS_COLOR_XRGB12	= 1 << 16, /* xRGB12, 16-bit container */

Isn't this the same as RGB12U?

Signature · 5 lines
Ville Syrjälä
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to K, Mythri P

Hi,

Quoted 28 lines · Mythri P

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of OMAP4

---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/plat/display.h +0 -0
index 7a6eedd..ebf1020 100644

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 93

Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */

Is this the same as ARGB16? Or is it the same, except alpha value is in the other end? If so, I think the naming should be coherent, and either this should be RGBA16, or ARGB16 should be ARGB12.

Then again, if TRM says this is RGBA12, and the other one is ARGB16, I guess we should stick with TRM naming...

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 94

Quoted 1 line
arch/arm/plat-omap/include/plat/display.h +1 -0
+	OMAP_DSS_COLOR_XRGB12	= 1 << 16, /* xRGB12, 16-bit container */

Is this RGB12U, or again otherwise same but the empty value is on the other end?

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 96

Quoted 2 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
+	OMAP_DSS_COLOR_ARGB16_1555	= 1 << 17, /* ARGB16-1555 */
+	OMAP_DSS_COLOR_RGBX24_32_ALGN	= 1 << 18, /* 32-msb aligned 24bit */

Hmm, what is this?

Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +1 -0
+	OMAP_DSS_COLOR_XRGB15	= 1 << 19, /* xRGB15: 1555*/
 
 	OMAP_DSS_COLOR_GFX_OMAP2 =
 		OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 126

Quoted 10 lines
arch/arm/plat-omap/include/plat/display.h +6 -1
@@ -112,9 +118,17 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_VID1_OMAP3 =
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
 		OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
-		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
+		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY |
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
+		OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGBA32 |
+		OMAP_DSS_COLOR_RGBX32,

Why do you change OMAP3 modes, if this patch is about supported OMAP4 modes?

Tomi

#4 lore raw

Hi Tomi,

-----Original Message-----
From: Tomi Valkeinen [mailto:[email protected]]
Sent: Tuesday, August 17, 2010 4:31 PM
To: K, Mythri P
Cc: [email protected]
Subject: RE: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

Hi,

Quoted 28 lines · Mythri P

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of OMAP4

---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/plat/display.h +0 -0
index 7a6eedd..ebf1020 100644

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 93

Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */

Is this the same as ARGB16? Or is it the same, except alpha value is in the other end? If so, I think the naming should be coherent, and either this should be RGBA16, or ARGB16 should be ARGB12.

Then again, if TRM says this is RGBA12, and the other one is ARGB16, I
guess we should stick with TRM naming...
[Mythri] yes these are the TRM naming conventions. There are 2 formats in ARGB16 , ARGB16-1555 and ARGB16-4444.

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 94

Quoted 1 line
arch/arm/plat-omap/include/plat/display.h +1 -0
+	OMAP_DSS_COLOR_XRGB12	= 1 << 16, /* xRGB12, 16-bit container */

Is this RGB12U, or again otherwise same but the empty value is on the
other end?
[Mythri] again RGB12x-4444 and xRGB12-4444 are two different formats with empty value or alignment otherwise.

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 96

Quoted 2 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
+	OMAP_DSS_COLOR_ARGB16_1555	= 1 << 17, /* ARGB16-1555 */
+	OMAP_DSS_COLOR_RGBX24_32_ALGN	= 1 << 18, /* 32-msb aligned 24bit */

Hmm, what is this?
[Mythri] This format is RGBx24-8888 (24-bit RGB aligned on MSB of the 32-bit container). TRM DISPC- Table 10-199. DISPC_VID1_ATTRIBUTES , formats.

Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +1 -0
+	OMAP_DSS_COLOR_XRGB15	= 1 << 19, /* xRGB15: 1555*/
 
 	OMAP_DSS_COLOR_GFX_OMAP2 =
 		OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 126

Quoted 10 lines
arch/arm/plat-omap/include/plat/display.h +6 -1
@@ -112,9 +118,17 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_VID1_OMAP3 =
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
 		OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
-		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
+		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY |
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
+		OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGBA32 |
+		OMAP_DSS_COLOR_RGBX32,

Why do you change OMAP3 modes, if this patch is about supported OMAP4
modes?
[Mythri] When the additional color formats supported for OMAP4 are added in the OMAP3 modes, There is a check in the dispc color-modes for OMAP4 alone to support , OMAP3 would return an error as before. Do you suggest add a new OMAP_DSS_COLOR_VID1_OMAP4 instead?

Tomi

Thanks and regards,
Mythri.

#5 lore raw

Hi,

Quoted 50 lines · Mythri P

Hi Tomi,

-----Original Message-----
From: Tomi Valkeinen [mailto:[email protected]]
Sent: Tuesday, August 17, 2010 4:31 PM
To: K, Mythri P
Cc: [email protected]
Subject: RE: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

Hi,

Quoted 28 lines · Mythri P

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of OMAP4

---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/plat/display.h +0 -0
index 7a6eedd..ebf1020 100644

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 93

Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */

Is this the same as ARGB16? Or is it the same, except alpha value is in the other end? If so, I think the naming should be coherent, and either this should be RGBA16, or ARGB16 should be ARGB12.

Quoted 3 lines

Then again, if TRM says this is RGBA12, and the other one is ARGB16, I
guess we should stick with TRM naming...
[Mythri] yes these are the TRM naming conventions. There are 2 formats in ARGB16 , ARGB16-1555 and ARGB16-4444.

Please, use some sane email client with proper quoting. It's quite difficult to read your emails.

Quoted 5 lines

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 96

Quoted 2 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
+	OMAP_DSS_COLOR_ARGB16_1555	= 1 << 17, /* ARGB16-1555 */
+	OMAP_DSS_COLOR_RGBX24_32_ALGN	= 1 << 18, /* 32-msb aligned 24bit */

Hmm, what is this?
[Mythri] This format is RGBx24-8888 (24-bit RGB aligned on MSB of the 32-bit container). TRM DISPC- Table 10-199. DISPC_VID1_ATTRIBUTES , formats.

I don't have OMAP4 TRM. Is it available from somewhere?

Quoted 12 lines
Quoted 12 lines
arch/arm/plat-omap/include/plat/display.h +4 -1
+	OMAP_DSS_COLOR_XRGB15	= 1 << 19, /* xRGB15: 1555*/
 
 	OMAP_DSS_COLOR_GFX_OMAP2 =
 		OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
@@ -112,9 +118,17 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_VID1_OMAP3 =
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
 		OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
-		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
+		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY |
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
Quoted 8 lines

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 126

Quoted 3 lines
arch/arm/plat-omap/include/plat/display.h +3 -0
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
+		OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGBA32 |
+		OMAP_DSS_COLOR_RGBX32,

Why do you change OMAP3 modes, if this patch is about supported OMAP4
modes?
[Mythri] When the additional color formats supported for OMAP4 are added in the OMAP3 modes, There is a check in the dispc color-modes for OMAP4 alone to support , OMAP3 would return an error as before. Do you suggest add a new OMAP_DSS_COLOR_VID1_OMAP4 instead?

Well, there's an entry for OMAP2 color modes, and OMAP3 color modes. I find it quite strange to modify OMAP3 color modes to include OMAP4 modes, and then later in code find what are acceptable values. Besides, having wrong values in ovl->supported_modes means that omapfb will allow user space to select illegal color modes.

So yes, I think there should be separate entries for OMAP4's color modes.

And _dispc_set_color_mode() shouldn't do complex argument checking for different omap versions. It's a low level function, and the arguments given to it should be valid.

Tomi

#6 lore raw

Hi Tomi,
Sorry I configured my email client :).
Here is the link for OMAP4 TRM :
http://focus.ti.com/pdfs/wtbu/SWPU223D_Final_EPDF_06_07_2010.pdf

Quoted 108 lines

-----Original Message-----
From: Tomi Valkeinen [mailto:[email protected]]
Sent: Wednesday, August 18, 2010 2:32 PM
To: K, Mythri P
Cc: [email protected]
Subject: RE: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

Hi,

Quoted 9 lines · Mythri P

Hi Tomi,

-----Original Message-----
From: Tomi Valkeinen [mailto:[email protected]]
Sent: Tuesday, August 17, 2010 4:31 PM
To: K, Mythri P
Cc: [email protected]
Subject: RE: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

Quoted 18 lines

Hi,

Quoted 15 lines · Mythri P

Hi Tomi,
Can you please comment on the below patch . This is to add new color modes supported by OMAP4.

Thanks and regards,
Mythri.
-----Original Message-----
From: K, Mythri P
Sent: Thursday, August 05, 2010 11:24 AM
To: [email protected]
Cc: [email protected]; Semwal, Sumit; K, Mythri P
Subject: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

From: Sumit semwal <[email protected]>

This patch adds support for new color modes that are supported by the video/graphics pipeline of

OMAP4

Quoted 9 lines

arch/arm/plat-

Quoted 9 lines
---
 arch/arm/plat-omap/include/plat/display.h |   16 ++++++++-
 drivers/video/omap2/dss/dispc.c           |   53 ++++++++++++++++++++++-------
 drivers/video/omap2/dss/overlay.c         |    6 ++-
 3 files changed, 59 insertions(+), 16 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/display.h +0 -0

omap/include/plat/display.h

Quoted 14 lines

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 93

Quoted 9 lines

index 7a6eedd..ebf1020 100644

arch/arm/plat-omap/include/plat/display.h +2 -0
@@ -89,6 +89,12 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_ARGB32	= 1 << 11, /* ARGB32 */
 	OMAP_DSS_COLOR_RGBA32	= 1 << 12, /* RGBA32 */
 	OMAP_DSS_COLOR_RGBX32	= 1 << 13, /* RGBx32 */
+	OMAP_DSS_COLOR_NV12	= 1 << 14, /* NV12 format: YUV 4:2:0 */
+	OMAP_DSS_COLOR_RGBA12	= 1 << 15, /* RGBA12 - 4444 */

Is this the same as ARGB16? Or is it the same, except alpha value is in the other end? If so, I think the naming should be coherent, and either this should be RGBA16, or ARGB16 should be ARGB12.

Quoted 3 lines

Then again, if TRM says this is RGBA12, and the other one is ARGB16, I
guess we should stick with TRM naming...
[Mythri] yes these are the TRM naming conventions. There are 2 formats in ARGB16 , ARGB16-1555 and

ARGB16-4444.

Please, use some sane email client with proper quoting. It's quite difficult to read your emails.

Quoted 5 lines

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 96

Quoted 2 lines
arch/arm/plat-omap/include/plat/display.h +2 -0
+	OMAP_DSS_COLOR_ARGB16_1555	= 1 << 17, /* ARGB16-1555 */
+	OMAP_DSS_COLOR_RGBX24_32_ALGN	= 1 << 18, /* 32-msb aligned 24bit */

Hmm, what is this?
[Mythri] This format is RGBx24-8888 (24-bit RGB aligned on MSB of the 32-bit container). TRM DISPC-

Table 10-199. DISPC_VID1_ATTRIBUTES , formats.

I don't have OMAP4 TRM. Is it available from somewhere?

Quoted 11 lines
Quoted 11 lines
arch/arm/plat-omap/include/plat/display.h +3 -1
+	OMAP_DSS_COLOR_XRGB15	= 1 << 19, /* xRGB15: 1555*/
 
 	OMAP_DSS_COLOR_GFX_OMAP2 =
 		OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
@@ -112,9 +118,17 @@ enum omap_color_mode {
 	OMAP_DSS_COLOR_VID1_OMAP3 =
 		OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
 		OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
-		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
+		OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY |
+		OMAP_DSS_COLOR_NV12 | OMAP_DSS_COLOR_RGBA12 |
Quoted 8 lines

arch/arm/plat-omap/include/plat/display.h enum omap_color_mode { · line 126

Quoted 4 lines
arch/arm/plat-omap/include/plat/display.h +4 -0
+		OMAP_DSS_COLOR_XRGB12 | OMAP_DSS_COLOR_ARGB16_1555 |
+		OMAP_DSS_COLOR_RGBX24_32_ALGN | OMAP_DSS_COLOR_XRGB15 |
+		OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGBA32 |
+		OMAP_DSS_COLOR_RGBX32,

Why do you change OMAP3 modes, if this patch is about supported OMAP4
modes?
[Mythri] When the additional color formats supported for OMAP4 are added in the OMAP3 modes, There

is a check in the dispc color-modes for OMAP4 alone to support , OMAP3 would return an error as before.

Quoted 1 line

Do you suggest add a new OMAP_DSS_COLOR_VID1_OMAP4 instead?

Well, there's an entry for OMAP2 color modes, and OMAP3 color modes. I find it quite strange to modify OMAP3 color modes to include OMAP4 modes, and then later in code find what are acceptable values. Besides, having wrong values in ovl->supported_modes means that omapfb will allow user space to select illegal color modes.

Quoted 7 lines

So yes, I think there should be separate entries for OMAP4's color modes.

And _dispc_set_color_mode() shouldn't do complex argument checking for different omap versions. It's a low level function, and the arguments given to it should be valid.

I shall remove the cpu_44xx check in dispc_set_color mode and make relevant changes in display.h to add OMAP4 colormodes.

Quoted 2 lines

Tomi

Thanks and regards,
Mythri.

#8 lore raw

Hi Tomi,

I shall check if the OMAP4 TRM is public and get back to you. Here is the excerpt of the TRM , for the color modes.

DISPC_VID1_ATTRIBUTES
Bits Field Name Description Type Reset
4:1 FORMAT Video Format. RW 0x0
It defines the pixel format when fetching the video #1 picture into memory.
0x6: RGB16-565
0x1: RGB12x-4444
0xA: YUV2 4:2:2 co-sited
0x7: ARGB16-1555
0xD: RGBA32-8888
0x0: NV12 4:2:0 2 buffers (Y + UV)
0x2: RGBA12-4444
0x8: xRGB24-8888 (32-bit container)
0x9: RGB24-888 (24-bit container)
0xB: UYVY 4:2:2 co-sited
0x5: ARGB16-4444
0xF: xRGB15-1555
0xC: ARGB32-8888
0x4: xRGB12-4444
0xE: RGBx24-8888 (24-bit RGB aligned on MSB of the 32-bit container)

Thanks and regards,
Mythri.

Quoted 19 lines

-----Original Message-----
From: Tomi Valkeinen [mailto:[email protected]]
Sent: Wednesday, August 18, 2010 6:43 PM
To: K, Mythri P
Cc: [email protected]
Subject: RE: [PATCH] OMAP:DSS:Add support for Additional color modes supported by OMAP4

Hi,

Quoted 4 lines · Mythri P

Hi Tomi,
Sorry I configured my email client :).
Here is the link for OMAP4 TRM :
http://focus.ti.com/pdfs/wtbu/SWPU223D_Final_EPDF_06_07_2010.pdf

That is for OMAP34xx...

Tomi