mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
Drop RADEONInfoRec::cursor_bo array
Not needed or even useful for anything. (Ported from amdgpu commit e95044e45350870fa7e237860e89ade91ac03550)
This commit is contained in:
committed by
Michel Dänzer
parent
f66254c171
commit
e14c3d2f86
@@ -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)
|
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
|
||||||
{
|
{
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
|||||||
@@ -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_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
|
||||||
extern void drmmode_fini(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 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);
|
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y);
|
||||||
extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
|
extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
|
||||||
Bool set_hw);
|
Bool set_hw);
|
||||||
|
|||||||
@@ -572,7 +572,6 @@ typedef struct {
|
|||||||
struct radeon_cs_manager *csm;
|
struct radeon_cs_manager *csm;
|
||||||
struct radeon_cs *cs;
|
struct radeon_cs *cs;
|
||||||
|
|
||||||
struct radeon_bo *cursor_bo[32];
|
|
||||||
uint64_t vram_size;
|
uint64_t vram_size;
|
||||||
uint64_t gart_size;
|
uint64_t gart_size;
|
||||||
drmmode_rec drmmode;
|
drmmode_rec drmmode;
|
||||||
|
|||||||
@@ -2760,21 +2760,20 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
|
|||||||
cursor_size = info->cursor_w * info->cursor_h * 4;
|
cursor_size = info->cursor_w * info->cursor_h * 4;
|
||||||
cursor_size = RADEON_ALIGN(cursor_size, RADEON_GPU_PAGE_SIZE);
|
cursor_size = RADEON_ALIGN(cursor_size, RADEON_GPU_PAGE_SIZE);
|
||||||
for (c = 0; c < xf86_config->num_crtc; c++) {
|
for (c = 0; c < xf86_config->num_crtc; c++) {
|
||||||
/* cursor objects */
|
drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[c]->driver_private;
|
||||||
if (!info->cursor_bo[c]) {
|
|
||||||
info->cursor_bo[c] = radeon_bo_open(info->bufmgr, 0,
|
if (!drmmode_crtc->cursor_bo) {
|
||||||
cursor_size, 0,
|
drmmode_crtc->cursor_bo = radeon_bo_open(info->bufmgr, 0,
|
||||||
RADEON_GEM_DOMAIN_VRAM, 0);
|
cursor_size, 0,
|
||||||
if (!info->cursor_bo[c]) {
|
RADEON_GEM_DOMAIN_VRAM, 0);
|
||||||
|
if (!(drmmode_crtc->cursor_bo)) {
|
||||||
ErrorF("Failed to allocate cursor buffer memory\n");
|
ErrorF("Failed to allocate cursor buffer memory\n");
|
||||||
return FALSE;
|
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");
|
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;
|
int c;
|
||||||
|
|
||||||
for (c = 0; c < xf86_config->num_crtc; 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);
|
new_fb_size += (64 * 4 * 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user