static int hdmi_display_check_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) return -EINVAL; return 0; }
static int sdi_check_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { struct omap_overlay_manager *mgr = sdi.output.manager; if (mgr && !dispc_mgr_timings_ok(mgr->id, timings)) return -EINVAL; if (timings->pixel_clock == 0) return -EINVAL; return 0; }
static int hdmi_display_check_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { struct omap_dss_device *out = &hdmi.output; /* TODO: proper interlace support */ if (timings->interlace) return -EINVAL; if (!dispc_mgr_timings_ok(out->dispc_channel, timings)) return -EINVAL; return 0; }
static int sdi_check_timings(struct omap_dss_device *dssdev, struct videomode *vm) { struct sdi_device *sdi = dssdev_to_sdi(dssdev); enum omap_channel channel = dssdev->dispc_channel; if (!dispc_mgr_timings_ok(sdi->dss->dispc, channel, vm)) return -EINVAL; if (vm->pixelclock == 0) return -EINVAL; return 0; }
static int dpi_check_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { struct omap_overlay_manager *mgr = dpi.output.manager; int lck_div, pck_div; unsigned long fck; unsigned long pck; struct dpi_clk_calc_ctx ctx; bool ok; if (mgr && !dispc_mgr_timings_ok(mgr->id, timings)) return -EINVAL; if (timings->pixel_clock == 0) return -EINVAL; if (dpi.dsidev) { ok = dpi_dsi_clk_calc(timings->pixel_clock * 1000, &ctx); if (!ok) return -EINVAL; fck = ctx.dsi_cinfo.dsi_pll_hsdiv_dispc_clk; } else { ok = dpi_dss_clk_calc(timings->pixel_clock * 1000, &ctx); if (!ok) return -EINVAL; fck = ctx.fck; } lck_div = ctx.dispc_cinfo.lck_div; pck_div = ctx.dispc_cinfo.pck_div; pck = fck / lck_div / pck_div / 1000; timings->pixel_clock = pck; return 0; }