From 2a9a142096add38e0027452fcda06c00611a533e Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 18 Dec 2008 12:45:33 -0300 Subject: [PATCH] --- yaml --- r: 124556 b: refs/heads/master c: 9e4a56d27f6150b0c9f8c7cc33ea944749377104 h: refs/heads/master v: v3 --- [refs] | 2 +- .../media/video/sh_mobile_ceu_camera.c | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 88e8759b71cc..570298103e7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8be65dc59645d6ec9149fc26dfff7ca01e279e87 +refs/heads/master: 9e4a56d27f6150b0c9f8c7cc33ea944749377104 diff --git a/trunk/drivers/media/video/sh_mobile_ceu_camera.c b/trunk/drivers/media/video/sh_mobile_ceu_camera.c index 31a0a9769a3f..7d1a84426413 100644 --- a/trunk/drivers/media/video/sh_mobile_ceu_camera.c +++ b/trunk/drivers/media/video/sh_mobile_ceu_camera.c @@ -177,6 +177,8 @@ static void sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev) switch (icd->current_fmt->fourcc) { case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: + case V4L2_PIX_FMT_NV16: + case V4L2_PIX_FMT_NV61: phys_addr += (icd->width * icd->height); ceu_write(pcdev, CDACR, phys_addr); } @@ -407,6 +409,9 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: yuv_lineskip = 1; /* skip for NV12/21, no skip for NV16/61 */ + /* fall-through */ + case V4L2_PIX_FMT_NV16: + case V4L2_PIX_FMT_NV61: yuv_mode = 1; switch (pcdev->camera_fmt->fourcc) { case V4L2_PIX_FMT_UYVY: @@ -426,8 +431,9 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, } } - if (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21) - value ^= 0x00000100; /* swap U, V to change from NV12->NV21 */ + if ((icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21) || + (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV61)) + value ^= 0x00000100; /* swap U, V to change from NV1x->NVx1 */ value |= (common_flags & SOCAM_VSYNC_ACTIVE_LOW) ? (1 << 1) : 0; value |= (common_flags & SOCAM_HSYNC_ACTIVE_LOW) ? (1 << 0) : 0; @@ -509,6 +515,18 @@ static const struct soc_camera_data_format sh_mobile_ceu_formats[] = { .fourcc = V4L2_PIX_FMT_NV21, .colorspace = V4L2_COLORSPACE_JPEG, }, + { + .name = "NV16", + .depth = 16, + .fourcc = V4L2_PIX_FMT_NV16, + .colorspace = V4L2_COLORSPACE_JPEG, + }, + { + .name = "NV61", + .depth = 16, + .fourcc = V4L2_PIX_FMT_NV61, + .colorspace = V4L2_COLORSPACE_JPEG, + }, }; static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, int idx,