diff options
author | Archit Taneja <archit@ti.com> | 2012-03-07 03:01:16 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-27 07:03:24 -0400 |
commit | 32d640dea87bc973b91975ea408a04c6dcca3f45 (patch) | |
tree | 1195d55177035a54f14f5f15261d58d3e56703da | |
parent | 4e44cd08d9581423f10df7887ffeff685571122a (diff) |
[media] omap_vout: Set DSS overlay_info only if paddr is non zero
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>
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index a3b1a34c896d..837cb6db747f 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -1174,13 +1174,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, | |||
1174 | /* set default crop and win */ | 1174 | /* set default crop and win */ |
1175 | omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); | 1175 | omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); |
1176 | 1176 | ||
1177 | /* Save the changes in the overlay strcuture */ | ||
1178 | ret = omapvid_init(vout, 0); | ||
1179 | if (ret) { | ||
1180 | v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); | ||
1181 | goto s_fmt_vid_out_exit; | ||
1182 | } | ||
1183 | |||
1184 | ret = 0; | 1177 | ret = 0; |
1185 | 1178 | ||
1186 | s_fmt_vid_out_exit: | 1179 | s_fmt_vid_out_exit: |
@@ -1684,20 +1677,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) | |||
1684 | 1677 | ||
1685 | omap_dispc_register_isr(omap_vout_isr, vout, mask); | 1678 | omap_dispc_register_isr(omap_vout_isr, vout, mask); |
1686 | 1679 | ||
1687 | for (j = 0; j < ovid->num_overlays; j++) { | ||
1688 | struct omap_overlay *ovl = ovid->overlays[j]; | ||
1689 | |||
1690 | if (ovl->get_device(ovl)) { | ||
1691 | struct omap_overlay_info info; | ||
1692 | ovl->get_overlay_info(ovl, &info); | ||
1693 | info.paddr = addr; | ||
1694 | if (ovl->set_overlay_info(ovl, &info)) { | ||
1695 | ret = -EINVAL; | ||
1696 | goto streamon_err1; | ||
1697 | } | ||
1698 | } | ||
1699 | } | ||
1700 | |||
1701 | /* First save the configuration in ovelray structure */ | 1680 | /* First save the configuration in ovelray structure */ |
1702 | ret = omapvid_init(vout, addr); | 1681 | ret = omapvid_init(vout, addr); |
1703 | if (ret) | 1682 | if (ret) |
@@ -2094,11 +2073,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev) | |||
2094 | } | 2073 | } |
2095 | video_set_drvdata(vfd, vout); | 2074 | video_set_drvdata(vfd, vout); |
2096 | 2075 | ||
2097 | /* Configure the overlay structure */ | 2076 | dev_info(&pdev->dev, ": registered and initialized" |
2098 | ret = omapvid_init(vid_dev->vouts[k], 0); | 2077 | " video device %d\n", vfd->minor); |
2099 | if (!ret) | 2078 | if (k == (pdev->num_resources - 1)) |
2100 | goto success; | 2079 | return 0; |
2101 | 2080 | ||
2081 | continue; | ||
2102 | error2: | 2082 | error2: |
2103 | if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) | 2083 | if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) |
2104 | omap_vout_release_vrfb(vout); | 2084 | omap_vout_release_vrfb(vout); |
@@ -2108,12 +2088,6 @@ error1: | |||
2108 | error: | 2088 | error: |
2109 | kfree(vout); | 2089 | kfree(vout); |
2110 | return ret; | 2090 | return ret; |
2111 | |||
2112 | success: | ||
2113 | dev_info(&pdev->dev, ": registered and initialized" | ||
2114 | " video device %d\n", vfd->minor); | ||
2115 | if (k == (pdev->num_resources - 1)) | ||
2116 | return 0; | ||
2117 | } | 2091 | } |
2118 | 2092 | ||
2119 | return -ENODEV; | 2093 | return -ENODEV; |