Re: [PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related API's

2011-06-13 Thread Archit Taneja

On Monday 13 June 2011 10:13 AM, Hiremath, Vaibhav wrote:



-Original Message-
From: Taneja, Archit
Sent: Monday, June 13, 2011 10:17 AM
To: Hiremath, Vaibhav
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related
API's

Hi Vaibhav,

On Friday 27 May 2011 12:31 PM, Taneja, Archit wrote:

Introduce omap_vout_vrfb.c and omap_vout_vrfb.h, for all VRFB related

API's,

making OMAP_VOUT driver independent from VRFB. This is required for

OMAP4 DSS,

since OMAP4 doesn't have VRFB block.

Added new enum vout_rotation_type and rotation_type member to

omapvideo_info,

this is initialized based on the arch type in omap_vout_probe. The

rotation_type

var is now used to choose between vrfb and non-vrfb calls.


Any comments on this patch?


Archit,

Last week I had to park this due to some high priority issue, today I am going 
to validate these patches and will respond you.
Code implementation point of view, this patch looks ok. And I believe you will 
incorporate my comments on first patch.


Oh okay, great.

Thanks,
Archit

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related API's

2011-06-12 Thread Archit Taneja

Hi Vaibhav,

On Friday 27 May 2011 12:31 PM, Taneja, Archit wrote:

Introduce omap_vout_vrfb.c and omap_vout_vrfb.h, for all VRFB related API's,
making OMAP_VOUT driver independent from VRFB. This is required for OMAP4 DSS,
since OMAP4 doesn't have VRFB block.

Added new enum vout_rotation_type and rotation_type member to omapvideo_info,
this is initialized based on the arch type in omap_vout_probe. The rotation_type
var is now used to choose between vrfb and non-vrfb calls.


Any comments on this patch?

snip

Thanks,
Archit
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related API's

2011-06-12 Thread Hiremath, Vaibhav

 -Original Message-
 From: Taneja, Archit
 Sent: Monday, June 13, 2011 10:17 AM
 To: Hiremath, Vaibhav
 Cc: linux-media@vger.kernel.org
 Subject: Re: [PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related
 API's
 
 Hi Vaibhav,
 
 On Friday 27 May 2011 12:31 PM, Taneja, Archit wrote:
  Introduce omap_vout_vrfb.c and omap_vout_vrfb.h, for all VRFB related
 API's,
  making OMAP_VOUT driver independent from VRFB. This is required for
 OMAP4 DSS,
  since OMAP4 doesn't have VRFB block.
 
  Added new enum vout_rotation_type and rotation_type member to
 omapvideo_info,
  this is initialized based on the arch type in omap_vout_probe. The
 rotation_type
  var is now used to choose between vrfb and non-vrfb calls.
 
 Any comments on this patch?
 
Archit,

Last week I had to park this due to some high priority issue, today I am going 
to validate these patches and will respond you. 
Code implementation point of view, this patch looks ok. And I believe you will 
incorporate my comments on first patch.

Thanks,
Vaibhav

 snip
 
 Thanks,
 Archit
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] OMAP_VOUT: Create separate file for VRFB related API's

2011-05-27 Thread Archit Taneja
Introduce omap_vout_vrfb.c and omap_vout_vrfb.h, for all VRFB related API's,
making OMAP_VOUT driver independent from VRFB. This is required for OMAP4 DSS,
since OMAP4 doesn't have VRFB block.

Added new enum vout_rotation_type and rotation_type member to omapvideo_info,
this is initialized based on the arch type in omap_vout_probe. The rotation_type
var is now used to choose between vrfb and non-vrfb calls.

Signed-off-by: Archit Taneja arc...@ti.com
---
 drivers/media/video/omap/Kconfig  |7 +-
 drivers/media/video/omap/Makefile |1 +
 drivers/media/video/omap/omap_vout.c  |  453 ++---
 drivers/media/video/omap/omap_vout_vrfb.c |  390 +
 drivers/media/video/omap/omap_vout_vrfb.h |   40 +++
 drivers/media/video/omap/omap_voutdef.h   |   16 +
 6 files changed, 536 insertions(+), 371 deletions(-)
 create mode 100644 drivers/media/video/omap/omap_vout_vrfb.c
 create mode 100644 drivers/media/video/omap/omap_vout_vrfb.h

diff --git a/drivers/media/video/omap/Kconfig b/drivers/media/video/omap/Kconfig
index e63233f..390ab09 100644
--- a/drivers/media/video/omap/Kconfig
+++ b/drivers/media/video/omap/Kconfig
@@ -1,11 +1,14 @@
+config VIDEO_OMAP2_VOUT_VRFB
+   bool
+
 config VIDEO_OMAP2_VOUT
tristate OMAP2/OMAP3 V4L2-Display driver
depends on ARCH_OMAP2 || ARCH_OMAP3
select VIDEOBUF_GEN
select VIDEOBUF_DMA_CONTIG
select OMAP2_DSS
-   select OMAP2_VRAM
-   select OMAP2_VRFB
+   select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3
+   select VIDEO_OMAP2_VOUT_VRFB if VIDEO_OMAP2_VOUT  OMAP2_VRFB
default n
---help---
  V4L2 Display driver support for OMAP2/3 based boards.
diff --git a/drivers/media/video/omap/Makefile 
b/drivers/media/video/omap/Makefile
index b287880..fc410b4 100644
--- a/drivers/media/video/omap/Makefile
+++ b/drivers/media/video/omap/Makefile
@@ -4,4 +4,5 @@
 
 # OMAP2/3 Display driver
 omap-vout-y := omap_vout.o omap_voutlib.o
+omap-vout-$(CONFIG_VIDEO_OMAP2_VOUT_VRFB) += omap_vout_vrfb.o
 obj-$(CONFIG_VIDEO_OMAP2_VOUT) += omap-vout.o
diff --git a/drivers/media/video/omap/omap_vout.c 
b/drivers/media/video/omap/omap_vout.c
index 6433e7b..852905c 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -48,6 +48,7 @@
 
 #include omap_voutlib.h
 #include omap_voutdef.h
+#include omap_vout_vrfb.h
 
 MODULE_AUTHOR(Texas Instruments);
 MODULE_DESCRIPTION(OMAP Video for Linux Video out driver);
@@ -143,41 +144,6 @@ const static struct v4l2_fmtdesc omap_formats[] = {
 #define NUM_OUTPUT_FORMATS (ARRAY_SIZE(omap_formats))
 
 /*
- * Function for allocating video buffers
- */
-static int omap_vout_allocate_vrfb_buffers(struct omap_vout_device *vout,
-   unsigned int *count, int startindex)
-{
-   int i, j;
-
-   for (i = 0; i  *count; i++) {
-   if (!vout-smsshado_virt_addr[i]) {
-   vout-smsshado_virt_addr[i] =
-   omap_vout_alloc_buffer(vout-smsshado_size,
-   vout-smsshado_phy_addr[i]);
-   }
-   if (!vout-smsshado_virt_addr[i]  startindex != -1) {
-   if (V4L2_MEMORY_MMAP == vout-memory  i = startindex)
-   break;
-   }
-   if (!vout-smsshado_virt_addr[i]) {
-   for (j = 0; j  i; j++) {
-   omap_vout_free_buffer(
-   vout-smsshado_virt_addr[j],
-   vout-smsshado_size);
-   vout-smsshado_virt_addr[j] = 0;
-   vout-smsshado_phy_addr[j] = 0;
-   }
-   *count = 0;
-   return -ENOMEM;
-   }
-   memset((void *) vout-smsshado_virt_addr[i], 0,
-   vout-smsshado_size);
-   }
-   return 0;
-}
-
-/*
  * Try format
  */
 static int omap_vout_try_format(struct v4l2_pix_format *pix)
@@ -270,36 +236,9 @@ static u32 omap_vout_uservirt_to_phys(u32 virtp)
 }
 
 /*
- * Wakes up the application once the DMA transfer to VRFB space is completed.
- */
-static void omap_vout_vrfb_dma_tx_callback(int lch, u16 ch_status, void *data)
-{
-   struct vid_vrfb_dma *t = (struct vid_vrfb_dma *) data;
-
-   t-tx_status = 1;
-   wake_up_interruptible(t-wait);
-}
-
-/*
- * Release the VRFB context once the module exits
- */
-static void omap_vout_release_vrfb(struct omap_vout_device *vout)
-{
-   int i;
-
-   for (i = 0; i  VRFB_NUM_BUFS; i++)
-   omap_vrfb_release_ctx(vout-vrfb_context[i]);
-
-   if (vout-vrfb_dma_tx.req_status == DMA_CHAN_ALLOTED) {
-   vout-vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
-   omap_free_dma(vout-vrfb_dma_tx.dma_ch);
-   }
-}
-
-/*