Lines Matching refs:crtc

30 bool gma_pipe_has_type(struct drm_crtc *crtc, int type)  in gma_pipe_has_type()  argument
32 struct drm_device *dev = crtc->dev; in gma_pipe_has_type()
38 if (connector->encoder && connector->encoder->crtc == crtc) { in gma_pipe_has_type()
58 int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y, in gma_pipe_set_base() argument
61 struct drm_device *dev = crtc->dev; in gma_pipe_set_base()
63 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_pipe_set_base()
64 struct drm_framebuffer *fb = crtc->primary->fb; in gma_pipe_set_base()
144 void gma_crtc_load_lut(struct drm_crtc *crtc) in gma_crtc_load_lut() argument
146 struct drm_device *dev = crtc->dev; in gma_crtc_load_lut()
148 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_load_lut()
155 if (!crtc->enabled) in gma_crtc_load_lut()
158 r = crtc->gamma_store; in gma_crtc_load_lut()
159 g = r + crtc->gamma_size; in gma_crtc_load_lut()
160 b = g + crtc->gamma_size; in gma_crtc_load_lut()
182 static int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, in gma_crtc_gamma_set() argument
186 gma_crtc_load_lut(crtc); in gma_crtc_gamma_set()
197 void gma_crtc_dpms(struct drm_crtc *crtc, int mode) in gma_crtc_dpms() argument
199 struct drm_device *dev = crtc->dev; in gma_crtc_dpms()
201 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_dpms()
261 gma_crtc_load_lut(crtc); in gma_crtc_dpms()
267 drm_crtc_vblank_on(crtc); in gma_crtc_dpms()
283 drm_crtc_vblank_off(crtc); in gma_crtc_dpms()
323 dev_priv->ops->update_wm(dev, crtc); in gma_crtc_dpms()
329 static int gma_crtc_cursor_set(struct drm_crtc *crtc, in gma_crtc_cursor_set() argument
333 struct drm_device *dev = crtc->dev; in gma_crtc_cursor_set()
335 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_cursor_set()
444 static int gma_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) in gma_crtc_cursor_move() argument
446 struct drm_device *dev = crtc->dev; in gma_crtc_cursor_move()
447 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_cursor_move()
474 void gma_crtc_prepare(struct drm_crtc *crtc) in gma_crtc_prepare() argument
476 const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in gma_crtc_prepare()
477 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); in gma_crtc_prepare()
480 void gma_crtc_commit(struct drm_crtc *crtc) in gma_crtc_commit() argument
482 const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in gma_crtc_commit()
483 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); in gma_crtc_commit()
486 void gma_crtc_disable(struct drm_crtc *crtc) in gma_crtc_disable() argument
489 const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in gma_crtc_disable()
491 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); in gma_crtc_disable()
493 if (crtc->primary->fb) { in gma_crtc_disable()
494 pobj = to_psb_gem_object(crtc->primary->fb->obj[0]); in gma_crtc_disable()
499 void gma_crtc_destroy(struct drm_crtc *crtc) in gma_crtc_destroy() argument
501 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_destroy()
507 drm_crtc_cleanup(crtc); in gma_crtc_destroy()
511 int gma_crtc_page_flip(struct drm_crtc *crtc, in gma_crtc_page_flip() argument
517 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_page_flip()
518 struct drm_framebuffer *current_fb = crtc->primary->fb; in gma_crtc_page_flip()
519 struct drm_framebuffer *old_fb = crtc->primary->old_fb; in gma_crtc_page_flip()
520 const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in gma_crtc_page_flip()
521 struct drm_device *dev = crtc->dev; in gma_crtc_page_flip()
529 crtc->primary->fb = fb; in gma_crtc_page_flip()
534 WARN_ON(drm_crtc_vblank_get(crtc) != 0); in gma_crtc_page_flip()
540 ret = crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y, old_fb); in gma_crtc_page_flip()
545 drm_crtc_vblank_put(crtc); in gma_crtc_page_flip()
550 ret = crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y, old_fb); in gma_crtc_page_flip()
555 crtc->primary->fb = current_fb; in gma_crtc_page_flip()
575 void gma_crtc_save(struct drm_crtc *crtc) in gma_crtc_save() argument
577 struct drm_device *dev = crtc->dev; in gma_crtc_save()
579 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_save()
618 void gma_crtc_restore(struct drm_crtc *crtc) in gma_crtc_restore() argument
620 struct drm_device *dev = crtc->dev; in gma_crtc_restore()
622 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); in gma_crtc_restore()
719 bool gma_pll_is_valid(struct drm_crtc *crtc, in gma_pll_is_valid() argument
751 struct drm_crtc *crtc, int target, int refclk, in gma_find_best_pll() argument
754 struct drm_device *dev = crtc->dev; in gma_find_best_pll()
756 to_gma_crtc(crtc)->clock_funcs; in gma_find_best_pll()
760 if (gma_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && in gma_find_best_pll()
796 if (!clock_funcs->pll_is_valid(crtc, in gma_find_best_pll()