aboutsummaryrefslogtreecommitdiff
path: root/src/drmmode_exynos/drmmode_exynos.c
diff options
context:
space:
mode:
authorJavier Martin <javier.martin@arm.com>2013-09-16 15:22:41 +0100
committerJavier Martin <javier.martin@arm.com>2013-09-16 16:46:54 +0100
commita7e316f75ca12d8f235ca36714009dfbe6762fda (patch)
treeaa7a2db7683ddcf2c1e80ac298b9ee2d25ae58f6 /src/drmmode_exynos/drmmode_exynos.c
parent8e9ac7bda78e62b375bcafdd7f44fa2d2175b71e (diff)
Remove ARGB to LBBP format conversion for pl111.
The pl111 DRM driver now exposes ARGB to user space for the HW cursor. This is according to what other DRM drivers are doing for HW cursor support. As a result we no longer need a custom callback for setting the cursor image. Change-Id: I9af6268f39cd7b1e22240326b09bed54af4fe5ae
Diffstat (limited to 'src/drmmode_exynos/drmmode_exynos.c')
-rw-r--r--src/drmmode_exynos/drmmode_exynos.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/drmmode_exynos/drmmode_exynos.c b/src/drmmode_exynos/drmmode_exynos.c
index 3e541ff..f1fa033 100644
--- a/src/drmmode_exynos/drmmode_exynos.c
+++ b/src/drmmode_exynos/drmmode_exynos.c
@@ -41,7 +41,12 @@ struct drm_exynos_plane_set_zpos {
*/
#define CURSORW (64)
#define CURSORH (64)
-#define CURSORPAD (16) /* Padding added down each side of cursor image */
+
+/*
+ * Padding added down each side of cursor image. This is a workaround for a bug
+ * causing corruption when the cursor reaches the screen edges.
+ */
+#define CURSORPAD (16)
#define DRM_EXYNOS_PLANE_SET_ZPOS 0x06
#define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \
@@ -93,34 +98,6 @@ static int init_plane_for_cursor(int drm_fd, uint32_t plane_id)
return res;
}
-/* The cursor format is ARGB so the image can be copied straight over.
- * Columns of CURSORPAD blank pixels are maintained down either side
- * of the destination image. This is a workaround for a bug causing
- * corruption when the cursor reaches the screen edges.
- */
-static void set_cursor_image(xf86CrtcPtr crtc, uint32_t *d, CARD32 *s)
-{
- int row;
- void *dst;
- const char *src_row;
- char *dst_row;
-
- dst = d;
- for (row = 0; row < CURSORH; row += 1) {
- /* we're operating with ARGB data (4 bytes per pixel) */
- src_row = (const char *)s + row * 4 * CURSORW;
- dst_row = (char *)dst + row * 4 * (CURSORW + 2 * CURSORPAD);
-
- /* set first CURSORPAD pixels in row to 0 */
- memset(dst_row, 0, (4 * CURSORPAD));
- /* copy cursor image pixel row across */
- memcpy(dst_row + (4 * CURSORPAD), src_row, 4 * CURSORW);
- /* set last CURSORPAD pixels in row to 0 */
- memset(dst_row + 4 * (CURSORPAD + CURSORW),
- 0, (4 * CURSORPAD));
- }
-}
-
static int create_custom_gem(int fd, struct armsoc_create_gem *create_gem)
{
struct drm_mode_create_dumb create_dumb;
@@ -160,7 +137,6 @@ struct drmmode_interface exynos_interface = {
CURSORPAD /* cursor padding */,
HWCURSOR_API_PLANE /* cursor_api */,
init_plane_for_cursor /* init_plane_for_cursor */,
- set_cursor_image /* set cursor image */,
0 /* vblank_query_supported */,
create_custom_gem /* create_custom_gem */,
};