>From 15246e4dfa6853d9aef48a4b8633f93efe40ed81 Mon Sep 17 00:00:00 2001
From: Kishore Y <[email protected]>
Date: Thu, 12 Nov 2009 20:47:58 +0530
Subject: [PATCH] V4L2: clear buf when vrfb buf not allocated
buffer memory is set to 0 only for the first time
before the vrfb buffer is allocated
Signed-off-by: Kishore Y <[email protected]>
---
This patch is dependent on the patch
[PATCH 4/4] OMAP2/3 V4L2: Add support for OMAP2/3 V4L2 driver on top of DSS2
drivers/media/video/omap/omap_vout.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/media/video/omap/omap_vout.c
b/drivers/media/video/omap/omap_vout.c
index 7092ef2..0a9fdd7 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -223,9 +223,11 @@ static int omap_vout_allocate_vrfb_buffers(struct
omap_vout_device *vout,
unsigned int *count, int startindex)
{
int i, j;
+ int buffer_set;
for (i = 0; i < *count; i++) {
- if (!vout->smsshado_virt_addr[i]) {
+ buffer_set = vout->smsshado_virt_addr[i];
+ if (!buffer_set) {
vout->smsshado_virt_addr[i] =
omap_vout_alloc_buffer(vout->smsshado_size,
&vout->smsshado_phy_addr[i]);
@@ -247,8 +249,10 @@ static int omap_vout_allocate_vrfb_buffers(struct
omap_vout_device *vout,
*count = 0;
return -ENOMEM;
}
- memset((void *) vout->smsshado_virt_addr[i], 0,
- vout->smsshado_size);
+ if (!buffer_set) {
+ memset((void *) vout->smsshado_virt_addr[i], 0,
+ vout->smsshado_size);
+ }
}
return 0;
}
--
1.5.4.3
Regards,
Kishore Y
Ph:- +918039813085
--
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