summaryrefslogtreecommitdiff
path: root/src/amdgpu_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-11-22 17:54:45 +0100
committerMichel Dänzer <michel@daenzer.net>2018-12-13 12:38:40 +0100
commite95044e45350870fa7e237860e89ade91ac03550 (patch)
tree3b76e45082f86c725cc5e22474b7fd0453ff303e /src/amdgpu_kms.c
parent13c85e8a136e8626ba84656c6f8321394750f5c7 (diff)
Drop AMDGPUInfoRec::cursor_buffer array
Not needed or even useful for anything. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r--src/amdgpu_kms.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 4ce9b9f..fad2382 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -2280,23 +2280,21 @@ static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen)
cursor_size = info->cursor_w * info->cursor_h * 4;
cursor_size = AMDGPU_ALIGN(cursor_size, AMDGPU_GPU_PAGE_SIZE);
for (c = 0; c < xf86_config->num_crtc; c++) {
- /* cursor objects */
- if (!info->cursor_buffer[c]) {
- info->cursor_buffer[c] = amdgpu_bo_open(pAMDGPUEnt->pDev,
- cursor_size, 0,
- AMDGPU_GEM_DOMAIN_VRAM);
- if (!(info->cursor_buffer[c])) {
+ drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[c]->driver_private;
+
+ if (!drmmode_crtc->cursor_buffer) {
+ drmmode_crtc->cursor_buffer = amdgpu_bo_open(pAMDGPUEnt->pDev,
+ cursor_size, 0,
+ AMDGPU_GEM_DOMAIN_VRAM);
+ if (!(drmmode_crtc->cursor_buffer)) {
ErrorF("Failed to allocate cursor buffer memory\n");
return FALSE;
}
- if (amdgpu_bo_cpu_map(info->cursor_buffer[c]->bo.amdgpu,
- &info->cursor_buffer[c]->cpu_ptr)) {
+ if (amdgpu_bo_cpu_map(drmmode_crtc->cursor_buffer->bo.amdgpu,
+ &drmmode_crtc->cursor_buffer->cpu_ptr)) {
ErrorF("Failed to map cursor buffer memory\n");
}
-
- drmmode_set_cursor(pScrn, &info->drmmode, c,
- info->cursor_buffer[c]);
}
}