1. 23 Mar, 2017 1 commit
  2. 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>
  3. 13 Sep, 2016 2 commits
    • Hans de Goede's avatar
      xf86Cursor: Deal with rotation on GPU screens using a hw-cursor · df88008f
      Hans de Goede authored
      When a slave-output is rotated the transformation is done on the blit
      from master to slave GPU, so crtc->transform_in_use is not set, but we
      still need to adjust the mouse position for things to work.
      This commit modifies xf86_crtc_transform_cursor_position to not rely
      on crtc->f_framebuffer_to_crtc, so that it can be used with GPU screens
      too and always calls it for crtcs with any form of rotation.
      Note not using crtc->f_framebuffer_to_crtc means that crtc->transform
      will not be taken into account, that is ok, because when we've a transform
      active hw-cursors are not used and xf86_crtc_transform_cursor_position
      will never get called.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-and-Tested-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
    • Hans de Goede's avatar
      xf86Cursor: Fix xf86_crtc_rotate_coord using width/height wrongly · f82fd470
      Hans de Goede authored
      xf86_crtc_rotate_coord should be the exact inverse operation of
      xf86_crtc_rotate_coord_back, but when calculating x / y for 90 / 270
      degrees rotation it was using height to calculate x / width to calculate y,
      instead of the otherway around.
      This was likely not noticed before since xf86_crtc_rotate_coord
      until now was only used with cursor_info->MaxWidth and
      cursor_info->MaxHeight, which are usally the same.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
  4. 21 Jun, 2016 3 commits
  5. 30 May, 2016 2 commits
  6. 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
      As HideCursor may be called in the cursor loading path after
      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>
  7. 09 Mar, 2016 2 commits
  8. 30 Jun, 2015 1 commit
  9. 25 Apr, 2014 1 commit
  10. 03 Apr, 2014 1 commit
  11. 15 May, 2013 1 commit
  12. 21 May, 2012 1 commit
  13. 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:
      	-T PrivatePtr
      	-T pmWait
      	-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:
      for dir in $dir1 $dir2; do
      	(cd $dir && find . -name '*.o' | while read file; do
      		dir=`dirname $file`
      		base=`basename $file .o`
      		objdump -d $file > $dump
      find $dir1 -name '*.dump' | while read dump; do
      	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
      	diff -u $dump $otherdump
      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>
  14. 16 Oct, 2011 1 commit
  15. 03 Oct, 2011 2 commits
    • Aaron Plattner's avatar
      xfree86/modes: Make cursor position transform a helper function · 57cd32e9
      Aaron Plattner authored
      When the driver can handle the crtc transform in hardware, it sets
      crtc->driverIsPerformingTransform, which turns off both the shadow
      layer and the cursor's position-transforming code.  However, some
      drivers actually do require the cursor position to still be
      transformed in these cases.  Move the cursor position transform into a
      helper function that can be called by such drivers.
      Signed-off-by: Aaron Plattner's avatarAaron Plattner <aplattner@nvidia.com>
    • Aaron Plattner's avatar
      xfree86/modes: Let the driver handle the transform · 245cb8e9
      Aaron Plattner authored
      If a driver can use hardware to handle the crtc transform, then
      there's no need for the server's shadow layer to do it.  Add a crtc
      flag that lets the driver indicate that it is handling the transform.
      If it's set, consider the transformed size of the screen but don't
      actually enable the shadow layer.  Also stop adjusting the cursor
      image and position.
      Signed-off-by: Aaron Plattner's avatarAaron Plattner <aplattner@nvidia.com>
  16. 20 Sep, 2011 1 commit
  17. 23 Feb, 2011 1 commit
  18. 07 Dec, 2010 1 commit
  19. 30 Nov, 2010 1 commit
    • Aaron Plattner's avatar
      xfree86: Fix rotation of 2-color non-interleaved cursor images · ffcbfa00
      Aaron Plattner authored
      When RandR 1.2's transformation code is enabled, it rotates the cursor
      image so that it appears upright on a rotated screen.  This code
      completely mangles 2-color cursors on hardware where the the mask and
      source images are not interleaved due to two problems:
      1. stride is calculated as (width / 4) rather than (width / 8), so the
         expression (y * stride) skips two lines instead of one for every
         time y is incremented.
      2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't
         specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags.
      To fix this, refactor the code to pass the whole xf86CursorInfoPtr
      through to cursor_bitpos and compute the correct stride there based on
      the flags.  If none of the SOURCE_MASK_INTERLEAVE flags are set, use
      the total cursor size to move the 'image' variable into the mask part
      of the image before computing the desired byte pointer.
      Signed-off-by: Aaron Plattner's avatarAaron Plattner <aplattner@nvidia.com>
      Reviewed-by: default avatarRobert Morell <rmorell@nvidia.com>
      Reviewed-by: Alex Deucher's avatarAlex Deucher <alexdeucher@gmail.com>
      Tested-by: Cyril Brulebois's avatarCyril Brulebois <kibi@debian.org>
  20. 18 Sep, 2010 1 commit
    • Jamey Sharp's avatar
      Xserver need not be compatible with old versions of xserver. · e4d4d6dd
      Jamey Sharp authored
      Delete time-traveling multiple personality disorder from the server.
      Gaetan notes:
          There were a couple of drivers containing an unknown version of the
          modes/parser code. This was done in server 1.2 time frame because it
          was released without mode code. It was barely or not maintained
          afterwards. There are currently no video drivers with a copy of the
          modes code.
      Most of these ifdefs were introduced in commit
      a8d760f5, where Aaron wrote,
          This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer
          than 1.2" since XORG_VERSION current went backwards at some point.
      Alan explains that:
          In Xorg 1.3, when we first released an Xorg server release decoupled
          from the katamari release schedule.  (1.0 through 1.2 were released
          as part of X11R7.0 through 7.2, while 1.3 came out between X11R7.2 &
      Commit by Jamey Sharp and Josh Triplett.
      Signed-off-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
      Signed-off-by: Josh Triplett's avatarJosh Triplett <josh@joshtriplett.org>
      Reviewed-by: Aaron Plattner's avatarAaron Plattner <aplattner@nvidia.com>
  21. 22 Jun, 2010 1 commit
  22. 11 Jun, 2010 1 commit
  23. 12 May, 2010 1 commit
  24. 11 May, 2010 1 commit
  25. 19 Apr, 2010 1 commit
  26. 15 Mar, 2010 1 commit
  27. 22 Sep, 2009 2 commits
  28. 21 Sep, 2009 1 commit
  29. 16 Sep, 2009 1 commit
  30. 26 Aug, 2009 1 commit
  31. 15 Jul, 2009 1 commit
    • Peter Hutterer's avatar
      Update to xextproto · d3f6b43a
      Peter Hutterer authored
      xextproto had Xlib client headers moved into libXext.
      Protocol header files are named fooproto.h, header files with constants
      foo.h or fooconst.h where foo.h was already in use for client-side headers.
  32. 03 Dec, 2008 2 commits
    • 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).
    • Stuart Bennett's avatar
      xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820) · 0b8f8b24
      Stuart Bennett authored
      Also, no need to call ShowCursor when SetCursorPosition already does it
      Based on a previous patch by Maarten Maathuis
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>