Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'archit/set-timing-work'

An overlay manager's timings (the manager size, and blanking parameters
if an LCD manager) are DISPC shadow registers, and they should hence
follow the correct programming model.

This series makes the video timings an extra_info parameter in manager's
private data. The interface drivers now apply the timings instead of
directly writing to registers.

This change also prevents the need to use display resolution for overlay
checks, hence making some of the APPLY functions less dependent on the
display. Some DISPC functions that needed display width can also use
these privately stored timings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

+175 -90
+100 -32
drivers/video/omap2/dss/apply.c
··· 99 99 100 100 /* If true, a display is enabled using this manager */ 101 101 bool enabled; 102 + 103 + bool extra_info_dirty; 104 + bool shadow_extra_info_dirty; 105 + 106 + struct omap_video_timings timings; 102 107 }; 103 108 104 109 static struct { ··· 181 176 } 182 177 183 178 static int dss_check_settings_low(struct omap_overlay_manager *mgr, 184 - struct omap_dss_device *dssdev, bool applying) 179 + bool applying) 185 180 { 186 181 struct omap_overlay_info *oi; 187 182 struct omap_overlay_manager_info *mi; ··· 191 186 struct mgr_priv_data *mp; 192 187 193 188 mp = get_mgr_priv(mgr); 189 + 190 + if (!mp->enabled) 191 + return 0; 194 192 195 193 if (applying && mp->user_info_dirty) 196 194 mi = &mp->user_info; ··· 214 206 ois[ovl->id] = oi; 215 207 } 216 208 217 - return dss_mgr_check(mgr, dssdev, mi, ois); 209 + return dss_mgr_check(mgr, mi, &mp->timings, ois); 218 210 } 219 211 220 212 /* 221 213 * check manager and overlay settings using overlay_info from data->info 222 214 */ 223 - static int dss_check_settings(struct omap_overlay_manager *mgr, 224 - struct omap_dss_device *dssdev) 215 + static int dss_check_settings(struct omap_overlay_manager *mgr) 225 216 { 226 - return dss_check_settings_low(mgr, dssdev, false); 217 + return dss_check_settings_low(mgr, false); 227 218 } 228 219 229 220 /* 230 221 * check manager and overlay settings using overlay_info from ovl->info if 231 222 * dirty and from data->info otherwise 232 223 */ 233 - static int dss_check_settings_apply(struct omap_overlay_manager *mgr, 234 - struct omap_dss_device *dssdev) 224 + static int dss_check_settings_apply(struct omap_overlay_manager *mgr) 235 225 { 236 - return dss_check_settings_low(mgr, dssdev, true); 226 + return dss_check_settings_low(mgr, true); 237 227 } 238 228 239 229 static bool need_isr(void) ··· 265 259 266 260 /* to set GO bit */ 267 261 if (mp->shadow_info_dirty) 262 + return true; 263 + 264 + /* 265 + * NOTE: we don't check extra_info flags for disabled 266 + * managers, once the manager is enabled, the extra_info 267 + * related manager changes will be taken in by HW. 268 + */ 269 + 270 + /* to write new values to registers */ 271 + if (mp->extra_info_dirty) 272 + return true; 273 + 274 + /* to set GO bit */ 275 + if (mp->shadow_extra_info_dirty) 268 276 return true; 269 277 270 278 list_for_each_entry(ovl, &mgr->overlays, list) { ··· 325 305 326 306 mp = get_mgr_priv(mgr); 327 307 328 - if (mp->shadow_info_dirty) 308 + if (mp->shadow_info_dirty || mp->shadow_extra_info_dirty) 329 309 return true; 330 310 331 311 list_for_each_entry(ovl, &mgr->overlays, list) { ··· 340 320 /* returns true if an extra_info field is currently being updated */ 341 321 static bool extra_info_update_ongoing(void) 342 322 { 343 - const int num_ovls = omap_dss_get_num_overlays(); 344 - struct ovl_priv_data *op; 345 - struct omap_overlay *ovl; 346 - struct mgr_priv_data *mp; 323 + const int num_mgrs = dss_feat_get_num_mgrs(); 347 324 int i; 348 325 349 - for (i = 0; i < num_ovls; ++i) { 350 - ovl = omap_dss_get_overlay(i); 351 - op = get_ovl_priv(ovl); 326 + for (i = 0; i < num_mgrs; ++i) { 327 + struct omap_overlay_manager *mgr; 328 + struct omap_overlay *ovl; 329 + struct mgr_priv_data *mp; 352 330 353 - if (!ovl->manager) 354 - continue; 355 - 356 - mp = get_mgr_priv(ovl->manager); 331 + mgr = omap_dss_get_overlay_manager(i); 332 + mp = get_mgr_priv(mgr); 357 333 358 334 if (!mp->enabled) 359 335 continue; ··· 357 341 if (!mp->updating) 358 342 continue; 359 343 360 - if (op->extra_info_dirty || op->shadow_extra_info_dirty) 344 + if (mp->extra_info_dirty || mp->shadow_extra_info_dirty) 361 345 return true; 346 + 347 + list_for_each_entry(ovl, &mgr->overlays, list) { 348 + struct ovl_priv_data *op = get_ovl_priv(ovl); 349 + 350 + if (op->extra_info_dirty || op->shadow_extra_info_dirty) 351 + return true; 352 + } 362 353 } 363 354 364 355 return false; ··· 548 525 549 526 oi = &op->info; 550 527 528 + mp = get_mgr_priv(ovl->manager); 529 + 551 530 replication = dss_use_replication(ovl->manager->device, oi->color_mode); 552 531 553 532 ilace = ovl->manager->device->type == OMAP_DISPLAY_TYPE_VENC; 554 533 555 - r = dispc_ovl_setup(ovl->id, oi, ilace, replication); 534 + r = dispc_ovl_setup(ovl->id, oi, ilace, replication, &mp->timings); 556 535 if (r) { 557 536 /* 558 537 * We can't do much here, as this function can be called from ··· 567 542 dispc_ovl_enable(ovl->id, false); 568 543 return; 569 544 } 570 - 571 - mp = get_mgr_priv(ovl->manager); 572 545 573 546 op->info_dirty = false; 574 547 if (mp->updating) ··· 624 601 } 625 602 } 626 603 604 + static void dss_mgr_write_regs_extra(struct omap_overlay_manager *mgr) 605 + { 606 + struct mgr_priv_data *mp = get_mgr_priv(mgr); 607 + 608 + DSSDBGF("%d", mgr->id); 609 + 610 + if (!mp->extra_info_dirty) 611 + return; 612 + 613 + dispc_mgr_set_timings(mgr->id, &mp->timings); 614 + 615 + mp->extra_info_dirty = false; 616 + if (mp->updating) 617 + mp->shadow_extra_info_dirty = true; 618 + } 619 + 627 620 static void dss_write_regs_common(void) 628 621 { 629 622 const int num_mgrs = omap_dss_get_num_overlay_managers(); ··· 685 646 if (!mp->enabled || mgr_manual_update(mgr) || mp->busy) 686 647 continue; 687 648 688 - r = dss_check_settings(mgr, mgr->device); 649 + r = dss_check_settings(mgr); 689 650 if (r) { 690 651 DSSERR("cannot write registers for manager %s: " 691 652 "illegal configuration\n", mgr->name); ··· 693 654 } 694 655 695 656 dss_mgr_write_regs(mgr); 657 + dss_mgr_write_regs_extra(mgr); 696 658 } 697 659 } 698 660 ··· 733 693 734 694 mp = get_mgr_priv(mgr); 735 695 mp->shadow_info_dirty = false; 696 + mp->shadow_extra_info_dirty = false; 736 697 737 698 list_for_each_entry(ovl, &mgr->overlays, list) { 738 699 op = get_ovl_priv(ovl); ··· 752 711 753 712 WARN_ON(mp->updating); 754 713 755 - r = dss_check_settings(mgr, mgr->device); 714 + r = dss_check_settings(mgr); 756 715 if (r) { 757 716 DSSERR("cannot start manual update: illegal configuration\n"); 758 717 spin_unlock_irqrestore(&data_lock, flags); ··· 760 719 } 761 720 762 721 dss_mgr_write_regs(mgr); 722 + dss_mgr_write_regs_extra(mgr); 763 723 764 724 dss_write_regs_common(); 765 725 ··· 899 857 900 858 spin_lock_irqsave(&data_lock, flags); 901 859 902 - r = dss_check_settings_apply(mgr, mgr->device); 860 + r = dss_check_settings_apply(mgr); 903 861 if (r) { 904 862 spin_unlock_irqrestore(&data_lock, flags); 905 863 DSSERR("failed to apply settings: illegal configuration.\n"); ··· 960 918 bool use_fifo_merge) 961 919 { 962 920 struct ovl_priv_data *op = get_ovl_priv(ovl); 963 - struct omap_dss_device *dssdev; 964 921 u32 fifo_low, fifo_high; 965 922 966 923 if (!op->enabled && !op->enabling) 967 924 return; 968 - 969 - dssdev = ovl->manager->device; 970 925 971 926 dispc_ovl_compute_fifo_thresholds(ovl->id, &fifo_low, &fifo_high, 972 927 use_fifo_merge); ··· 1089 1050 1090 1051 mp->enabled = true; 1091 1052 1092 - r = dss_check_settings(mgr, mgr->device); 1053 + r = dss_check_settings(mgr); 1093 1054 if (r) { 1094 1055 DSSERR("failed to enable manager %d: check_settings failed\n", 1095 1056 mgr->id); ··· 1264 1225 return r; 1265 1226 } 1266 1227 1228 + static void dss_apply_mgr_timings(struct omap_overlay_manager *mgr, 1229 + struct omap_video_timings *timings) 1230 + { 1231 + struct mgr_priv_data *mp = get_mgr_priv(mgr); 1232 + 1233 + mp->timings = *timings; 1234 + mp->extra_info_dirty = true; 1235 + } 1236 + 1237 + void dss_mgr_set_timings(struct omap_overlay_manager *mgr, 1238 + struct omap_video_timings *timings) 1239 + { 1240 + unsigned long flags; 1241 + 1242 + mutex_lock(&apply_lock); 1243 + 1244 + spin_lock_irqsave(&data_lock, flags); 1245 + 1246 + dss_apply_mgr_timings(mgr, timings); 1247 + 1248 + dss_write_regs(); 1249 + dss_set_go_bits(); 1250 + 1251 + spin_unlock_irqrestore(&data_lock, flags); 1252 + 1253 + wait_pending_extra_info_updates(); 1254 + 1255 + mutex_unlock(&apply_lock); 1256 + } 1267 1257 1268 1258 int dss_ovl_set_info(struct omap_overlay *ovl, 1269 1259 struct omap_overlay_info *info) ··· 1461 1393 1462 1394 op->enabling = true; 1463 1395 1464 - r = dss_check_settings(ovl->manager, ovl->manager->device); 1396 + r = dss_check_settings(ovl->manager); 1465 1397 if (r) { 1466 1398 DSSERR("failed to enable overlay %d: check_settings failed\n", 1467 1399 ovl->id);
+30 -34
drivers/video/omap2/dss/dispc.c
··· 413 413 return false; 414 414 } 415 415 416 - static struct omap_dss_device *dispc_mgr_get_device(enum omap_channel channel) 417 - { 418 - struct omap_overlay_manager *mgr = 419 - omap_dss_get_overlay_manager(channel); 420 - 421 - return mgr ? mgr->device : NULL; 422 - } 423 - 424 416 u32 dispc_mgr_get_vsync_irq(enum omap_channel channel) 425 417 { 426 418 switch (channel) { ··· 1653 1661 * This function is used to avoid synclosts in OMAP3, because of some 1654 1662 * undocumented horizontal position and timing related limitations. 1655 1663 */ 1656 - static int check_horiz_timing_omap3(enum omap_channel channel, u16 pos_x, 1664 + static int check_horiz_timing_omap3(enum omap_channel channel, 1665 + const struct omap_video_timings *t, u16 pos_x, 1657 1666 u16 width, u16 height, u16 out_width, u16 out_height) 1658 1667 { 1659 1668 int DS = DIV_ROUND_UP(height, out_height); 1660 - struct omap_dss_device *dssdev = dispc_mgr_get_device(channel); 1661 - struct omap_video_timings t = dssdev->panel.timings; 1662 1669 unsigned long nonactive, lclk, pclk; 1663 1670 static const u8 limits[3] = { 8, 10, 20 }; 1664 1671 u64 val, blank; 1665 1672 int i; 1666 1673 1667 - nonactive = t.x_res + t.hfp + t.hsw + t.hbp - out_width; 1674 + nonactive = t->x_res + t->hfp + t->hsw + t->hbp - out_width; 1668 1675 pclk = dispc_mgr_pclk_rate(channel); 1669 1676 if (dispc_mgr_is_lcd(channel)) 1670 1677 lclk = dispc_mgr_lclk_rate(channel); ··· 1675 1684 i++; 1676 1685 if (out_width < width) 1677 1686 i++; 1678 - blank = div_u64((u64)(t.hbp + t.hsw + t.hfp) * lclk, pclk); 1687 + blank = div_u64((u64)(t->hbp + t->hsw + t->hfp) * lclk, pclk); 1679 1688 DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]); 1680 1689 if (blank <= limits[i]) 1681 1690 return -EINVAL; ··· 1706 1715 } 1707 1716 1708 1717 static unsigned long calc_core_clk_five_taps(enum omap_channel channel, 1709 - u16 width, u16 height, u16 out_width, u16 out_height, 1718 + const struct omap_video_timings *mgr_timings, u16 width, 1719 + u16 height, u16 out_width, u16 out_height, 1710 1720 enum omap_color_mode color_mode) 1711 1721 { 1712 1722 u32 core_clk = 0; ··· 1717 1725 return (unsigned long) pclk; 1718 1726 1719 1727 if (height > out_height) { 1720 - struct omap_dss_device *dssdev = dispc_mgr_get_device(channel); 1721 - unsigned int ppl = dssdev->panel.timings.x_res; 1728 + unsigned int ppl = mgr_timings->x_res; 1722 1729 1723 1730 tmp = pclk * height * out_width; 1724 1731 do_div(tmp, 2 * out_height * ppl); ··· 1786 1795 } 1787 1796 1788 1797 static int dispc_ovl_calc_scaling(enum omap_plane plane, 1789 - enum omap_channel channel, u16 width, u16 height, 1790 - u16 out_width, u16 out_height, 1798 + enum omap_channel channel, 1799 + const struct omap_video_timings *mgr_timings, 1800 + u16 width, u16 height, u16 out_width, u16 out_height, 1791 1801 enum omap_color_mode color_mode, bool *five_taps, 1792 1802 int *x_predecim, int *y_predecim, u16 pos_x) 1793 1803 { ··· 1863 1871 do { 1864 1872 in_height = DIV_ROUND_UP(height, decim_y); 1865 1873 in_width = DIV_ROUND_UP(width, decim_x); 1866 - core_clk = calc_core_clk_five_taps(channel, in_width, 1867 - in_height, out_width, out_height, color_mode); 1874 + core_clk = calc_core_clk_five_taps(channel, mgr_timings, 1875 + in_width, in_height, out_width, out_height, 1876 + color_mode); 1868 1877 1869 - error = check_horiz_timing_omap3(channel, pos_x, 1870 - in_width, in_height, out_width, out_height); 1878 + error = check_horiz_timing_omap3(channel, mgr_timings, 1879 + pos_x, in_width, in_height, out_width, 1880 + out_height); 1871 1881 1872 1882 if (in_width > maxsinglelinewidth) 1873 1883 if (in_height > out_height && ··· 1894 1900 } while (decim_x <= *x_predecim && decim_y <= *y_predecim 1895 1901 && error); 1896 1902 1897 - if (check_horiz_timing_omap3(channel, pos_x, width, height, 1898 - out_width, out_height)){ 1903 + if (check_horiz_timing_omap3(channel, mgr_timings, pos_x, width, 1904 + height, out_width, out_height)){ 1899 1905 DSSERR("horizontal timing too tight\n"); 1900 1906 return -EINVAL; 1901 1907 } ··· 1953 1959 } 1954 1960 1955 1961 int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, 1956 - bool ilace, bool replication) 1962 + bool ilace, bool replication, 1963 + const struct omap_video_timings *mgr_timings) 1957 1964 { 1958 1965 struct omap_overlay *ovl = omap_dss_get_overlay(plane); 1959 1966 bool five_taps = true; ··· 2003 2008 if (!dss_feat_color_mode_supported(plane, oi->color_mode)) 2004 2009 return -EINVAL; 2005 2010 2006 - r = dispc_ovl_calc_scaling(plane, channel, in_width, in_height, 2007 - out_width, out_height, oi->color_mode, &five_taps, 2008 - &x_predecim, &y_predecim, oi->pos_x); 2011 + r = dispc_ovl_calc_scaling(plane, channel, mgr_timings, in_width, 2012 + in_height, out_width, out_height, oi->color_mode, 2013 + &five_taps, &x_predecim, &y_predecim, oi->pos_x); 2009 2014 if (r) 2010 2015 return r; 2011 2016 ··· 2474 2479 } 2475 2480 2476 2481 bool dispc_mgr_timings_ok(enum omap_channel channel, 2477 - struct omap_video_timings *timings) 2482 + const struct omap_video_timings *timings) 2478 2483 { 2479 2484 bool timings_ok; 2480 2485 ··· 2638 2643 2639 2644 return r / pcd; 2640 2645 } else { 2641 - struct omap_dss_device *dssdev = 2642 - dispc_mgr_get_device(channel); 2646 + enum dss_hdmi_venc_clk_source_select source; 2643 2647 2644 - switch (dssdev->type) { 2645 - case OMAP_DISPLAY_TYPE_VENC: 2648 + source = dss_get_hdmi_venc_clk_source(); 2649 + 2650 + switch (source) { 2651 + case DSS_VENC_TV_CLK: 2646 2652 return venc_get_pixel_clock(); 2647 - case OMAP_DISPLAY_TYPE_HDMI: 2653 + case DSS_HDMI_M_PCLK: 2648 2654 return hdmi_get_pixel_clock(); 2649 2655 default: 2650 2656 BUG();
+4 -3
drivers/video/omap2/dss/dpi.c
··· 156 156 t->pixel_clock = pck; 157 157 } 158 158 159 - dispc_mgr_set_timings(dssdev->manager->id, t); 159 + dss_mgr_set_timings(dssdev->manager, t); 160 160 161 161 return 0; 162 162 } ··· 294 294 } 295 295 296 296 dpi_set_mode(dssdev); 297 - dispc_mgr_go(dssdev->manager->id); 298 297 299 298 dispc_runtime_put(); 300 299 dss_runtime_put(); 300 + } else { 301 + dss_mgr_set_timings(dssdev->manager, timings); 301 302 } 302 303 } 303 304 EXPORT_SYMBOL(dpi_set_timings); ··· 313 312 unsigned long pck; 314 313 struct dispc_clock_info dispc_cinfo; 315 314 316 - if (!dispc_mgr_timings_ok(dssdev->manager->id, timings)) 315 + if (dss_mgr_check_timings(dssdev->manager, timings)) 317 316 return -EINVAL; 318 317 319 318 if (timings->pixel_clock == 0)
+2 -3
drivers/video/omap2/dss/dsi.c
··· 4215 4215 dispc_mgr_enable_stallmode(dssdev->manager->id, true); 4216 4216 dispc_mgr_enable_fifohandcheck(dssdev->manager->id, 1); 4217 4217 4218 - dispc_mgr_set_timings(dssdev->manager->id, &timings); 4218 + dss_mgr_set_timings(dssdev->manager, &timings); 4219 4219 } else { 4220 4220 dispc_mgr_enable_stallmode(dssdev->manager->id, false); 4221 4221 dispc_mgr_enable_fifohandcheck(dssdev->manager->id, 0); 4222 4222 4223 - dispc_mgr_set_timings(dssdev->manager->id, 4224 - &dssdev->panel.timings); 4223 + dss_mgr_set_timings(dssdev->manager, &dssdev->panel.timings); 4225 4224 } 4226 4225 4227 4226 dispc_mgr_set_lcd_display_type(dssdev->manager->id,
+11 -5
drivers/video/omap2/dss/dss.h
··· 177 177 int dss_mgr_set_device(struct omap_overlay_manager *mgr, 178 178 struct omap_dss_device *dssdev); 179 179 int dss_mgr_unset_device(struct omap_overlay_manager *mgr); 180 + void dss_mgr_set_timings(struct omap_overlay_manager *mgr, 181 + struct omap_video_timings *timings); 182 + const struct omap_video_timings *dss_mgr_get_timings(struct omap_overlay_manager *mgr); 180 183 181 184 bool dss_ovl_is_enabled(struct omap_overlay *ovl); 182 185 int dss_ovl_enable(struct omap_overlay *ovl); ··· 209 206 void dss_uninit_overlay_managers(struct platform_device *pdev); 210 207 int dss_mgr_simple_check(struct omap_overlay_manager *mgr, 211 208 const struct omap_overlay_manager_info *info); 209 + int dss_mgr_check_timings(struct omap_overlay_manager *mgr, 210 + const struct omap_video_timings *timings); 212 211 int dss_mgr_check(struct omap_overlay_manager *mgr, 213 - struct omap_dss_device *dssdev, 214 212 struct omap_overlay_manager_info *info, 213 + const struct omap_video_timings *mgr_timings, 215 214 struct omap_overlay_info **overlay_infos); 216 215 217 216 /* overlay */ ··· 223 218 void dss_recheck_connections(struct omap_dss_device *dssdev, bool force); 224 219 int dss_ovl_simple_check(struct omap_overlay *ovl, 225 220 const struct omap_overlay_info *info); 226 - int dss_ovl_check(struct omap_overlay *ovl, 227 - struct omap_overlay_info *info, struct omap_dss_device *dssdev); 221 + int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info, 222 + const struct omap_video_timings *mgr_timings); 228 223 229 224 /* DSS */ 230 225 int dss_init_platform_driver(void); ··· 416 411 void dispc_set_loadmode(enum omap_dss_load_mode mode); 417 412 418 413 bool dispc_mgr_timings_ok(enum omap_channel channel, 419 - struct omap_video_timings *timings); 414 + const struct omap_video_timings *timings); 420 415 unsigned long dispc_fclk_rate(void); 421 416 void dispc_find_clk_divs(bool is_tft, unsigned long req_pck, unsigned long fck, 422 417 struct dispc_clock_info *cinfo); ··· 428 423 void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, 429 424 u32 *fifo_low, u32 *fifo_high, bool use_fifomerge); 430 425 int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, 431 - bool ilace, bool replication); 426 + bool ilace, bool replication, 427 + const struct omap_video_timings *mgr_timings); 432 428 int dispc_ovl_enable(enum omap_plane plane, bool enable); 433 429 void dispc_ovl_set_channel_out(enum omap_plane plane, 434 430 enum omap_channel channel);
+3 -1
drivers/video/omap2/dss/hdmi.c
··· 376 376 dispc_enable_gamma_table(0); 377 377 378 378 /* tv size */ 379 - dispc_mgr_set_timings(dssdev->manager->id, &dssdev->panel.timings); 379 + dss_mgr_set_timings(dssdev->manager, &dssdev->panel.timings); 380 380 381 381 hdmi.ip_data.ops->video_enable(&hdmi.ip_data, 1); 382 382 ··· 435 435 r = hdmi_power_on(dssdev); 436 436 if (r) 437 437 DSSERR("failed to power on device\n"); 438 + } else { 439 + dss_mgr_set_timings(dssdev->manager, &dssdev->panel.timings); 438 440 } 439 441 } 440 442
+17 -2
drivers/video/omap2/dss/manager.c
··· 654 654 return 0; 655 655 } 656 656 657 + int dss_mgr_check_timings(struct omap_overlay_manager *mgr, 658 + const struct omap_video_timings *timings) 659 + { 660 + if (!dispc_mgr_timings_ok(mgr->id, timings)) { 661 + DSSERR("check_manager: invalid timings\n"); 662 + return -EINVAL; 663 + } 664 + 665 + return 0; 666 + } 667 + 657 668 int dss_mgr_check(struct omap_overlay_manager *mgr, 658 - struct omap_dss_device *dssdev, 659 669 struct omap_overlay_manager_info *info, 670 + const struct omap_video_timings *mgr_timings, 660 671 struct omap_overlay_info **overlay_infos) 661 672 { 662 673 struct omap_overlay *ovl; ··· 679 668 return r; 680 669 } 681 670 671 + r = dss_mgr_check_timings(mgr, mgr_timings); 672 + if (r) 673 + return r; 674 + 682 675 list_for_each_entry(ovl, &mgr->overlays, list) { 683 676 struct omap_overlay_info *oi; 684 677 int r; ··· 692 677 if (oi == NULL) 693 678 continue; 694 679 695 - r = dss_ovl_check(ovl, oi, dssdev); 680 + r = dss_ovl_check(ovl, oi, mgr_timings); 696 681 if (r) 697 682 return r; 698 683 }
+4 -6
drivers/video/omap2/dss/overlay.c
··· 631 631 return 0; 632 632 } 633 633 634 - int dss_ovl_check(struct omap_overlay *ovl, 635 - struct omap_overlay_info *info, struct omap_dss_device *dssdev) 634 + int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info, 635 + const struct omap_video_timings *mgr_timings) 636 636 { 637 637 u16 outw, outh; 638 638 u16 dw, dh; 639 639 640 - if (dssdev == NULL) 641 - return 0; 642 - 643 - dssdev->driver->get_resolution(dssdev, &dw, &dh); 640 + dw = mgr_timings->x_res; 641 + dh = mgr_timings->y_res; 644 642 645 643 if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) { 646 644 outw = info->width;
+2 -2
drivers/video/omap2/dss/rfbi.c
··· 320 320 321 321 DSSDBG("rfbi_transfer_area %dx%d\n", width, height); 322 322 323 - dispc_mgr_set_timings(dssdev->manager->id, &timings); 323 + dss_mgr_set_timings(dssdev->manager, &timings); 324 324 325 325 dispc_mgr_enable(dssdev->manager->id, true); 326 326 ··· 804 804 if (*w == 0 || *h == 0) 805 805 return -EINVAL; 806 806 807 - dispc_mgr_set_timings(dssdev->manager->id, &timings); 807 + dss_mgr_set_timings(dssdev->manager, &timings); 808 808 809 809 return 0; 810 810 }
+1 -1
drivers/video/omap2/dss/sdi.c
··· 107 107 } 108 108 109 109 110 - dispc_mgr_set_timings(dssdev->manager->id, t); 110 + dss_mgr_set_timings(dssdev->manager, t); 111 111 112 112 r = dss_set_clock_div(&dss_cinfo); 113 113 if (r)
+1 -1
drivers/video/omap2/dss/venc.c
··· 444 444 timings = dssdev->panel.timings; 445 445 timings.y_res /= 2; 446 446 447 - dispc_mgr_set_timings(dssdev->manager->id, &timings); 447 + dss_mgr_set_timings(dssdev->manager, &timings); 448 448 449 449 r = regulator_enable(venc.vdda_dac_reg); 450 450 if (r)