Lines Matching refs:crtc

49 static void avivo_crtc_load_lut(struct drm_crtc *crtc)  in avivo_crtc_load_lut()  argument
51 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in avivo_crtc_load_lut()
52 struct drm_device *dev = crtc->dev; in avivo_crtc_load_lut()
73 r = crtc->gamma_store; in avivo_crtc_load_lut()
74 g = r + crtc->gamma_size; in avivo_crtc_load_lut()
75 b = g + crtc->gamma_size; in avivo_crtc_load_lut()
87 static void dce4_crtc_load_lut(struct drm_crtc *crtc) in dce4_crtc_load_lut() argument
89 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in dce4_crtc_load_lut()
90 struct drm_device *dev = crtc->dev; in dce4_crtc_load_lut()
110 r = crtc->gamma_store; in dce4_crtc_load_lut()
111 g = r + crtc->gamma_size; in dce4_crtc_load_lut()
112 b = g + crtc->gamma_size; in dce4_crtc_load_lut()
121 static void dce5_crtc_load_lut(struct drm_crtc *crtc) in dce5_crtc_load_lut() argument
123 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in dce5_crtc_load_lut()
124 struct drm_device *dev = crtc->dev; in dce5_crtc_load_lut()
158 r = crtc->gamma_store; in dce5_crtc_load_lut()
159 g = r + crtc->gamma_size; in dce5_crtc_load_lut()
160 b = g + crtc->gamma_size; in dce5_crtc_load_lut()
193 static void legacy_crtc_load_lut(struct drm_crtc *crtc) in legacy_crtc_load_lut() argument
195 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in legacy_crtc_load_lut()
196 struct drm_device *dev = crtc->dev; in legacy_crtc_load_lut()
210 r = crtc->gamma_store; in legacy_crtc_load_lut()
211 g = r + crtc->gamma_size; in legacy_crtc_load_lut()
212 b = g + crtc->gamma_size; in legacy_crtc_load_lut()
221 void radeon_crtc_load_lut(struct drm_crtc *crtc) in radeon_crtc_load_lut() argument
223 struct drm_device *dev = crtc->dev; in radeon_crtc_load_lut()
226 if (!crtc->enabled) in radeon_crtc_load_lut()
230 dce5_crtc_load_lut(crtc); in radeon_crtc_load_lut()
232 dce4_crtc_load_lut(crtc); in radeon_crtc_load_lut()
234 avivo_crtc_load_lut(crtc); in radeon_crtc_load_lut()
236 legacy_crtc_load_lut(crtc); in radeon_crtc_load_lut()
239 static int radeon_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, in radeon_crtc_gamma_set() argument
243 radeon_crtc_load_lut(crtc); in radeon_crtc_gamma_set()
248 static void radeon_crtc_destroy(struct drm_crtc *crtc) in radeon_crtc_destroy() argument
250 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_crtc_destroy()
252 drm_crtc_cleanup(crtc); in radeon_crtc_destroy()
414 struct drm_crtc *crtc = &radeon_crtc->base; in radeon_flip_work_func() local
456 &crtc->hwmode) in radeon_flip_work_func()
461 crtc->funcs->get_vblank_counter(crtc)) > 0))) in radeon_flip_work_func()
465 spin_lock_irqsave(&crtc->dev->event_lock, flags); in radeon_flip_work_func()
474 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in radeon_flip_work_func()
478 static int radeon_crtc_page_flip_target(struct drm_crtc *crtc, in radeon_crtc_page_flip_target() argument
485 struct drm_device *dev = crtc->dev; in radeon_crtc_page_flip_target()
487 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_crtc_page_flip_target()
509 obj = crtc->primary->fb->obj[0]; in radeon_crtc_page_flip_target()
556 int tile_addr = (((crtc->y >> 3) * pitch_pixels + crtc->x) >> (8 - byteshift)) << 11; in radeon_crtc_page_flip_target()
557 base += tile_addr + ((crtc->x << byteshift) % 256) + ((crtc->y % 8) << 8); in radeon_crtc_page_flip_target()
560 int offset = crtc->y * pitch_pixels + crtc->x; in radeon_crtc_page_flip_target()
582 work->target_vblank = target - (uint32_t)drm_crtc_vblank_count(crtc) + in radeon_crtc_page_flip_target()
583 crtc->funcs->get_vblank_counter(crtc); in radeon_crtc_page_flip_target()
586 spin_lock_irqsave(&crtc->dev->event_lock, flags); in radeon_crtc_page_flip_target()
590 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in radeon_crtc_page_flip_target()
598 crtc->primary->fb = fb; in radeon_crtc_page_flip_target()
600 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in radeon_crtc_page_flip_target()
626 struct drm_crtc *crtc; in radeon_crtc_set_config() local
630 if (!set || !set->crtc) in radeon_crtc_set_config()
633 dev = set->crtc->dev; in radeon_crtc_set_config()
643 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) in radeon_crtc_set_config()
644 if (crtc->enabled) in radeon_crtc_set_config()
1679 bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, in radeon_crtc_scaling_mode_fixup() argument
1683 struct drm_device *dev = crtc->dev; in radeon_crtc_scaling_mode_fixup()
1686 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_crtc_scaling_mode_fixup()
1697 if (encoder->crtc != crtc) in radeon_crtc_scaling_mode_fixup()
1715 src_v = crtc->mode.vdisplay; in radeon_crtc_scaling_mode_fixup()
1717 src_h = crtc->mode.hdisplay; in radeon_crtc_scaling_mode_fixup()
1736 src_v = crtc->mode.vdisplay; in radeon_crtc_scaling_mode_fixup()
1737 dst_v = crtc->mode.vdisplay - (radeon_crtc->v_border * 2); in radeon_crtc_scaling_mode_fixup()
1738 src_h = crtc->mode.hdisplay; in radeon_crtc_scaling_mode_fixup()
1739 dst_h = crtc->mode.hdisplay - (radeon_crtc->h_border * 2); in radeon_crtc_scaling_mode_fixup()
1982 radeon_get_crtc_scanout_position(struct drm_crtc *crtc, in radeon_get_crtc_scanout_position() argument
1987 struct drm_device *dev = crtc->dev; in radeon_get_crtc_scanout_position()
1988 unsigned int pipe = crtc->index; in radeon_get_crtc_scanout_position()