diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-12-21 17:38:51 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-12-28 12:08:41 +0100 |
commit | e14c3d2f86c7be2b5c3d06a47bf0abe954207d0b (patch) | |
tree | 832b949ac8bd1e8e816476e91e12e1339034b04a | |
parent | f66254c171f5a3b052a2a9e0339f17dfb5a60dc2 (diff) |
Drop RADEONInfoRec::cursor_bo array
Not needed or even useful for anything.
(Ported from amdgpu commit e95044e45350870fa7e237860e89ade91ac03550)
-rw-r--r-- | src/drmmode_display.c | 9 | ||||
-rw-r--r-- | src/drmmode_display.h | 1 | ||||
-rw-r--r-- | src/radeon.h | 1 | ||||
-rw-r--r-- | src/radeon_kms.c | 21 |
4 files changed, 11 insertions, 21 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 34c88c8e..ef235bd2 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2967,15 +2967,6 @@ miPointerSpriteFuncRec drmmode_sprite_funcs = { }; -void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo) -{ - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - xf86CrtcPtr crtc = xf86_config->crtc[id]; - drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; - - drmmode_crtc->cursor_bo = bo; -} - void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); diff --git a/src/drmmode_display.h b/src/drmmode_display.h index f5659664..d7ab9d7e 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -213,7 +213,6 @@ extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp); extern void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr); -extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y); extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw); diff --git a/src/radeon.h b/src/radeon.h index cde922c6..74454c30 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -572,7 +572,6 @@ typedef struct { struct radeon_cs_manager *csm; struct radeon_cs *cs; - struct radeon_bo *cursor_bo[32]; uint64_t vram_size; uint64_t gart_size; drmmode_rec drmmode; 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); } |