mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Drop AMDGPUInfoRec::cursor_buffer array
Not needed or even useful for anything. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
13c85e8a13
commit
e95044e453
@@ -296,7 +296,6 @@ typedef struct {
|
||||
Bool shadow_fb;
|
||||
void *fb_shadow;
|
||||
struct amdgpu_buffer *front_buffer;
|
||||
struct amdgpu_buffer *cursor_buffer[32];
|
||||
|
||||
uint64_t vram_size;
|
||||
uint64_t gart_size;
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3577,16 +3577,6 @@ miPointerSpriteFuncRec drmmode_sprite_funcs = {
|
||||
};
|
||||
|
||||
|
||||
void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id,
|
||||
struct amdgpu_buffer *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_buffer = bo;
|
||||
}
|
||||
|
||||
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
|
||||
@@ -234,8 +234,6 @@ extern int drmmode_page_flip_target_relative(AMDGPUEntPtr pAMDGPUEnt,
|
||||
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 void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id,
|
||||
struct amdgpu_buffer *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);
|
||||
|
||||
Reference in New Issue
Block a user