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

drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functions

This removes the need to access the global DISPC private data in those
functions (both for the current accesses and the future ones that will
be introduced when allocating the DISPC private data dynamically).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

authored by

Laurent Pinchart and committed by
Tomi Valkeinen
8a7eda76 50638ae5

+128 -105
+56 -46
drivers/gpu/drm/omapdrm/dss/dispc.c
··· 704 704 return mgr_desc[channel].sync_lost_irq; 705 705 } 706 706 707 - u32 dispc_wb_get_framedone_irq(void) 707 + u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc) 708 708 { 709 709 return DISPC_IRQ_FRAMEDONEWB; 710 710 } ··· 739 739 mgr_fld_write(channel, DISPC_MGR_FLD_GO, 1); 740 740 } 741 741 742 - bool dispc_wb_go_busy(void) 742 + bool dispc_wb_go_busy(struct dispc_device *dispc) 743 743 { 744 744 return REG_GET(DISPC_CONTROL2, 6, 6) == 1; 745 745 } 746 746 747 - void dispc_wb_go(void) 747 + void dispc_wb_go(struct dispc_device *dispc) 748 748 { 749 749 enum omap_plane_id plane = OMAP_DSS_WB; 750 750 bool enable, go; ··· 1196 1196 } 1197 1197 } 1198 1198 1199 - void dispc_wb_set_channel_in(enum dss_writeback_channel channel) 1199 + void dispc_wb_set_channel_in(struct dispc_device *dispc, 1200 + enum dss_writeback_channel channel) 1200 1201 { 1201 1202 enum omap_plane_id plane = OMAP_DSS_WB; 1202 1203 ··· 1372 1371 const bool use_fifomerge = false; 1373 1372 const bool manual_update = false; 1374 1373 1375 - dispc_ovl_compute_fifo_thresholds(i, &low, &high, 1374 + dispc_ovl_compute_fifo_thresholds(&dispc, i, &low, &high, 1376 1375 use_fifomerge, manual_update); 1377 1376 1378 - dispc_ovl_set_fifo_threshold(i, low, high); 1377 + dispc_ovl_set_fifo_threshold(&dispc, i, low, high); 1379 1378 } 1380 1379 1381 1380 if (dispc.feat->has_writeback) { ··· 1383 1382 const bool use_fifomerge = false; 1384 1383 const bool manual_update = false; 1385 1384 1386 - dispc_ovl_compute_fifo_thresholds(OMAP_DSS_WB, &low, &high, 1387 - use_fifomerge, manual_update); 1385 + dispc_ovl_compute_fifo_thresholds(&dispc, OMAP_DSS_WB, 1386 + &low, &high, 1387 + use_fifomerge, manual_update); 1388 1388 1389 - dispc_ovl_set_fifo_threshold(OMAP_DSS_WB, low, high); 1389 + dispc_ovl_set_fifo_threshold(&dispc, OMAP_DSS_WB, low, high); 1390 1390 } 1391 1391 } 1392 1392 ··· 1404 1402 return size; 1405 1403 } 1406 1404 1407 - void dispc_ovl_set_fifo_threshold(enum omap_plane_id plane, u32 low, 1408 - u32 high) 1405 + void dispc_ovl_set_fifo_threshold(struct dispc_device *dispc, 1406 + enum omap_plane_id plane, 1407 + u32 low, u32 high) 1409 1408 { 1410 1409 u8 hi_start, hi_end, lo_start, lo_end; 1411 1410 u32 unit; 1412 1411 1413 - unit = dispc.feat->buffer_size_unit; 1412 + unit = dispc->feat->buffer_size_unit; 1414 1413 1415 1414 WARN_ON(low % unit != 0); 1416 1415 WARN_ON(high % unit != 0); ··· 1439 1436 * large for the preload field, set the threshold to the maximum value 1440 1437 * that can be held by the preload register 1441 1438 */ 1442 - if (dispc_has_feature(FEAT_PRELOAD) && dispc.feat->set_max_preload && 1439 + if (dispc_has_feature(FEAT_PRELOAD) && dispc->feat->set_max_preload && 1443 1440 plane != OMAP_DSS_WB) 1444 1441 dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu)); 1445 1442 } 1446 1443 1447 - void dispc_enable_fifomerge(bool enable) 1444 + void dispc_enable_fifomerge(struct dispc_device *dispc, bool enable) 1448 1445 { 1449 1446 if (!dispc_has_feature(FEAT_FIFO_MERGE)) { 1450 1447 WARN_ON(enable); ··· 1455 1452 REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14); 1456 1453 } 1457 1454 1458 - void dispc_ovl_compute_fifo_thresholds(enum omap_plane_id plane, 1459 - u32 *fifo_low, u32 *fifo_high, bool use_fifomerge, 1460 - bool manual_update) 1455 + void dispc_ovl_compute_fifo_thresholds(struct dispc_device *dispc, 1456 + enum omap_plane_id plane, 1457 + u32 *fifo_low, u32 *fifo_high, 1458 + bool use_fifomerge, bool manual_update) 1461 1459 { 1462 1460 /* 1463 1461 * All sizes are in bytes. Both the buffer and burst are made of 1464 1462 * buffer_units, and the fifo thresholds must be buffer_unit aligned. 1465 1463 */ 1466 - unsigned int buf_unit = dispc.feat->buffer_size_unit; 1464 + unsigned int buf_unit = dispc->feat->buffer_size_unit; 1467 1465 unsigned int ovl_fifo_size, total_fifo_size, burst_size; 1468 1466 int i; 1469 1467 ··· 1473 1469 1474 1470 if (use_fifomerge) { 1475 1471 total_fifo_size = 0; 1476 - for (i = 0; i < dispc_get_num_ovls(&dispc); ++i) 1472 + for (i = 0; i < dispc_get_num_ovls(dispc); ++i) 1477 1473 total_fifo_size += dispc_ovl_get_fifo_size(i); 1478 1474 } else { 1479 1475 total_fifo_size = ovl_fifo_size; ··· 2669 2665 return r; 2670 2666 } 2671 2667 2672 - int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 2673 - bool mem_to_mem, const struct videomode *vm) 2668 + int dispc_wb_setup(struct dispc_device *dispc, 2669 + const struct omap_dss_writeback_info *wi, 2670 + bool mem_to_mem, const struct videomode *vm) 2674 2671 { 2675 2672 int r; 2676 2673 u32 l; ··· 2762 2757 REG_FLD_MOD(DISPC_CONTROL, act_high ? 1 : 0, 29, 29); 2763 2758 } 2764 2759 2765 - void dispc_lcd_enable_signal(bool enable) 2760 + void dispc_lcd_enable_signal(struct dispc_device *dispc, bool enable) 2766 2761 { 2767 2762 if (!dispc_has_feature(FEAT_LCDENABLESIGNAL)) 2768 2763 return; ··· 2770 2765 REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 28, 28); 2771 2766 } 2772 2767 2773 - void dispc_pck_free_enable(bool enable) 2768 + void dispc_pck_free_enable(struct dispc_device *dispc, bool enable) 2774 2769 { 2775 2770 if (!dispc_has_feature(FEAT_PCKFREEENABLE)) 2776 2771 return; ··· 2909 2904 dispc_mgr_enable_stallmode(channel, config->stallmode); 2910 2905 dispc_mgr_enable_fifohandcheck(channel, config->fifohandcheck); 2911 2906 2912 - dispc_mgr_set_clock_div(channel, &config->clock_info); 2907 + dispc_mgr_set_clock_div(dispc, channel, &config->clock_info); 2913 2908 2914 2909 dispc_mgr_set_tft_data_lines(channel, config->video_port_width); 2915 2910 ··· 2946 2941 return pclk <= dispc.feat->max_tv_pclk; 2947 2942 } 2948 2943 2949 - bool dispc_mgr_timings_ok(enum omap_channel channel, const struct videomode *vm) 2944 + bool dispc_mgr_timings_ok(struct dispc_device *dispc, enum omap_channel channel, 2945 + const struct videomode *vm) 2950 2946 { 2951 2947 if (!_dispc_mgr_size_ok(vm->hactive, vm->vactive)) 2952 2948 return false; ··· 3068 3062 3069 3063 DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive); 3070 3064 3071 - if (!dispc_mgr_timings_ok(channel, &t)) { 3065 + if (!dispc_mgr_timings_ok(dispc, channel, &t)) { 3072 3066 BUG(); 3073 3067 return; 3074 3068 } ··· 3201 3195 } 3202 3196 } 3203 3197 3204 - void dispc_set_tv_pclk(unsigned long pclk) 3198 + void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk) 3205 3199 { 3206 - dispc.tv_pclk_rate = pclk; 3200 + dispc->tv_pclk_rate = pclk; 3207 3201 } 3208 3202 3209 3203 static unsigned long dispc_core_clk_rate(void) ··· 3255 3249 dispc_mgr_pclk_rate(channel), pcd); 3256 3250 } 3257 3251 3258 - void dispc_dump_clocks(struct seq_file *s) 3252 + void dispc_dump_clocks(struct dispc_device *dispc, struct seq_file *s) 3259 3253 { 3254 + enum dss_clk_source dispc_clk_src; 3260 3255 int lcd; 3261 3256 u32 l; 3262 - enum dss_clk_source dispc_clk_src = dss_get_dispc_clk_source(dispc.dss); 3263 3257 3264 - if (dispc_runtime_get(&dispc)) 3258 + if (dispc_runtime_get(dispc)) 3265 3259 return; 3266 3260 3267 3261 seq_printf(s, "- DISPC -\n"); 3268 3262 3263 + dispc_clk_src = dss_get_dispc_clk_source(dispc->dss); 3269 3264 seq_printf(s, "dispc fclk source = %s\n", 3270 3265 dss_get_clk_source_name(dispc_clk_src)); 3271 3266 ··· 3288 3281 if (dispc_has_feature(FEAT_MGR_LCD3)) 3289 3282 dispc_dump_clocks_channel(s, OMAP_DSS_CHANNEL_LCD3); 3290 3283 3291 - dispc_runtime_put(&dispc); 3284 + dispc_runtime_put(dispc); 3292 3285 } 3293 3286 3294 3287 static int dispc_dump_regs(struct seq_file *s, void *p) ··· 3489 3482 } 3490 3483 3491 3484 /* calculate clock rates using dividers in cinfo */ 3492 - int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, 3493 - struct dispc_clock_info *cinfo) 3485 + int dispc_calc_clock_rates(struct dispc_device *dispc, 3486 + unsigned long dispc_fclk_rate, 3487 + struct dispc_clock_info *cinfo) 3494 3488 { 3495 3489 if (cinfo->lck_div > 255 || cinfo->lck_div == 0) 3496 3490 return -EINVAL; ··· 3504 3496 return 0; 3505 3497 } 3506 3498 3507 - bool dispc_div_calc(unsigned long dispc_freq, 3508 - unsigned long pck_min, unsigned long pck_max, 3509 - dispc_div_calc_func func, void *data) 3499 + bool dispc_div_calc(struct dispc_device *dispc, unsigned long dispc_freq, 3500 + unsigned long pck_min, unsigned long pck_max, 3501 + dispc_div_calc_func func, void *data) 3510 3502 { 3511 3503 int lckd, lckd_start, lckd_stop; 3512 3504 int pckd, pckd_start, pckd_stop; ··· 3522 3514 min_fck_per_pck = 0; 3523 3515 #endif 3524 3516 3525 - pckd_hw_min = dispc.feat->min_pcd; 3517 + pckd_hw_min = dispc->feat->min_pcd; 3526 3518 pckd_hw_max = 255; 3527 3519 3528 - lck_max = dss_get_max_fck_rate(dispc.dss); 3520 + lck_max = dss_get_max_fck_rate(dispc->dss); 3529 3521 3530 3522 pck_min = pck_min ? pck_min : 1; 3531 3523 pck_max = pck_max ? pck_max : ULONG_MAX; ··· 3564 3556 return false; 3565 3557 } 3566 3558 3567 - void dispc_mgr_set_clock_div(enum omap_channel channel, 3568 - const struct dispc_clock_info *cinfo) 3559 + void dispc_mgr_set_clock_div(struct dispc_device *dispc, 3560 + enum omap_channel channel, 3561 + const struct dispc_clock_info *cinfo) 3569 3562 { 3570 3563 DSSDBG("lck = %lu (%u)\n", cinfo->lck, cinfo->lck_div); 3571 3564 DSSDBG("pck = %lu (%u)\n", cinfo->pck, cinfo->pck_div); ··· 3574 3565 dispc_mgr_set_lcd_divisor(channel, cinfo->lck_div, cinfo->pck_div); 3575 3566 } 3576 3567 3577 - int dispc_mgr_get_clock_div(enum omap_channel channel, 3578 - struct dispc_clock_info *cinfo) 3568 + int dispc_mgr_get_clock_div(struct dispc_device *dispc, 3569 + enum omap_channel channel, 3570 + struct dispc_clock_info *cinfo) 3579 3571 { 3580 3572 unsigned long fck; 3581 3573 ··· 3614 3604 dispc_read_reg(DISPC_IRQENABLE); 3615 3605 } 3616 3606 3617 - void dispc_enable_sidle(void) 3607 + void dispc_enable_sidle(struct dispc_device *dispc) 3618 3608 { 3619 3609 REG_FLD_MOD(DISPC_SYSCONFIG, 2, 4, 3); /* SIDLEMODE: smart idle */ 3620 3610 } 3621 3611 3622 - void dispc_disable_sidle(void) 3612 + void dispc_disable_sidle(struct dispc_device *dispc) 3623 3613 { 3624 3614 REG_FLD_MOD(DISPC_SYSCONFIG, 1, 4, 3); /* SIDLEMODE: no idle */ 3625 3615 } ··· 4492 4482 4493 4483 /* Set up and enable display manager for LCD1 */ 4494 4484 dispc_mgr_setup(&dispc, OMAP_DSS_CHANNEL_LCD, &i734.mgri); 4495 - dispc_calc_clock_rates(dss_get_dispc_clk_rate(dispc.dss), 4485 + dispc_calc_clock_rates(&dispc, dss_get_dispc_clk_rate(dispc.dss), 4496 4486 &lcd_conf.clock_info); 4497 4487 dispc_mgr_set_lcd_config(&dispc, OMAP_DSS_CHANNEL_LCD, &lcd_conf); 4498 4488 dispc_mgr_set_timings(&dispc, OMAP_DSS_CHANNEL_LCD, &i734.vm);
+7 -5
drivers/gpu/drm/omapdrm/dss/dpi.c
··· 191 191 ctx->pll_cinfo.mX[ctx->clkout_idx] = m_dispc; 192 192 ctx->pll_cinfo.clkout[ctx->clkout_idx] = dispc; 193 193 194 - return dispc_div_calc(dispc, ctx->pck_min, ctx->pck_max, 195 - dpi_calc_dispc_cb, ctx); 194 + return dispc_div_calc(ctx->pll->dss->dispc, dispc, 195 + ctx->pck_min, ctx->pck_max, 196 + dpi_calc_dispc_cb, ctx); 196 197 } 197 198 198 199 ··· 219 218 220 219 ctx->fck = fck; 221 220 222 - return dispc_div_calc(fck, ctx->pck_min, ctx->pck_max, 223 - dpi_calc_dispc_cb, ctx); 221 + return dispc_div_calc(ctx->pll->dss->dispc, fck, 222 + ctx->pck_min, ctx->pck_max, 223 + dpi_calc_dispc_cb, ctx); 224 224 } 225 225 226 226 static bool dpi_pll_clk_calc(struct dpi_data *dpi, unsigned long pck, ··· 516 514 if (vm->hactive % 8 != 0) 517 515 return -EINVAL; 518 516 519 - if (!dispc_mgr_timings_ok(channel, vm)) 517 + if (!dispc_mgr_timings_ok(dpi->dss->dispc, channel, vm)) 520 518 return -EINVAL; 521 519 522 520 if (vm->pixelclock == 0)
+12 -10
drivers/gpu/drm/omapdrm/dss/dsi.c
··· 1394 1394 } 1395 1395 1396 1396 /* XXX PLL does not come out of reset without this... */ 1397 - dispc_pck_free_enable(1); 1397 + dispc_pck_free_enable(dsi->dss->dispc, 1); 1398 1398 1399 1399 if (!wait_for_bit_change(dsi, DSI_PLL_STATUS, 0, 1)) { 1400 1400 DSSERR("PLL not coming out of reset.\n"); 1401 1401 r = -ENODEV; 1402 - dispc_pck_free_enable(0); 1402 + dispc_pck_free_enable(dsi->dss->dispc, 0); 1403 1403 goto err1; 1404 1404 } 1405 1405 1406 1406 /* XXX ... but if left on, we get problems when planes do not 1407 1407 * fill the whole display. No idea about this */ 1408 - dispc_pck_free_enable(0); 1408 + dispc_pck_free_enable(dsi->dss->dispc, 0); 1409 1409 1410 1410 r = dsi_pll_power(dsi, DSI_PLL_POWER_ON_ALL); 1411 1411 ··· 3972 3972 * the same goes for any DSS interrupts, but for some reason I have not 3973 3973 * seen the problem anywhere else than here. 3974 3974 */ 3975 - dispc_disable_sidle(); 3975 + dispc_disable_sidle(dsi->dss->dispc); 3976 3976 3977 3977 dsi_perf_mark_start(dsi); 3978 3978 ··· 4007 4007 static void dsi_handle_framedone(struct dsi_data *dsi, int error) 4008 4008 { 4009 4009 /* SIDLEMODE back to smart-idle */ 4010 - dispc_enable_sidle(); 4010 + dispc_enable_sidle(dsi->dss->dispc); 4011 4011 4012 4012 if (dsi->te_enabled) { 4013 4013 /* enable LP_RX_TO again after the TE */ ··· 4088 4088 dispc_cinfo.lck_div = dsi->user_dispc_cinfo.lck_div; 4089 4089 dispc_cinfo.pck_div = dsi->user_dispc_cinfo.pck_div; 4090 4090 4091 - r = dispc_calc_clock_rates(fck, &dispc_cinfo); 4091 + r = dispc_calc_clock_rates(dsi->dss->dispc, fck, &dispc_cinfo); 4092 4092 if (r) { 4093 4093 DSSERR("Failed to calc dispc clocks\n"); 4094 4094 return r; ··· 4439 4439 ctx->dsi_cinfo.mX[HSDIV_DISPC] = m_dispc; 4440 4440 ctx->dsi_cinfo.clkout[HSDIV_DISPC] = dispc; 4441 4441 4442 - return dispc_div_calc(dispc, ctx->req_pck_min, ctx->req_pck_max, 4443 - dsi_cm_calc_dispc_cb, ctx); 4442 + return dispc_div_calc(ctx->dsi->dss->dispc, dispc, 4443 + ctx->req_pck_min, ctx->req_pck_max, 4444 + dsi_cm_calc_dispc_cb, ctx); 4444 4445 } 4445 4446 4446 4447 static bool dsi_cm_calc_pll_cb(int n, int m, unsigned long fint, ··· 4740 4739 else 4741 4740 pck_max = ctx->req_pck_max; 4742 4741 4743 - return dispc_div_calc(dispc, ctx->req_pck_min, pck_max, 4744 - dsi_vm_calc_dispc_cb, ctx); 4742 + return dispc_div_calc(ctx->dsi->dss->dispc, dispc, 4743 + ctx->req_pck_min, pck_max, 4744 + dsi_vm_calc_dispc_cb, ctx); 4745 4745 } 4746 4746 4747 4747 static bool dsi_vm_calc_pll_cb(int n, int m, unsigned long fint,
+7 -7
drivers/gpu/drm/omapdrm/dss/dss.c
··· 274 274 { 275 275 unsigned long timeout; 276 276 277 - dispc_pck_free_enable(1); 277 + dispc_pck_free_enable(dss->dispc, 1); 278 278 279 279 /* Reset SDI PLL */ 280 280 REG_FLD_MOD(dss, DSS_PLL_CONTROL, 1, 18, 18); /* SDI_PLL_SYSRESET */ ··· 304 304 } 305 305 } 306 306 307 - dispc_lcd_enable_signal(1); 307 + dispc_lcd_enable_signal(dss->dispc, 1); 308 308 309 309 /* Waiting for SDI reset to complete */ 310 310 timeout = jiffies + msecs_to_jiffies(500); ··· 318 318 return 0; 319 319 320 320 err2: 321 - dispc_lcd_enable_signal(0); 321 + dispc_lcd_enable_signal(dss->dispc, 0); 322 322 err1: 323 323 /* Reset SDI PLL */ 324 324 REG_FLD_MOD(dss, DSS_PLL_CONTROL, 0, 18, 18); /* SDI_PLL_SYSRESET */ 325 325 326 - dispc_pck_free_enable(0); 326 + dispc_pck_free_enable(dss->dispc, 0); 327 327 328 328 return -ETIMEDOUT; 329 329 } 330 330 331 331 void dss_sdi_disable(struct dss_device *dss) 332 332 { 333 - dispc_lcd_enable_signal(0); 333 + dispc_lcd_enable_signal(dss->dispc, 0); 334 334 335 - dispc_pck_free_enable(0); 335 + dispc_pck_free_enable(dss->dispc, 0); 336 336 337 337 /* Reset SDI PLL */ 338 338 REG_FLD_MOD(dss, DSS_PLL_CONTROL, 0, 18, 18); /* SDI_PLL_SYSRESET */ ··· 894 894 struct dss_device *dss = s->private; 895 895 896 896 dss_dump_clocks(dss, s); 897 - dispc_dump_clocks(s); 897 + dispc_dump_clocks(dss->dispc, s); 898 898 #ifdef CONFIG_OMAP2_DSS_DSI 899 899 dsi_dump_clocks(s); 900 900 #endif
+36 -28
drivers/gpu/drm/omapdrm/dss/dss.h
··· 407 407 #endif 408 408 409 409 /* DISPC */ 410 - void dispc_dump_clocks(struct seq_file *s); 410 + void dispc_dump_clocks(struct dispc_device *dispc, struct seq_file *s); 411 411 412 412 int dispc_runtime_get(struct dispc_device *dispc); 413 413 void dispc_runtime_put(struct dispc_device *dispc); 414 414 415 - void dispc_enable_sidle(void); 416 - void dispc_disable_sidle(void); 415 + void dispc_enable_sidle(struct dispc_device *dispc); 416 + void dispc_disable_sidle(struct dispc_device *dispc); 417 417 418 - void dispc_lcd_enable_signal(bool enable); 419 - void dispc_pck_free_enable(bool enable); 420 - void dispc_enable_fifomerge(bool enable); 418 + void dispc_lcd_enable_signal(struct dispc_device *dispc, bool enable); 419 + void dispc_pck_free_enable(struct dispc_device *dispc, bool enable); 420 + void dispc_enable_fifomerge(struct dispc_device *dispc, bool enable); 421 421 422 422 typedef bool (*dispc_div_calc_func)(int lckd, int pckd, unsigned long lck, 423 423 unsigned long pck, void *data); 424 - bool dispc_div_calc(unsigned long dispc, 425 - unsigned long pck_min, unsigned long pck_max, 426 - dispc_div_calc_func func, void *data); 424 + bool dispc_div_calc(struct dispc_device *dispc, unsigned long dispc_freq, 425 + unsigned long pck_min, unsigned long pck_max, 426 + dispc_div_calc_func func, void *data); 427 427 428 - bool dispc_mgr_timings_ok(enum omap_channel channel, const struct videomode *vm); 429 - int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, 430 - struct dispc_clock_info *cinfo); 428 + bool dispc_mgr_timings_ok(struct dispc_device *dispc, 429 + enum omap_channel channel, 430 + const struct videomode *vm); 431 + int dispc_calc_clock_rates(struct dispc_device *dispc, 432 + unsigned long dispc_fclk_rate, 433 + struct dispc_clock_info *cinfo); 431 434 432 435 433 - void dispc_ovl_set_fifo_threshold(enum omap_plane_id plane, u32 low, 434 - u32 high); 435 - void dispc_ovl_compute_fifo_thresholds(enum omap_plane_id plane, 436 - u32 *fifo_low, u32 *fifo_high, bool use_fifomerge, 437 - bool manual_update); 436 + void dispc_ovl_set_fifo_threshold(struct dispc_device *dispc, 437 + enum omap_plane_id plane, u32 low, u32 high); 438 + void dispc_ovl_compute_fifo_thresholds(struct dispc_device *dispc, 439 + enum omap_plane_id plane, 440 + u32 *fifo_low, u32 *fifo_high, 441 + bool use_fifomerge, bool manual_update); 438 442 439 - void dispc_mgr_set_clock_div(enum omap_channel channel, 440 - const struct dispc_clock_info *cinfo); 441 - int dispc_mgr_get_clock_div(enum omap_channel channel, 442 - struct dispc_clock_info *cinfo); 443 - void dispc_set_tv_pclk(unsigned long pclk); 443 + void dispc_mgr_set_clock_div(struct dispc_device *dispc, 444 + enum omap_channel channel, 445 + const struct dispc_clock_info *cinfo); 446 + int dispc_mgr_get_clock_div(struct dispc_device *dispc, 447 + enum omap_channel channel, 448 + struct dispc_clock_info *cinfo); 449 + void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk); 444 450 445 - u32 dispc_wb_get_framedone_irq(void); 446 - bool dispc_wb_go_busy(void); 447 - void dispc_wb_go(void); 448 - void dispc_wb_set_channel_in(enum dss_writeback_channel channel); 449 - int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 450 - bool mem_to_mem, const struct videomode *vm); 451 + u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc); 452 + bool dispc_wb_go_busy(struct dispc_device *dispc); 453 + void dispc_wb_go(struct dispc_device *dispc); 454 + void dispc_wb_set_channel_in(struct dispc_device *dispc, 455 + enum dss_writeback_channel channel); 456 + int dispc_wb_setup(struct dispc_device *dispc, 457 + const struct omap_dss_writeback_info *wi, 458 + bool mem_to_mem, const struct videomode *vm); 451 459 452 460 #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS 453 461 static inline void dss_collect_irq_stats(u32 irqstatus, unsigned int *irq_arr)
+2 -2
drivers/gpu/drm/omapdrm/dss/hdmi4.c
··· 276 276 static int hdmi_display_check_timing(struct omap_dss_device *dssdev, 277 277 struct videomode *vm) 278 278 { 279 - if (!dispc_mgr_timings_ok(dssdev->dispc_channel, vm)) 279 + if (!dispc_mgr_timings_ok(hdmi.dss->dispc, dssdev->dispc_channel, vm)) 280 280 return -EINVAL; 281 281 282 282 return 0; ··· 289 289 290 290 hdmi.cfg.vm = *vm; 291 291 292 - dispc_set_tv_pclk(vm->pixelclock); 292 + dispc_set_tv_pclk(hdmi.dss->dispc, vm->pixelclock); 293 293 294 294 mutex_unlock(&hdmi.lock); 295 295 }
+2 -2
drivers/gpu/drm/omapdrm/dss/hdmi5.c
··· 272 272 static int hdmi_display_check_timing(struct omap_dss_device *dssdev, 273 273 struct videomode *vm) 274 274 { 275 - if (!dispc_mgr_timings_ok(dssdev->dispc_channel, vm)) 275 + if (!dispc_mgr_timings_ok(hdmi.dss->dispc, dssdev->dispc_channel, vm)) 276 276 return -EINVAL; 277 277 278 278 return 0; ··· 285 285 286 286 hdmi.cfg.vm = *vm; 287 287 288 - dispc_set_tv_pclk(vm->pixelclock); 288 + dispc_set_tv_pclk(hdmi.dss->dispc, vm->pixelclock); 289 289 290 290 mutex_unlock(&hdmi.lock); 291 291 }
+5 -4
drivers/gpu/drm/omapdrm/dss/sdi.c
··· 71 71 72 72 ctx->fck = fck; 73 73 74 - return dispc_div_calc(fck, ctx->pck_min, ctx->pck_max, 75 - dpi_calc_dispc_cb, ctx); 74 + return dispc_div_calc(sdi.dss->dispc, fck, 75 + ctx->pck_min, ctx->pck_max, 76 + dpi_calc_dispc_cb, ctx); 76 77 } 77 78 78 79 static int sdi_calc_clock_div(unsigned long pclk, ··· 184 183 * need to care about the shadow register mechanism for pck-free. The 185 184 * exact reason for this is unknown. 186 185 */ 187 - dispc_mgr_set_clock_div(sdi.output.dispc_channel, 186 + dispc_mgr_set_clock_div(sdi.dss->dispc, sdi.output.dispc_channel, 188 187 &sdi.mgr_config.clock_info); 189 188 190 189 dss_sdi_init(sdi.dss, sdi.datapairs); ··· 239 238 { 240 239 enum omap_channel channel = dssdev->dispc_channel; 241 240 242 - if (!dispc_mgr_timings_ok(channel, vm)) 241 + if (!dispc_mgr_timings_ok(sdi.dss->dispc, channel, vm)) 243 242 return -EINVAL; 244 243 245 244 if (vm->pixelclock == 0)
+1 -1
drivers/gpu/drm/omapdrm/dss/venc.c
··· 586 586 587 587 venc.vm = actual_vm; 588 588 589 - dispc_set_tv_pclk(13500000); 589 + dispc_set_tv_pclk(venc.dss->dispc, 13500000); 590 590 591 591 mutex_unlock(&venc.venc_lock); 592 592 }