aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:21:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:21:02 -0400
commit5f76945a9c978b8b8bf8eb7fe3b17b9981240a97 (patch)
treedf61aca168df657bc71ce8b578bcb0c81b0622ee /drivers/media/platform/omap
parent940e3a8dd6683a3787faf769b3df7a06f1c2fa31 (diff)
parentcd9d6f10d07f26dd8a70e519c22b6b4f8a9e3e7a (diff)
Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6
Pull fbdev updates from Florian Tobias Schandinat: "This includes: - large updates for OMAP - basic OMAP5 DSS support for DPI and DSI outputs - large cleanups and restructuring - some update to Exynos and da8xx-fb - removal of the pnx4008 driver (arch removed) - various other small patches" Fix up some trivial conflicts (mostly just include line changes, but also some due to the renaming of the deferred work functions by Tejun). * tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits) gbefb: fix compile error video: mark nuc900fb_map_video_memory as __devinit video/mx3fb: set .owner to prevent module unloading while being used video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare drivers/video/exynos/exynos_mipi_dsi.c: fix error return code drivers/video/savage/savagefb_driver.c: fix error return code video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare da8xx-fb: save and restore LCDC context across suspend/resume cycle da8xx-fb: add pm_runtime support video/udlfb: fix line counting in fb_write OMAPDSS: add missing include for string.h OMAPDSS: DISPC: Configure color conversion coefficients for writeback OMAPDSS: DISPC: Add manager like functions for writeback OMAPDSS: DISPC: Configure writeback FIFOs OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup() OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup OMAPDSS: DISPC: Add function to set channel in for writeback OMAPDSS: DISPC: Don't set chroma resampling bit for writeback OMAPDSS: DISPC: Downscale chroma if plane is writeback OMAPDSS: DISPC: Configure input and output sizes for writeback ...
Diffstat (limited to 'drivers/media/platform/omap')
-rw-r--r--drivers/media/platform/omap/omap_vout.c75
1 files changed, 50 insertions, 25 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index 134016f0e660..a3b1a34c896d 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -455,11 +455,15 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr)
455 455
456 win = &vout->win; 456 win = &vout->win;
457 for (i = 0; i < ovid->num_overlays; i++) { 457 for (i = 0; i < ovid->num_overlays; i++) {
458 struct omap_dss_device *dssdev;
459
458 ovl = ovid->overlays[i]; 460 ovl = ovid->overlays[i];
459 if (!ovl->manager || !ovl->manager->device) 461 dssdev = ovl->get_device(ovl);
462
463 if (!dssdev)
460 return -EINVAL; 464 return -EINVAL;
461 465
462 timing = &ovl->manager->device->panel.timings; 466 timing = &dssdev->panel.timings;
463 467
464 outw = win->w.width; 468 outw = win->w.width;
465 outh = win->w.height; 469 outh = win->w.height;
@@ -516,8 +520,11 @@ static int omapvid_apply_changes(struct omap_vout_device *vout)
516 struct omapvideo_info *ovid = &vout->vid_info; 520 struct omapvideo_info *ovid = &vout->vid_info;
517 521
518 for (i = 0; i < ovid->num_overlays; i++) { 522 for (i = 0; i < ovid->num_overlays; i++) {
523 struct omap_dss_device *dssdev;
524
519 ovl = ovid->overlays[i]; 525 ovl = ovid->overlays[i];
520 if (!ovl->manager || !ovl->manager->device) 526 dssdev = ovl->get_device(ovl);
527 if (!dssdev)
521 return -EINVAL; 528 return -EINVAL;
522 ovl->manager->apply(ovl->manager); 529 ovl->manager->apply(ovl->manager);
523 } 530 }
@@ -580,12 +587,14 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus)
580 587
581 ovid = &vout->vid_info; 588 ovid = &vout->vid_info;
582 ovl = ovid->overlays[0]; 589 ovl = ovid->overlays[0];
583 /* get the display device attached to the overlay */
584 if (!ovl->manager || !ovl->manager->device)
585 return;
586 590
587 mgr_id = ovl->manager->id; 591 mgr_id = ovl->manager->id;
588 cur_display = ovl->manager->device; 592
593 /* get the display device attached to the overlay */
594 cur_display = ovl->get_device(ovl);
595
596 if (!cur_display)
597 return;
589 598
590 spin_lock(&vout->vbq_lock); 599 spin_lock(&vout->vbq_lock);
591 do_gettimeofday(&timevalue); 600 do_gettimeofday(&timevalue);
@@ -949,7 +958,9 @@ static int omap_vout_release(struct file *file)
949 /* Disable all the overlay managers connected with this interface */ 958 /* Disable all the overlay managers connected with this interface */
950 for (i = 0; i < ovid->num_overlays; i++) { 959 for (i = 0; i < ovid->num_overlays; i++) {
951 struct omap_overlay *ovl = ovid->overlays[i]; 960 struct omap_overlay *ovl = ovid->overlays[i];
952 if (ovl->manager && ovl->manager->device) 961 struct omap_dss_device *dssdev = ovl->get_device(ovl);
962
963 if (dssdev)
953 ovl->disable(ovl); 964 ovl->disable(ovl);
954 } 965 }
955 /* Turn off the pipeline */ 966 /* Turn off the pipeline */
@@ -1082,14 +1093,17 @@ static int vidioc_try_fmt_vid_out(struct file *file, void *fh,
1082 struct omapvideo_info *ovid; 1093 struct omapvideo_info *ovid;
1083 struct omap_video_timings *timing; 1094 struct omap_video_timings *timing;
1084 struct omap_vout_device *vout = fh; 1095 struct omap_vout_device *vout = fh;
1096 struct omap_dss_device *dssdev;
1085 1097
1086 ovid = &vout->vid_info; 1098 ovid = &vout->vid_info;
1087 ovl = ovid->overlays[0]; 1099 ovl = ovid->overlays[0];
1100 /* get the display device attached to the overlay */
1101 dssdev = ovl->get_device(ovl);
1088 1102
1089 if (!ovl->manager || !ovl->manager->device) 1103 if (!dssdev)
1090 return -EINVAL; 1104 return -EINVAL;
1091 /* get the display device attached to the overlay */ 1105
1092 timing = &ovl->manager->device->panel.timings; 1106 timing = &dssdev->panel.timings;
1093 1107
1094 vout->fbuf.fmt.height = timing->y_res; 1108 vout->fbuf.fmt.height = timing->y_res;
1095 vout->fbuf.fmt.width = timing->x_res; 1109 vout->fbuf.fmt.width = timing->x_res;
@@ -1106,6 +1120,7 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh,
1106 struct omapvideo_info *ovid; 1120 struct omapvideo_info *ovid;
1107 struct omap_video_timings *timing; 1121 struct omap_video_timings *timing;
1108 struct omap_vout_device *vout = fh; 1122 struct omap_vout_device *vout = fh;
1123 struct omap_dss_device *dssdev;
1109 1124
1110 if (vout->streaming) 1125 if (vout->streaming)
1111 return -EBUSY; 1126 return -EBUSY;
@@ -1114,13 +1129,14 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh,
1114 1129
1115 ovid = &vout->vid_info; 1130 ovid = &vout->vid_info;
1116 ovl = ovid->overlays[0]; 1131 ovl = ovid->overlays[0];
1132 dssdev = ovl->get_device(ovl);
1117 1133
1118 /* get the display device attached to the overlay */ 1134 /* get the display device attached to the overlay */
1119 if (!ovl->manager || !ovl->manager->device) { 1135 if (!dssdev) {
1120 ret = -EINVAL; 1136 ret = -EINVAL;
1121 goto s_fmt_vid_out_exit; 1137 goto s_fmt_vid_out_exit;
1122 } 1138 }
1123 timing = &ovl->manager->device->panel.timings; 1139 timing = &dssdev->panel.timings;
1124 1140
1125 /* We dont support RGB24-packed mode if vrfb rotation 1141 /* We dont support RGB24-packed mode if vrfb rotation
1126 * is enabled*/ 1142 * is enabled*/
@@ -1299,6 +1315,7 @@ static int vidioc_s_crop(struct file *file, void *fh, const struct v4l2_crop *cr
1299 struct omapvideo_info *ovid; 1315 struct omapvideo_info *ovid;
1300 struct omap_overlay *ovl; 1316 struct omap_overlay *ovl;
1301 struct omap_video_timings *timing; 1317 struct omap_video_timings *timing;
1318 struct omap_dss_device *dssdev;
1302 1319
1303 if (vout->streaming) 1320 if (vout->streaming)
1304 return -EBUSY; 1321 return -EBUSY;
@@ -1306,13 +1323,15 @@ static int vidioc_s_crop(struct file *file, void *fh, const struct v4l2_crop *cr
1306 mutex_lock(&vout->lock); 1323 mutex_lock(&vout->lock);
1307 ovid = &vout->vid_info; 1324 ovid = &vout->vid_info;
1308 ovl = ovid->overlays[0]; 1325 ovl = ovid->overlays[0];
1326 /* get the display device attached to the overlay */
1327 dssdev = ovl->get_device(ovl);
1309 1328
1310 if (!ovl->manager || !ovl->manager->device) { 1329 if (!dssdev) {
1311 ret = -EINVAL; 1330 ret = -EINVAL;
1312 goto s_crop_err; 1331 goto s_crop_err;
1313 } 1332 }
1314 /* get the display device attached to the overlay */ 1333
1315 timing = &ovl->manager->device->panel.timings; 1334 timing = &dssdev->panel.timings;
1316 1335
1317 if (is_rotation_90_or_270(vout)) { 1336 if (is_rotation_90_or_270(vout)) {
1318 vout->fbuf.fmt.height = timing->x_res; 1337 vout->fbuf.fmt.height = timing->x_res;
@@ -1668,7 +1687,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
1668 for (j = 0; j < ovid->num_overlays; j++) { 1687 for (j = 0; j < ovid->num_overlays; j++) {
1669 struct omap_overlay *ovl = ovid->overlays[j]; 1688 struct omap_overlay *ovl = ovid->overlays[j];
1670 1689
1671 if (ovl->manager && ovl->manager->device) { 1690 if (ovl->get_device(ovl)) {
1672 struct omap_overlay_info info; 1691 struct omap_overlay_info info;
1673 ovl->get_overlay_info(ovl, &info); 1692 ovl->get_overlay_info(ovl, &info);
1674 info.paddr = addr; 1693 info.paddr = addr;
@@ -1691,8 +1710,9 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
1691 1710
1692 for (j = 0; j < ovid->num_overlays; j++) { 1711 for (j = 0; j < ovid->num_overlays; j++) {
1693 struct omap_overlay *ovl = ovid->overlays[j]; 1712 struct omap_overlay *ovl = ovid->overlays[j];
1713 struct omap_dss_device *dssdev = ovl->get_device(ovl);
1694 1714
1695 if (ovl->manager && ovl->manager->device) { 1715 if (dssdev) {
1696 ret = ovl->enable(ovl); 1716 ret = ovl->enable(ovl);
1697 if (ret) 1717 if (ret)
1698 goto streamon_err1; 1718 goto streamon_err1;
@@ -1727,8 +1747,9 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
1727 1747
1728 for (j = 0; j < ovid->num_overlays; j++) { 1748 for (j = 0; j < ovid->num_overlays; j++) {
1729 struct omap_overlay *ovl = ovid->overlays[j]; 1749 struct omap_overlay *ovl = ovid->overlays[j];
1750 struct omap_dss_device *dssdev = ovl->get_device(ovl);
1730 1751
1731 if (ovl->manager && ovl->manager->device) 1752 if (dssdev)
1732 ovl->disable(ovl); 1753 ovl->disable(ovl);
1733 } 1754 }
1734 1755
@@ -1891,8 +1912,8 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
1891 struct video_device *vfd; 1912 struct video_device *vfd;
1892 struct v4l2_pix_format *pix; 1913 struct v4l2_pix_format *pix;
1893 struct v4l2_control *control; 1914 struct v4l2_control *control;
1894 struct omap_dss_device *display = 1915 struct omap_overlay *ovl = vout->vid_info.overlays[0];
1895 vout->vid_info.overlays[0]->manager->device; 1916 struct omap_dss_device *display = ovl->get_device(ovl);
1896 1917
1897 /* set the default pix */ 1918 /* set the default pix */
1898 pix = &vout->pix; 1919 pix = &vout->pix;
@@ -2207,8 +2228,10 @@ static int __init omap_vout_probe(struct platform_device *pdev)
2207 */ 2228 */
2208 for (i = 1; i < vid_dev->num_overlays; i++) { 2229 for (i = 1; i < vid_dev->num_overlays; i++) {
2209 ovl = omap_dss_get_overlay(i); 2230 ovl = omap_dss_get_overlay(i);
2210 if (ovl->manager && ovl->manager->device) { 2231 dssdev = ovl->get_device(ovl);
2211 def_display = ovl->manager->device; 2232
2233 if (dssdev) {
2234 def_display = dssdev;
2212 } else { 2235 } else {
2213 dev_warn(&pdev->dev, "cannot find display\n"); 2236 dev_warn(&pdev->dev, "cannot find display\n");
2214 def_display = NULL; 2237 def_display = NULL;
@@ -2255,8 +2278,10 @@ probe_err1:
2255 for (i = 1; i < vid_dev->num_overlays; i++) { 2278 for (i = 1; i < vid_dev->num_overlays; i++) {
2256 def_display = NULL; 2279 def_display = NULL;
2257 ovl = omap_dss_get_overlay(i); 2280 ovl = omap_dss_get_overlay(i);
2258 if (ovl->manager && ovl->manager->device) 2281 dssdev = ovl->get_device(ovl);
2259 def_display = ovl->manager->device; 2282
2283 if (dssdev)
2284 def_display = dssdev;
2260 2285
2261 if (def_display && def_display->driver) 2286 if (def_display && def_display->driver)
2262 def_display->driver->disable(def_display); 2287 def_display->driver->disable(def_display);