[PATCH xserver] xfree86/modes: Remove xf86_reload_cursors
Michel Dänzer
michel at daenzer.net
Fri Mar 25 10:12:47 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
No longer needed now that xf86CursorResetCursor is getting called for
each CRTC configuration change.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 5 ---
hw/xfree86/modes/xf86Crtc.h | 10 -----
hw/xfree86/modes/xf86Cursors.c | 57 ------------------------
3 files changed, 72 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 262e015..a6c134d 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -450,11 +450,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
}
}
-#if 0
- if (pScrn->pScreen &&
- !xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE))
- xf86_reload_cursors(pScrn->pScreen);
-#endif
done:
if (!ret) {
crtc->x = saved_x;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 8b01608..5399207 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -968,16 +968,6 @@ extern _X_EXPORT Bool
xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
/**
- * Called when anything on the screen is reconfigured.
- *
- * Reloads cursor images as needed, then adjusts cursor positions.
- *
- * Driver should call this from crtc commit function.
- */
-extern _X_EXPORT void
- xf86_reload_cursors(ScreenPtr screen);
-
-/**
* Called from EnterVT to turn the cursors back on
*/
extern _X_EXPORT void
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 5df1ab7..0e9cf46 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -645,63 +645,6 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags)
}
/**
- * Called when anything on the screen is reconfigured.
- *
- * Reloads cursor images as needed, then adjusts cursor positions
- * @note We assume that all hardware cursors to be loaded have already been
- * found to be usable by the hardware.
- */
-
-void
-xf86_reload_cursors(ScreenPtr screen)
-{
- ScrnInfoPtr scrn;
- xf86CrtcConfigPtr xf86_config;
- xf86CursorInfoPtr cursor_info;
- CursorPtr cursor;
- int x, y;
- xf86CursorScreenPtr cursor_screen_priv;
-
- /* initial mode setting will not have set a screen yet.
- May be called before the devices are initialised.
- */
- if (!screen || !inputInfo.pointer)
- return;
- cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
- xf86CursorScreenKey);
- /* return if HW cursor is inactive, to avoid displaying two cursors */
- if (!cursor_screen_priv || !cursor_screen_priv->isUp)
- return;
-
- scrn = xf86ScreenToScrn(screen);
- xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-
- /* make sure the cursor code has been initialized */
- cursor_info = xf86_config->cursor_info;
- if (!cursor_info)
- return;
-
- cursor = xf86_config->cursor;
- GetSpritePosition(inputInfo.pointer, &x, &y);
- if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
- (*cursor_info->HideCursor) (scrn);
-
- if (cursor) {
- void *src =
- dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey,
- screen);
- if (cursor->bits->argb && xf86DriverHasLoadCursorARGB(cursor_info))
- xf86DriverLoadCursorARGB(cursor_info, cursor);
- else if (src)
- xf86DriverLoadCursorImage(cursor_info, src);
-
- x += scrn->frameX0 + cursor_screen_priv->HotX;
- y += scrn->frameY0 + cursor_screen_priv->HotY;
- (*cursor_info->SetCursorPosition) (scrn, x, y);
- }
-}
-
-/**
* Clean up CRTC-based cursor code
*/
void
--
2.8.0.rc3
More information about the xorg-devel
mailing list