Lines Matching refs:mode
99 (crtc->mode.vdisplay * fb->pitches[0]); in update_scanout()
170 static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode) in tilcdc_crtc_dpms() argument
177 if (mode != DRM_MODE_DPMS_ON) in tilcdc_crtc_dpms()
178 mode = DRM_MODE_DPMS_OFF; in tilcdc_crtc_dpms()
180 if (tilcdc_crtc->dpms == mode) in tilcdc_crtc_dpms()
183 tilcdc_crtc->dpms = mode; in tilcdc_crtc_dpms()
187 if (mode == DRM_MODE_DPMS_ON) { in tilcdc_crtc_dpms()
213 const struct drm_display_mode *mode, in tilcdc_crtc_mode_fixup() argument
230 struct drm_display_mode *mode, in tilcdc_crtc_mode_set() argument
242 ret = tilcdc_crtc_mode_valid(crtc, mode); in tilcdc_crtc_mode_set()
276 hbp = mode->htotal - mode->hsync_end; in tilcdc_crtc_mode_set()
277 hfp = mode->hsync_start - mode->hdisplay; in tilcdc_crtc_mode_set()
278 hsw = mode->hsync_end - mode->hsync_start; in tilcdc_crtc_mode_set()
279 vbp = mode->vtotal - mode->vsync_end; in tilcdc_crtc_mode_set()
280 vfp = mode->vsync_start - mode->vdisplay; in tilcdc_crtc_mode_set()
281 vsw = mode->vsync_end - mode->vsync_start; in tilcdc_crtc_mode_set()
284 mode->hdisplay, mode->vdisplay, hbp, hfp, hsw, vbp, vfp, vsw); in tilcdc_crtc_mode_set()
304 reg = (((mode->hdisplay >> 4) - 1) << 4) | in tilcdc_crtc_mode_set()
309 reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; in tilcdc_crtc_mode_set()
312 reg = ((mode->vdisplay - 1) & 0x3ff) | in tilcdc_crtc_mode_set()
324 if ((mode->vdisplay - 1) & 0x400) { in tilcdc_crtc_mode_set()
386 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in tilcdc_crtc_mode_set()
441 int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode) in tilcdc_crtc_mode_valid() argument
451 if (mode->hdisplay > tilcdc_crtc_max_width(crtc)) in tilcdc_crtc_mode_valid()
455 if (mode->hdisplay & 0xf) in tilcdc_crtc_mode_valid()
458 if (mode->vdisplay > 2048) in tilcdc_crtc_mode_valid()
462 mode->hdisplay, mode->vdisplay, in tilcdc_crtc_mode_valid()
463 drm_mode_vrefresh(mode), mode->clock); in tilcdc_crtc_mode_valid()
465 hbp = mode->htotal - mode->hsync_end; in tilcdc_crtc_mode_valid()
466 hfp = mode->hsync_start - mode->hdisplay; in tilcdc_crtc_mode_valid()
467 hsw = mode->hsync_end - mode->hsync_start; in tilcdc_crtc_mode_valid()
468 vbp = mode->vtotal - mode->vsync_end; in tilcdc_crtc_mode_valid()
469 vfp = mode->vsync_start - mode->vdisplay; in tilcdc_crtc_mode_valid()
470 vsw = mode->vsync_end - mode->vsync_start; in tilcdc_crtc_mode_valid()
506 if (mode->clock > priv->max_pixelclock) { in tilcdc_crtc_mode_valid()
515 if (mode->hdisplay > priv->max_width) in tilcdc_crtc_mode_valid()
519 bandwidth = mode->hdisplay * mode->vdisplay * in tilcdc_crtc_mode_valid()
520 drm_mode_vrefresh(mode); in tilcdc_crtc_mode_valid()
551 ret = clk_set_rate(priv->disp_clk, crtc->mode.clock * 1000 * 2); in tilcdc_crtc_update_clk()
554 crtc->mode.clock); in tilcdc_crtc_update_clk()
559 div = lcd_clk / (crtc->mode.clock * 1000); in tilcdc_crtc_update_clk()
561 DBG("lcd_clk=%u, mode clock=%d, div=%u", lcd_clk, crtc->mode.clock, div); in tilcdc_crtc_update_clk()