* updated kollision (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / architecture / powerpc64 / package / linux / 0667-ps3fb-cursor.patch
blobc3bffa5b48bdb3fa1a88e6ba0745d3f21cdf5a24
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: architecture/powerpc64/package/*/0667-ps3fb-cursor.patch
5 # Copyright (C) 2019 - 2021 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- linux-5.0/drivers/video/fbdev/ps3fb.c.vanilla 2019-07-14 14:53:01.797322098 +0000
18 +++ linux-5.0/drivers/video/fbdev/ps3fb.c 2019-07-14 15:15:20.841316556 +0000
19 @@ -987,6 +973,11 @@
21 ps3fb_sync_image(info->device, 0);
24 + /* test cursor init here */
25 + int status = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 1, 0, 0); /* init */
26 + if (status) dev_err(info->device, "%s: cursor init failed (%d)\n", __func__, status);
28 return 0;
31 @@ -1265,6 +1256,19 @@
33 break;
35 + case PS3FB_IOCTL_CURSOR_ENABLE:
36 + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10c, 0/*head*/, arg ? 0x1 : 0x02, 0x0, 0x0); /* enable/disable */
37 + break;
39 + case PS3FB_IOCTL_CURSOR_POS:
40 + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 3, arg & 0xffff, arg >> 16); /* x/y pos */
41 + break;
43 + case PS3FB_IOCTL_CURSOR_OFFS:
44 + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 2, arg, 0); /* offset */
45 + //retval = lv1_gpu_context_attribute(context_handle, 0x10b, 0/*head*/, 4, 0, 0); /* ??? */
46 + break;
48 default:
49 retval = -ENOIOCTLCMD;
50 break;
51 --- linux-5.0/arch/powerpc/include/uapi/asm/ps3fb.h.vanilla 2019-07-14 14:54:38.629321697 +0000
52 +++ linux-5.0/arch/powerpc/include/uapi/asm/ps3fb.h 2019-07-14 15:11:45.477317448 +0000
53 @@ -34,6 +34,10 @@
54 #define PS3FB_IOCTL_GPU_INFO _IOR('r', 8, int) /* get GPU info */
55 #define PS3FB_IOCTL_GPU_ATTR _IOW('r', 9, int) /* set attribute */
57 +#define PS3FB_IOCTL_CURSOR_ENABLE _IOW('r', 10, int) /* cursor enable/disable */
58 +#define PS3FB_IOCTL_CURSOR_POS _IOW('r', 11, int) /* cursor x/y pos*/
59 +#define PS3FB_IOCTL_CURSOR_OFFS _IOW('r', 12, int) /* cursor data offset */
61 #ifndef FBIO_WAITFORVSYNC
62 #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */
63 #endif