drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC
When this flag is set, we program the hardware to execute the flip during horizontal blank (i.e. for the next scanline) instead of during vertical blank (i.e. for the next frame). Currently this is only supported on ASICs which have a page flip completion interrupt (>= R600), and only if the use_pflipirq parameter has value 2 (the default). Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
a4333b4c99
commit
c63dd75858
@@ -490,7 +490,7 @@ static void radeon_flip_work_func(struct work_struct *__work)
|
||||
vblank->linedur_ns / 1000, stat, vpos, hpos);
|
||||
|
||||
/* do the flip (mmio) */
|
||||
radeon_page_flip(rdev, radeon_crtc->crtc_id, work->base);
|
||||
radeon_page_flip(rdev, radeon_crtc->crtc_id, work->base, work->async);
|
||||
|
||||
radeon_crtc->flip_status = RADEON_FLIP_SUBMITTED;
|
||||
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||
@@ -525,6 +525,7 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
|
||||
work->rdev = rdev;
|
||||
work->crtc_id = radeon_crtc->crtc_id;
|
||||
work->event = event;
|
||||
work->async = (page_flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
|
||||
|
||||
/* schedule unpin of the old buffer */
|
||||
old_radeon_fb = to_radeon_framebuffer(crtc->primary->fb);
|
||||
@@ -1630,6 +1631,9 @@ int radeon_modeset_init(struct radeon_device *rdev)
|
||||
|
||||
rdev->ddev->mode_config.funcs = &radeon_mode_funcs;
|
||||
|
||||
if (radeon_use_pflipirq == 2 && rdev->family >= CHIP_R600)
|
||||
rdev->ddev->mode_config.async_page_flip = true;
|
||||
|
||||
if (ASIC_IS_DCE5(rdev)) {
|
||||
rdev->ddev->mode_config.max_width = 16384;
|
||||
rdev->ddev->mode_config.max_height = 16384;
|
||||
|
Reference in New Issue
Block a user