summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 2a22777..7435043 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1627,8 +1627,10 @@ drmmode_cursor_pixel(xf86CrtcPtr crtc, uint32_t *argb, Bool *premultiplied,
return TRUE;
}
-static void drmmode_do_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image, uint32_t *ptr)
+static void drmmode_load_cursor_argb(xf86CrtcPtr crtc, CARD32 * image)
{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ uint32_t *ptr = (uint32_t *) (drmmode_crtc->cursor_buffer->cpu_ptr);
ScrnInfoPtr pScrn = crtc->scrn;
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
Bool premultiplied = TRUE;
@@ -1678,26 +1680,6 @@ retry:
}
}
-static void drmmode_load_cursor_argb(xf86CrtcPtr crtc, CARD32 * image)
-{
- ScrnInfoPtr pScrn = crtc->scrn;
- AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
- uint32_t cursor_size = info->cursor_w * info->cursor_h;
-
- if (info->gbm) {
- uint32_t ptr[cursor_size];
-
- drmmode_do_load_cursor_argb(crtc, image, ptr);
- gbm_bo_write(drmmode_crtc->cursor_buffer->bo.gbm, ptr, cursor_size * 4);
- } else {
- /* cursor should be mapped already */
- uint32_t *ptr = (uint32_t *) (drmmode_crtc->cursor_buffer->cpu_ptr);
-
- drmmode_do_load_cursor_argb(crtc, image, ptr);
- }
-}
-
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0)
static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 * image)