]> Pileus Git - ~andy/linux/commitdiff
[media] omap_vout: Set DSS overlay_info only if paddr is non zero
authorArchit Taneja <archit@ti.com>
Wed, 7 Mar 2012 08:01:16 +0000 (05:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 11:03:24 +0000 (09:03 -0200)
The omap_vout driver tries to set the DSS overlay_info using set_overlay_info()
when the physical address for the overlay is still not configured. This happens
in omap_vout_probe() and vidioc_s_fmt_vid_out().
The calls to omapvid_init(which internally calls set_overlay_info()) are removed
from these functions. They don't need to be called as the omap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call to set_overlay_info() in vidioc_streamon(), this was used to set
the paddr, this isn't needed as omapvid_init() does the same thing later.
These changes are required as the DSS2 driver since 3.3 kernel doesn't let you
set the overlay info with paddr as 0.

Signed-off-by: Archit Taneja <archit@ti.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/omap/omap_vout.c

index a3b1a34c896db9257000f6c1a3e8fb8bb7cd7df0..837cb6db747f984d8227f2c0f7d927a633b75cff 100644 (file)
@@ -1174,13 +1174,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh,
        /* set default crop and win */
        omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win);
 
-       /* Save the changes in the overlay strcuture */
-       ret = omapvid_init(vout, 0);
-       if (ret) {
-               v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n");
-               goto s_fmt_vid_out_exit;
-       }
-
        ret = 0;
 
 s_fmt_vid_out_exit:
@@ -1684,20 +1677,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
 
        omap_dispc_register_isr(omap_vout_isr, vout, mask);
 
-       for (j = 0; j < ovid->num_overlays; j++) {
-               struct omap_overlay *ovl = ovid->overlays[j];
-
-               if (ovl->get_device(ovl)) {
-                       struct omap_overlay_info info;
-                       ovl->get_overlay_info(ovl, &info);
-                       info.paddr = addr;
-                       if (ovl->set_overlay_info(ovl, &info)) {
-                               ret = -EINVAL;
-                               goto streamon_err1;
-                       }
-               }
-       }
-
        /* First save the configuration in ovelray structure */
        ret = omapvid_init(vout, addr);
        if (ret)
@@ -2094,11 +2073,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev)
                }
                video_set_drvdata(vfd, vout);
 
-               /* Configure the overlay structure */
-               ret = omapvid_init(vid_dev->vouts[k], 0);
-               if (!ret)
-                       goto success;
+               dev_info(&pdev->dev, ": registered and initialized"
+                               " video device %d\n", vfd->minor);
+               if (k == (pdev->num_resources - 1))
+                       return 0;
 
+               continue;
 error2:
                if (vout->vid_info.rotation_type == VOUT_ROT_VRFB)
                        omap_vout_release_vrfb(vout);
@@ -2108,12 +2088,6 @@ error1:
 error:
                kfree(vout);
                return ret;
-
-success:
-               dev_info(&pdev->dev, ": registered and initialized"
-                               " video device %d\n", vfd->minor);
-               if (k == (pdev->num_resources - 1))
-                       return 0;
        }
 
        return -ENODEV;