mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
Remove throttling from radeon_dri2_copy_region2
Throttling should be handled by the client-side drivers. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> (Ported from amdgpu commit 8a34a8149860ac15e83ccdbd8d9a527d8d3e5997) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
90b94d4044
commit
6c986e9971
@@ -336,9 +336,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
|
||||
Bool vsync;
|
||||
Bool translate = FALSE;
|
||||
int off_x = 0, off_y = 0;
|
||||
PixmapPtr dst_ppix;
|
||||
|
||||
dst_ppix = dst_private->pixmap;
|
||||
src_drawable = &src_private->pixmap->drawable;
|
||||
dst_drawable = &dst_private->pixmap->drawable;
|
||||
|
||||
@@ -355,7 +353,6 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
|
||||
dst_drawable = DRI2UpdatePrime(drawable, dest_buffer);
|
||||
if (!dst_drawable)
|
||||
return;
|
||||
dst_ppix = (PixmapPtr)dst_drawable;
|
||||
if (dst_drawable != drawable)
|
||||
translate = TRUE;
|
||||
} else
|
||||
@@ -379,26 +376,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
|
||||
(*gc->funcs->ChangeClip) (gc, CT_REGION, copy_clip, 0);
|
||||
ValidateGC(dst_drawable, gc);
|
||||
|
||||
/* If this is a full buffer swap or frontbuffer flush, throttle on the
|
||||
* previous one
|
||||
*/
|
||||
if (dst_private->attachment == DRI2BufferFrontLeft) {
|
||||
if (REGION_NUM_RECTS(region) == 1) {
|
||||
BoxPtr extents = REGION_EXTENTS(pScreen, region);
|
||||
|
||||
if (extents->x1 == 0 && extents->y1 == 0 &&
|
||||
extents->x2 == drawable->width &&
|
||||
extents->y2 == drawable->height) {
|
||||
struct radeon_bo *bo = radeon_get_pixmap_bo(dst_ppix);
|
||||
|
||||
if (bo)
|
||||
radeon_bo_wait(bo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vsync = info->accel_state->vsync;
|
||||
|
||||
/* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */
|
||||
info->accel_state->vsync = info->swapBuffersWait;
|
||||
info->accel_state->force = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user