Lines Matching refs:mode

102 			(crtc->mode.vdisplay * fb->pitches[0]);  in update_scanout()
141 static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode);
174 static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode) in tilcdc_crtc_dpms() argument
181 if (mode != DRM_MODE_DPMS_ON) in tilcdc_crtc_dpms()
182 mode = DRM_MODE_DPMS_OFF; in tilcdc_crtc_dpms()
184 if (tilcdc_crtc->dpms == mode) in tilcdc_crtc_dpms()
187 tilcdc_crtc->dpms = mode; in tilcdc_crtc_dpms()
191 if (mode == DRM_MODE_DPMS_ON) { in tilcdc_crtc_dpms()
217 const struct drm_display_mode *mode, in tilcdc_crtc_mode_fixup() argument
231 adjusted_mode->hskew = mode->hsync_end - mode->hsync_start; in tilcdc_crtc_mode_fixup()
234 if (mode->flags & DRM_MODE_FLAG_NHSYNC) { in tilcdc_crtc_mode_fixup()
256 struct drm_display_mode *mode, in tilcdc_crtc_mode_set() argument
268 ret = tilcdc_crtc_mode_valid(crtc, mode); in tilcdc_crtc_mode_set()
302 hbp = mode->htotal - mode->hsync_end; in tilcdc_crtc_mode_set()
303 hfp = mode->hsync_start - mode->hdisplay; in tilcdc_crtc_mode_set()
304 hsw = mode->hsync_end - mode->hsync_start; in tilcdc_crtc_mode_set()
305 vbp = mode->vtotal - mode->vsync_end; in tilcdc_crtc_mode_set()
306 vfp = mode->vsync_start - mode->vdisplay; in tilcdc_crtc_mode_set()
307 vsw = mode->vsync_end - mode->vsync_start; in tilcdc_crtc_mode_set()
310 mode->hdisplay, mode->vdisplay, hbp, hfp, hsw, vbp, vfp, vsw); in tilcdc_crtc_mode_set()
330 reg = (((mode->hdisplay >> 4) - 1) << 4) | in tilcdc_crtc_mode_set()
335 reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; in tilcdc_crtc_mode_set()
338 reg = ((mode->vdisplay - 1) & 0x3ff) | in tilcdc_crtc_mode_set()
350 if ((mode->vdisplay - 1) & 0x400) { in tilcdc_crtc_mode_set()
412 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in tilcdc_crtc_mode_set()
467 int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode) in tilcdc_crtc_mode_valid() argument
477 if (mode->hdisplay > tilcdc_crtc_max_width(crtc)) in tilcdc_crtc_mode_valid()
481 if (mode->hdisplay & 0xf) in tilcdc_crtc_mode_valid()
484 if (mode->vdisplay > 2048) in tilcdc_crtc_mode_valid()
488 mode->hdisplay, mode->vdisplay, in tilcdc_crtc_mode_valid()
489 drm_mode_vrefresh(mode), mode->clock); in tilcdc_crtc_mode_valid()
491 hbp = mode->htotal - mode->hsync_end; in tilcdc_crtc_mode_valid()
492 hfp = mode->hsync_start - mode->hdisplay; in tilcdc_crtc_mode_valid()
493 hsw = mode->hsync_end - mode->hsync_start; in tilcdc_crtc_mode_valid()
494 vbp = mode->vtotal - mode->vsync_end; in tilcdc_crtc_mode_valid()
495 vfp = mode->vsync_start - mode->vdisplay; in tilcdc_crtc_mode_valid()
496 vsw = mode->vsync_end - mode->vsync_start; in tilcdc_crtc_mode_valid()
532 if (mode->clock > priv->max_pixelclock) { in tilcdc_crtc_mode_valid()
541 if (mode->hdisplay > priv->max_width) in tilcdc_crtc_mode_valid()
545 bandwidth = mode->hdisplay * mode->vdisplay * in tilcdc_crtc_mode_valid()
546 drm_mode_vrefresh(mode); in tilcdc_crtc_mode_valid()
585 ret = clk_set_rate(priv->disp_clk, crtc->mode.clock * 1000 * 2); in tilcdc_crtc_update_clk()
588 crtc->mode.clock); in tilcdc_crtc_update_clk()
593 div = lcd_clk / (crtc->mode.clock * 1000); in tilcdc_crtc_update_clk()
595 DBG("lcd_clk=%u, mode clock=%d, div=%u", lcd_clk, crtc->mode.clock, div); in tilcdc_crtc_update_clk()