diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-01-20 11:20:30 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-01-20 11:20:30 +0900 |
commit | d41fcccf2f11d0393d252e76bbbe6d233c4ac443 (patch) | |
tree | 1daabb9587d4c53f07a1bddc8886e5932e640e0b /src/drmmode_display.c | |
parent | 9483a3d777919b224f70c3b4d01e4b320a57db31 (diff) |
Set RADEON_GEM_NO_CPU_ACCESS flag for BOs which don't need CPU access
Failing to do this was resulting in the kernel driver unnecessarily
leaving open the possibility of CPU access to those BOs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 0424dbd2..14f6a553 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -549,7 +549,8 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc, size = RADEON_ALIGN(rotate_pitch * aligned_height, RADEON_GPU_PAGE_SIZE); scanout->bo = radeon_bo_open(drmmode->bufmgr, 0, size, base_align, - RADEON_GEM_DOMAIN_VRAM, 0); + RADEON_GEM_DOMAIN_VRAM, + RADEON_GEM_NO_CPU_ACCESS); if (scanout->bo == NULL) return NULL; @@ -1917,7 +1918,8 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) info->front_bo = radeon_bo_open(info->bufmgr, 0, screen_size, base_align, info->shadow_primary ? RADEON_GEM_DOMAIN_GTT : - RADEON_GEM_DOMAIN_VRAM, 0); + RADEON_GEM_DOMAIN_VRAM, + tiling_flags ? RADEON_GEM_NO_CPU_ACCESS : 0); if (!info->front_bo) goto fail; |