summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-12-21 17:38:51 +0100
committerMichel Dänzer <michel@daenzer.net>2018-12-28 12:08:41 +0100
commite14c3d2f86c7be2b5c3d06a47bf0abe954207d0b (patch)
tree832b949ac8bd1e8e816476e91e12e1339034b04a /src/radeon_kms.c
parentf66254c171f5a3b052a2a9e0339f17dfb5a60dc2 (diff)
Drop RADEONInfoRec::cursor_bo array
Not needed or even useful for anything. (Ported from amdgpu commit e95044e45350870fa7e237860e89ade91ac03550)
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index dd9955da..27a02109 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -2760,21 +2760,20 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
cursor_size = info->cursor_w * info->cursor_h * 4;
cursor_size = RADEON_ALIGN(cursor_size, RADEON_GPU_PAGE_SIZE);
for (c = 0; c < xf86_config->num_crtc; c++) {
- /* cursor objects */
- if (!info->cursor_bo[c]) {
- info->cursor_bo[c] = radeon_bo_open(info->bufmgr, 0,
- cursor_size, 0,
- RADEON_GEM_DOMAIN_VRAM, 0);
- if (!info->cursor_bo[c]) {
+ drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[c]->driver_private;
+
+ if (!drmmode_crtc->cursor_bo) {
+ drmmode_crtc->cursor_bo = radeon_bo_open(info->bufmgr, 0,
+ cursor_size, 0,
+ RADEON_GEM_DOMAIN_VRAM, 0);
+ if (!(drmmode_crtc->cursor_bo)) {
ErrorF("Failed to allocate cursor buffer memory\n");
return FALSE;
}
- if (radeon_bo_map(info->cursor_bo[c], 1)) {
+ if (radeon_bo_map(drmmode_crtc->cursor_bo, 1)) {
ErrorF("Failed to map cursor buffer memory\n");
}
-
- drmmode_set_cursor(pScrn, &info->drmmode, c, info->cursor_bo[c]);
}
}
}
@@ -2840,7 +2839,9 @@ void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, uint32_t new_fb_size)
int c;
for (c = 0; c < xf86_config->num_crtc; c++) {
- if (info->cursor_bo[c])
+ drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[c]->driver_private;
+
+ if (drmmode_crtc->cursor_bo)
new_fb_size += (64 * 4 * 64);
}