Lines Matching refs:crtc
127 struct drm_crtc *crtc = &amdgpu_crtc->base; in amdgpu_display_flip_work_func() local
142 &crtc->hwmode) in amdgpu_display_flip_work_func()
146 amdgpu_get_vblank_counter_kms(crtc)) > 0) { in amdgpu_display_flip_work_func()
152 spin_lock_irqsave(&crtc->dev->event_lock, flags); in amdgpu_display_flip_work_func()
159 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in amdgpu_display_flip_work_func()
190 int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc, in amdgpu_display_crtc_page_flip_target() argument
196 struct drm_device *dev = crtc->dev; in amdgpu_display_crtc_page_flip_target()
198 struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); in amdgpu_display_crtc_page_flip_target()
219 obj = crtc->primary->fb->obj[0]; in amdgpu_display_crtc_page_flip_target()
263 work->target_vblank = target - (uint32_t)drm_crtc_vblank_count(crtc) + in amdgpu_display_crtc_page_flip_target()
264 amdgpu_get_vblank_counter_kms(crtc); in amdgpu_display_crtc_page_flip_target()
267 spin_lock_irqsave(&crtc->dev->event_lock, flags); in amdgpu_display_crtc_page_flip_target()
270 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in amdgpu_display_crtc_page_flip_target()
282 crtc->primary->fb = fb; in amdgpu_display_crtc_page_flip_target()
283 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); in amdgpu_display_crtc_page_flip_target()
314 struct drm_crtc *crtc; in amdgpu_display_crtc_set_config() local
318 if (!set || !set->crtc) in amdgpu_display_crtc_set_config()
321 dev = set->crtc->dev; in amdgpu_display_crtc_set_config()
329 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) in amdgpu_display_crtc_set_config()
330 if (crtc->enabled) in amdgpu_display_crtc_set_config()
1402 bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc, in amdgpu_display_crtc_scaling_mode_fixup() argument
1406 struct drm_device *dev = crtc->dev; in amdgpu_display_crtc_scaling_mode_fixup()
1408 struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); in amdgpu_display_crtc_scaling_mode_fixup()
1418 if (encoder->crtc != crtc) in amdgpu_display_crtc_scaling_mode_fixup()
1435 src_v = crtc->mode.vdisplay; in amdgpu_display_crtc_scaling_mode_fixup()
1437 src_h = crtc->mode.hdisplay; in amdgpu_display_crtc_scaling_mode_fixup()
1455 src_v = crtc->mode.vdisplay; in amdgpu_display_crtc_scaling_mode_fixup()
1456 dst_v = crtc->mode.vdisplay - (amdgpu_crtc->v_border * 2); in amdgpu_display_crtc_scaling_mode_fixup()
1457 src_h = crtc->mode.hdisplay; in amdgpu_display_crtc_scaling_mode_fixup()
1458 dst_h = crtc->mode.hdisplay - (amdgpu_crtc->h_border * 2); in amdgpu_display_crtc_scaling_mode_fixup()
1613 int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc) in amdgpu_display_crtc_idx_to_irq_type() argument
1615 if (crtc < 0 || crtc >= adev->mode_info.num_crtc) in amdgpu_display_crtc_idx_to_irq_type()
1618 switch (crtc) { in amdgpu_display_crtc_idx_to_irq_type()
1636 bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, in amdgpu_crtc_get_scanout_position() argument
1641 struct drm_device *dev = crtc->dev; in amdgpu_crtc_get_scanout_position()
1642 unsigned int pipe = crtc->index; in amdgpu_crtc_get_scanout_position()
1666 struct drm_crtc *crtc; in amdgpu_display_suspend_helper() local
1682 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in amdgpu_display_suspend_helper()
1683 struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); in amdgpu_display_suspend_helper()
1684 struct drm_framebuffer *fb = crtc->primary->fb; in amdgpu_display_suspend_helper()
1717 struct drm_crtc *crtc; in amdgpu_display_resume_helper() local
1721 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in amdgpu_display_resume_helper()
1722 struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); in amdgpu_display_resume_helper()