Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273617
b: refs/heads/master
c: 15f517e
h: refs/heads/master
i:
  273615: 19d5d9d
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 8a606ae commit 8f9efdf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 369887411fb0f35585035aa7c253dc7fbe15cbc8
refs/heads/master: 15f517e2726cae7d9ed2a0bccb6e36dbf3fff456
25 changes: 19 additions & 6 deletions trunk/drivers/media/video/sh_mobile_ceu_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ static int sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev)
unsigned long top1, top2;
unsigned long bottom1, bottom2;
u32 status;
bool planar;
int ret = 0;

/*
Expand Down Expand Up @@ -314,17 +315,29 @@ static int sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev)

phys_addr_top = vb2_dma_contig_plane_dma_addr(pcdev->active, 0);

ceu_write(pcdev, top1, phys_addr_top);
if (V4L2_FIELD_NONE != pcdev->field) {
phys_addr_bottom = phys_addr_top + icd->user_width;
ceu_write(pcdev, bottom1, phys_addr_bottom);
}

switch (icd->current_fmt->host_fmt->fourcc) {
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
planar = true;
break;
default:
planar = false;
}

ceu_write(pcdev, top1, phys_addr_top);
if (V4L2_FIELD_NONE != pcdev->field) {
if (planar)
phys_addr_bottom = phys_addr_top + icd->user_width;
else
phys_addr_bottom = phys_addr_top +
soc_mbus_bytes_per_line(icd->user_width,
icd->current_fmt->host_fmt);
ceu_write(pcdev, bottom1, phys_addr_bottom);
}

if (planar) {
phys_addr_top += icd->user_width *
icd->user_height;
ceu_write(pcdev, top2, phys_addr_top);
Expand Down

0 comments on commit 8f9efdf

Please sign in to comment.