# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/powerpc64/package/*/0667-ps3fb-cursor.patch.disabled # Copyright (C) 2019 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- linux-5.0/drivers/video/fbdev/ps3fb.c.vanilla 2019-07-14 14:53:01.797322098 +0000 +++ linux-5.0/drivers/video/fbdev/ps3fb.c 2019-07-14 15:15:20.841316556 +0000 @@ -834,6 +834,19 @@ console_unlock(); break; + case PS3FB_IOCTL_CURSOR_ENABLE: + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10c, 0/*head*/, arg ? 0x1 : 0x02, 0x0, 0x0); /* enable/disable */ + break; + + case PS3FB_IOCTL_CURSOR_POS: + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 3, arg & 0xffff, arg >> 16); /* x/y pos */ + break; + + case PS3FB_IOCTL_CURSOR_OFFS: + retval = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 2, arg, 0); /* offset */ + //retval = lv1_gpu_context_attribute(context_handle, 0x10b, 0/*head*/, 4, 0, 0); /* ??? */ + break; + default: retval = -ENOIOCTLCMD; break; @@ -1104,6 +1100,10 @@ fb_info(info, "using %u KiB of video memory\n", info->fix.smem_len >> 10); + /* test cursor init here */ + status = lv1_gpu_context_attribute(ps3fb.context_handle, 0x10b, 0/*head*/, 1, 0, 0); /* init */ + if (status) dev_err(info->device, "%s: cursor init failed (%d)\n", __func__, status); + return 0; err_fb_dealloc: --- linux-5.0/arch/powerpc/include/uapi/asm/ps3fb.h.vanilla 2019-07-14 14:54:38.629321697 +0000 +++ linux-5.0/arch/powerpc/include/uapi/asm/ps3fb.h 2019-07-14 15:11:45.477317448 +0000 @@ -34,4 +34,8 @@ +#define PS3FB_IOCTL_CURSOR_ENABLE _IOW('r', 10, int) /* cursor enable/disable */ +#define PS3FB_IOCTL_CURSOR_POS _IOW('r', 11, int) /* cursor x/y pos*/ +#define PS3FB_IOCTL_CURSOR_OFFS _IOW('r', 12, int) /* cursor data offset */ + #ifndef FBIO_WAITFORVSYNC #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */ #endif