1. 08 Feb, 2017 1 commit
    • Michael Thayer's avatar
      xfree86: Immediately handle failure to set HW cursor, v5 · c02f6a68
      Michael Thayer authored
      Based on v4 by Alexandre Courbot <acourbot@nvidia.com>
      
      There is currently no reliable way to report failure to set a HW
      cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM
      ioctl fails (which currently happens at least with modesetting on Tegra
      for format incompatibility reasons).
      
      As failures are currently handled by setting the HW cursor size to
      (0,0), the fallback to SW cursor will not happen until the next time the
      cursor changes and xf86CursorSetCursor() is called again. In the
      meantime, the cursor will be invisible to the user.
      
      This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and
      _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans.
      This allows to propagate errors up to xf86CursorSetCursor(), which can
      then fall back to using the SW cursor immediately.
      
      v5: Updated the patch to apply to current git HEAD, split up into two
      patches (server and modesetting driver) and adjusted the code slightly
      to match surrounding code.  I also removed the new exported function
      ShowCursorCheck(), as instead just changing ShowCursor() to return Bool
      should not affect its current callers.
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Signed-off-by: Michael Thayer's avatarMichael Thayer <michael.thayer@oracle.com>
      c02f6a68
  2. 26 May, 2016 1 commit
    • Keith Packard's avatar
      xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor · f5670b4a
      Keith Packard authored
      This makes the cursor pointer held by xf86Cursors.c get reset to NULL
      whenever the cursor isn't displayed, and means that the reference
      count held in xf86Cursor.c is sufficient to cover the reference in
      xf86Cursors.c.
      
      As HideCursor may be called in the cursor loading path after
      UseHWCursor or UseHWCursorARGB when HARDWARE_CURSOR_UPDATE_UNHIDDEN
      isn't set in the Flags field, the setting of the cursor pointer had to
      be moved to the LoadCursor paths.
      
      LoadCursorARGBCheck gets the cursor pointer, but LoadCursorImageCheck
      does not. For LoadCursorImageCheck, I added a new function,
      xf86CurrentCursor, which returns the current cursor. With this new
      function, we can eliminate the cursor pointer from the
      xf86CrtcConfigRec, once drivers are converted over to use it.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Acked-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      f5670b4a
  3. 09 Mar, 2016 1 commit
    • Michel Dänzer's avatar
      xfree86: Re-set current cursor after RandR 1.2 CRTC configuration change · b04767c8
      Michel Dänzer authored
      Add xf86CursorResetCursor, which allows switching between HW and SW
      cursor depending on the current state.
      
      Call it from xf86DisableUnusedFunctions, which is called after any CRTC
      configuration change such as setting a mode or disabling a CRTC. This
      makes sure that SW cursor is used e.g. while a transform is in use on
      any CRTC or while there are active PRIME output slaves, and enables HW
      cursor again once none of those conditions are true anymore.
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      b04767c8
  4. 30 Jun, 2015 1 commit
  5. 25 Apr, 2014 1 commit
  6. 03 Apr, 2014 1 commit
  7. 21 Mar, 2012 1 commit
    • Keith Packard's avatar
      Introduce a consistent coding style · 9838b703
      Keith Packard authored
      This is strictly the application of the script 'x-indent-all.sh'
      from util/modular. Compared to the patch that Daniel posted in
      January, I've added a few indent flags:
      
      	-bap
      	-psl
      	-T PrivatePtr
      	-T pmWait
      	-T _XFUNCPROTOBEGIN
      	-T _XFUNCPROTOEND
      	-T _X_EXPORT
      
      The typedefs were needed to make the output of sdksyms.sh match the
      previous output, otherwise, the code is formatted badly enough that
      sdksyms.sh generates incorrect output.
      
      The generated code was compared with the previous version and found to
      be essentially identical -- "assert" line numbers and BUILD_TIME were
      the only differences found.
      
      The comparison was done with this script:
      
      dir1=$1
      dir2=$2
      
      for dir in $dir1 $dir2; do
      	(cd $dir && find . -name '*.o' | while read file; do
      		dir=`dirname $file`
      		base=`basename $file .o`
      		dump=$dir/$base.dump
      		objdump -d $file > $dump
      	done)
      done
      
      find $dir1 -name '*.dump' | while read dump; do
      	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
      	diff -u $dump $otherdump
      done
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Acked-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
      Acked-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      9838b703
  8. 03 Dec, 2008 1 commit
    • Paulo Cesar Pereira de Andrade's avatar
      Rework symbol visibility for easier maintenance · 49f77fff
      Paulo Cesar Pereira de Andrade authored
        Save in a few special cases, _X_EXPORT should not be used in C source
      files. Instead, it should be used in headers, and the proper C source
      include that header. Some special cases are symbols that need to be
      shared between modules, but not expected to be used by external drivers,
      and symbols that are accessible via LoaderSymbol/dlopen.
      
        This patch also adds conditionally some new sdk header files, depending
      on extensions enabled. These files were added to match pattern for
      other extensions/modules, that is, have the headers "deciding" symbol
      visibility in the sdk. These headers are:
      o Xext/panoramiXsrv.h, Xext/panoramiX.h
      o fbpict.h (unconditionally)
      o vidmodeproc.h
      o mioverlay.h (unconditionally, used only by xaa)
      o xfixes.h (unconditionally, symbols required by dri2)
      
        LoaderSymbol and similar functions now don't have different prototypes,
      in loaderProcs.h and xf86Module.h, so that both headers can be included,
      without the need of defining IN_LOADER.
      
        xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
      not exported (and with a comment about it).
      49f77fff
  9. 15 Mar, 2007 1 commit
    • Keith Packard's avatar
      Create driver-independent CRTC-based cursor layer. · ae75019c
      Keith Packard authored
      This moves most of the cursor management code out of the intel driver and
      into the general server code. Of course, the hope is that this code will be
      useful for other driver writers as well.
      
      Check out xf86Crtc.h for the usage information, making sure you add the
      needed hooks to the crtc funcs structure for your driver.
      (cherry picked from commit 4d81c99a)
      ae75019c
  10. 21 Jul, 2006 1 commit
  11. 24 Aug, 2005 1 commit
  12. 03 Jul, 2005 1 commit
  13. 23 Apr, 2004 1 commit
  14. 14 Mar, 2004 1 commit
  15. 05 Mar, 2004 1 commit
  16. 03 Mar, 2004 1 commit
  17. 26 Feb, 2004 2 commits
  18. 14 Nov, 2003 1 commit