# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/xf86-video-ps3/hwcursor-opt.patch # Copyright (C) 2024 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 --- --- xf86-video-ps3/src/ps3_cursor.c.vanilla 2024-04-09 21:17:07.042830970 +0200 +++ xf86-video-ps3/src/ps3_cursor.c 2024-04-09 21:18:01.895830730 +0200 @@ -1,6 +1,6 @@ /* + * Copyright (c) 2019,2024 René Rebe * Copyright (c) 2003 NVIDIA, Corporation - * Copyright (c) 2019,2020 René Rebe * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the --- xf86-video-ps3/src/ps3.c.vanilla 2024-04-09 21:20:03.578830196 +0200 +++ xf86-video-ps3/src/ps3.c 2024-04-09 21:34:18.018826446 +0200 @@ -1,9 +1,10 @@ /* + * PS3 Modifications + * Copyright (C) 2019-2024 René Rebe + * Copyright (c) Vivien Chappelier (vivien.chappelier@free.fr) + * * Authors: Alan Hourihane, * Michel Dänzer, - * - * PS3 Modifications (c) Vivien Chappelier (vivien.chappelier@free.fr) - * Copyright (C) 2019,2020 René Rebe */ #ifdef HAVE_CONFIG_H @@ -93,12 +94,14 @@ typedef enum { OPTION_NOACCEL, OPTION_FBDEV, - OPTION_DEBUG + OPTION_HWCURSOR, + OPTION_DEBUG, } PS3Opts; static const OptionInfoRec PS3Options[] = { { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_FBDEV, "fbdev", OPTV_STRING, {0}, FALSE }, + { OPTION_HWCURSOR, "HWCursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DEBUG, "debug", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -333,6 +336,13 @@ } else pPS3->NoAccel = FALSE; + if (xf86ReturnOptValBool(pPS3->Options, OPTION_HWCURSOR, TRUE)) { + pPS3->HWCursor = TRUE; + } else { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "HWCursor disabled\n"); + pPS3->HWCursor = FALSE; + } + /* select video modes */ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "checking modes against framebuffer device...\n"); @@ -522,7 +534,7 @@ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); /* Initialize HW cursor layer. Must follow software cursor initialization */ - if (1) { //pNv->HWCursor) { + if (pPS3->HWCursor) { pPS3->alphaCursor = 1; if(!NVCursorInit(pScreen)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, --- xf86-video-ps3/src/ps3.h.vanilla 2024-04-09 21:34:56.203826278 +0200 +++ xf86-video-ps3/src/ps3.h 2024-04-09 21:35:53.573826027 +0200 @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2019-2024 René Rebe + * Copyright (c) Vivien Chappelier (vivien.chappelier@free.fr) + */ + #ifndef __PS3_H__ #define __PS3_H__ @@ -18,6 +23,7 @@ ExaDriverPtr EXADriverPtr; xf86CursorInfoPtr CursorInfoRec; Bool NoAccel; + Bool HWCursor; int fd; long vram_base;