#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
+#define UYVY_BLACK (0x00800080)
+#define RGB_BLACK (0x0)
+#define NV12_UV_BLACK (0x80)
+#define NV12_Y_BLACK (0x0)
+
#define MAX_FB_NUM 6
#define FB_BUFS 3
#define VDOA_FB_BUFS (FB_BUFS - 1)
struct dma_mem *buf = NULL;
struct fb_info *fbi = vout->fbi;
struct fb_var_screeninfo var;
- int i, display_buf_size, fb_num, ret;
+ int i, fb_num, ret;
u32 fb_base;
u32 size;
+ u32 display_buf_size;
+ u32 *pixel = NULL;
+ u32 color;
int j;
memcpy(&var, &fbi->var, sizeof(var));
fbi->fix.smem_len, fbi->fix.smem_start, fb_base);
}
+ /* fill black when video config changed */
+ color = colorspaceofpixel(vout->task.output.format) == YUV_CS ?
+ UYVY_BLACK : RGB_BLACK;
+ if (vout->task.output.format == IPU_PIX_FMT_NV12) {
+ size = display_buf_size * 8 /
+ fmt_to_bpp(vout->task.output.format);
+ memset(fbi->screen_base, NV12_Y_BLACK, size);
+ memset(fbi->screen_base + size, NV12_UV_BLACK,
+ display_buf_size - size);
+ } else {
+ pixel = (u32 *)fbi->screen_base;
+ for (i = 0; i < (display_buf_size >> 2); i++)
+ *pixel++ = color;
+ }
console_lock();
fbi->flags |= FBINFO_MISC_USEREVENT;
ret = fb_blank(fbi, FB_BLANK_UNBLANK);