diff options
Diffstat (limited to 'drivers/media/platform/omap/omap_vout.c')
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 2d177fa58471..64ab6fb06b9c 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -369,7 +369,7 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout, | |||
369 | { | 369 | { |
370 | int ret = 0; | 370 | int ret = 0; |
371 | struct omap_overlay_info info; | 371 | struct omap_overlay_info info; |
372 | int cropheight, cropwidth, pixheight, pixwidth; | 372 | int cropheight, cropwidth, pixwidth; |
373 | 373 | ||
374 | if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0 && | 374 | if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0 && |
375 | (outw != vout->pix.width || outh != vout->pix.height)) { | 375 | (outw != vout->pix.width || outh != vout->pix.height)) { |
@@ -389,12 +389,10 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout, | |||
389 | if (is_rotation_90_or_270(vout)) { | 389 | if (is_rotation_90_or_270(vout)) { |
390 | cropheight = vout->crop.width; | 390 | cropheight = vout->crop.width; |
391 | cropwidth = vout->crop.height; | 391 | cropwidth = vout->crop.height; |
392 | pixheight = vout->pix.width; | ||
393 | pixwidth = vout->pix.height; | 392 | pixwidth = vout->pix.height; |
394 | } else { | 393 | } else { |
395 | cropheight = vout->crop.height; | 394 | cropheight = vout->crop.height; |
396 | cropwidth = vout->crop.width; | 395 | cropwidth = vout->crop.width; |
397 | pixheight = vout->pix.height; | ||
398 | pixwidth = vout->pix.width; | 396 | pixwidth = vout->pix.width; |
399 | } | 397 | } |
400 | 398 | ||
@@ -991,7 +989,7 @@ static int omap_vout_release(struct file *file) | |||
991 | mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | | 989 | mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | |
992 | DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2; | 990 | DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2; |
993 | omap_dispc_unregister_isr(omap_vout_isr, vout, mask); | 991 | omap_dispc_unregister_isr(omap_vout_isr, vout, mask); |
994 | vout->streaming = 0; | 992 | vout->streaming = false; |
995 | 993 | ||
996 | videobuf_streamoff(q); | 994 | videobuf_streamoff(q); |
997 | videobuf_queue_cancel(q); | 995 | videobuf_queue_cancel(q); |
@@ -1451,12 +1449,10 @@ static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *a) | |||
1451 | } | 1449 | } |
1452 | case V4L2_CID_VFLIP: | 1450 | case V4L2_CID_VFLIP: |
1453 | { | 1451 | { |
1454 | struct omap_overlay *ovl; | ||
1455 | struct omapvideo_info *ovid; | 1452 | struct omapvideo_info *ovid; |
1456 | unsigned int mirror = a->value; | 1453 | unsigned int mirror = a->value; |
1457 | 1454 | ||
1458 | ovid = &vout->vid_info; | 1455 | ovid = &vout->vid_info; |
1459 | ovl = ovid->overlays[0]; | ||
1460 | 1456 | ||
1461 | mutex_lock(&vout->lock); | 1457 | mutex_lock(&vout->lock); |
1462 | if (mirror && ovid->rotation_type == VOUT_ROT_NONE) { | 1458 | if (mirror && ovid->rotation_type == VOUT_ROT_NONE) { |
@@ -1489,7 +1485,7 @@ static int vidioc_reqbufs(struct file *file, void *fh, | |||
1489 | struct omap_vout_device *vout = fh; | 1485 | struct omap_vout_device *vout = fh; |
1490 | struct videobuf_queue *q = &vout->vbq; | 1486 | struct videobuf_queue *q = &vout->vbq; |
1491 | 1487 | ||
1492 | if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) || (req->count < 0)) | 1488 | if (req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) |
1493 | return -EINVAL; | 1489 | return -EINVAL; |
1494 | /* if memory is not mmp or userptr | 1490 | /* if memory is not mmp or userptr |
1495 | return error */ | 1491 | return error */ |
@@ -1648,7 +1644,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) | |||
1648 | vout->field_id = 0; | 1644 | vout->field_id = 0; |
1649 | 1645 | ||
1650 | /* set flag here. Next QBUF will start DMA */ | 1646 | /* set flag here. Next QBUF will start DMA */ |
1651 | vout->streaming = 1; | 1647 | vout->streaming = true; |
1652 | 1648 | ||
1653 | vout->first_int = 1; | 1649 | vout->first_int = 1; |
1654 | 1650 | ||
@@ -1708,7 +1704,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) | |||
1708 | if (!vout->streaming) | 1704 | if (!vout->streaming) |
1709 | return -EINVAL; | 1705 | return -EINVAL; |
1710 | 1706 | ||
1711 | vout->streaming = 0; | 1707 | vout->streaming = false; |
1712 | mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD | 1708 | mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD |
1713 | | DISPC_IRQ_VSYNC2; | 1709 | | DISPC_IRQ_VSYNC2; |
1714 | 1710 | ||
@@ -1916,7 +1912,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout) | |||
1916 | control[0].id = V4L2_CID_ROTATE; | 1912 | control[0].id = V4L2_CID_ROTATE; |
1917 | control[0].value = 0; | 1913 | control[0].value = 0; |
1918 | vout->rotation = 0; | 1914 | vout->rotation = 0; |
1919 | vout->mirror = 0; | 1915 | vout->mirror = false; |
1920 | vout->control[2].id = V4L2_CID_HFLIP; | 1916 | vout->control[2].id = V4L2_CID_HFLIP; |
1921 | vout->control[2].value = 0; | 1917 | vout->control[2].value = 0; |
1922 | if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) | 1918 | if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) |