Skip to contentSkip to conversation

dma: cases IPU_PIX_FMT_BGRA32, BGR32 and ABGR32 are the same in ipu_ch_param_set_size()

PATCH In review Roel Kluin 3 participants 3 messages Jan 20, 2010 dmaengine

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 dma: cases IPU_PIX_FMT_BGRA32, BGR32 and ABGR32 are the same in ipu_ch_param_set_size()

In these cases the same statements are executed.

---
But was this intended? if not, what should differ? bpp?

drivers/dma/ipu/ipu_idmac.c +1 -14
index 9a5bc1a..1c518f1 100644
@@ -348,6 +348,7 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,
 		break;
 	case IPU_PIX_FMT_BGRA32:
 	case IPU_PIX_FMT_BGR32:
+	case IPU_PIX_FMT_ABGR32:
 		params->ip.bpp	= 0;
 		params->ip.pfs	= 4;
 		params->ip.npb	= 7;
@@ -376,20 +377,6 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,
 		params->ip.wid2	= 7;		/* Blue bit width - 1 */
 		params->ip.wid3	= 7;		/* Alpha bit width - 1 */
 		break;
-	case IPU_PIX_FMT_ABGR32:
-		params->ip.bpp	= 0;
-		params->ip.pfs	= 4;
-		params->ip.npb	= 7;
-		params->ip.sat	= 2;		/* SAT = 32-bit access */
-		params->ip.ofs0	= 8;		/* Red bit offset */
-		params->ip.ofs1	= 16;		/* Green bit offset */
-		params->ip.ofs2	= 24;		/* Blue bit offset */
-		params->ip.ofs3	= 0;		/* Alpha bit offset */
-		params->ip.wid0	= 7;		/* Red bit width - 1 */
-		params->ip.wid1	= 7;		/* Green bit width - 1 */
-		params->ip.wid2	= 7;		/* Blue bit width - 1 */
-		params->ip.wid3	= 7;		/* Alpha bit width - 1 */
-		break;
 	case IPU_PIX_FMT_UYVY:
 		params->ip.bpp	= 2;
 		params->ip.pfs	= 6;
#1 lore raw

[ added Guennadi ]

Quoted 45 lines · Roel Kluin

In these cases the same statements are executed.

---
But was this intended? if not, what should differ? bpp?

drivers/dma/ipu/ipu_idmac.c +0 -0
index 9a5bc1a..1c518f1 100644
@@ -348,6 +348,7 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,
                break;

       case IPU_PIX_FMT_BGRA32:
       case IPU_PIX_FMT_BGR32:
+       case IPU_PIX_FMT_ABGR32:
               params->ip.bpp  = 0;
               params->ip.pfs  = 4;
               params->ip.npb  = 7;

drivers/dma/ipu/ipu_idmac.c +0 -0
@@ -376,20 +377,6 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,

               params->ip.wid2 = 7;            /* Blue bit width - 1 */ params->ip.wid3 = 7;            /* Alpha bit width - 1 */ break;
-       case IPU_PIX_FMT_ABGR32:
-               params->ip.bpp  = 0;
-               params->ip.pfs  = 4;
-               params->ip.npb  = 7;
-               params->ip.sat  = 2;            /* SAT = 32-bit access */
-               params->ip.ofs0 = 8;            /* Red bit offset */
-               params->ip.ofs1 = 16;           /* Green bit offset */
-               params->ip.ofs2 = 24;           /* Blue bit offset */
-               params->ip.ofs3 = 0;            /* Alpha bit offset */
-               params->ip.wid0 = 7;            /* Red bit width - 1 */
-               params->ip.wid1 = 7;            /* Green bit width - 1 */
-               params->ip.wid2 = 7;            /* Blue bit width - 1 */
-               params->ip.wid3 = 7;            /* Alpha bit width - 1 */
-               break;
       case IPU_PIX_FMT_UYVY:
               params->ip.bpp  = 2;
               params->ip.pfs  = 6;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Acked-by on v1 1/1
#2 lore raw
In reply to Roel Kluin
Quoted 3 lines · Roel Kluin

In these cases the same statements are executed.

Thanks
Guennadi

Quoted 37 lines

---
But was this intended? if not, what should differ? bpp?

drivers/dma/ipu/ipu_idmac.c +1 -15
index 9a5bc1a..1c518f1 100644
@@ -348,6 +348,7 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,
 		break;
 	case IPU_PIX_FMT_BGRA32:
 	case IPU_PIX_FMT_BGR32:
+	case IPU_PIX_FMT_ABGR32:
 		params->ip.bpp	= 0;
 		params->ip.pfs	= 4;
 		params->ip.npb	= 7;
@@ -376,20 +377,6 @@ static void ipu_ch_param_set_size(union chan_param_mem *params,
 		params->ip.wid2	= 7;		/* Blue bit width - 1 */
 		params->ip.wid3	= 7;		/* Alpha bit width - 1 */
 		break;
-	case IPU_PIX_FMT_ABGR32:
-		params->ip.bpp	= 0;
-		params->ip.pfs	= 4;
-		params->ip.npb	= 7;
-		params->ip.sat	= 2;		/* SAT = 32-bit access */
-		params->ip.ofs0	= 8;		/* Red bit offset */
-		params->ip.ofs1	= 16;		/* Green bit offset */
-		params->ip.ofs2	= 24;		/* Blue bit offset */
-		params->ip.ofs3	= 0;		/* Alpha bit offset */
-		params->ip.wid0	= 7;		/* Red bit width - 1 */
-		params->ip.wid1	= 7;		/* Green bit width - 1 */
-		params->ip.wid2	= 7;		/* Blue bit width - 1 */
-		params->ip.wid3	= 7;		/* Alpha bit width - 1 */
-		break;
 	case IPU_PIX_FMT_UYVY:
 		params->ip.bpp	= 2;
 		params->ip.pfs	= 6;
--
Quoted 5 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/