1. 03 Dec, 2020 1 commit
    • Simo Melenius's avatar
      modesetting: apply transforms in PRIME shared pixmap updates · faa63a1c
      Simo Melenius authored and Simo Melenius's avatar Simo Melenius committed
      For reverse PRIME heads, with 'modesetting' as the source, scaling was
      broken as the compositing of the shared pixmaps wasn't properly
      configured to take into account scaling (and other transformations).
      For example, by scaling a reverse PRIME head by 2x2 the user would
      only see the top-left quadrant of the 2x2 screenspace instead of the
      full screenspace scaled down to the size of the shared pixmap.
      
      This change brings the RandR transformation available for tracking and
      updating of dirty regions in the modesetting driver, and subsequently
      the CompositeRotate() function which renders the transformed screen to
      the shared pixmap. For transforms with simple translations only a
      separate execution path is tracked so that direct copying can be used.
      
      These changes should fix scaling, and to some extent, arbitrary
      transformations, for all heads that are reverse PRIME sinks driven
      from 'modesetting' source.
      
      Note that these changes only clean up certain parts of the viewport
      transformation and composition pipeline. A more thorough overhaul of
      how all the offsets and transformations are managed would be in order
      to make all combinations of randr screen configurations work
      seamlessly. I tried to be careful not to break existing functionality
      but there are things that were broken in the first place and remain to
      be so.
      
      As a quick test, basic scaling like this should now work properly with
      reverse PRIME outputs:
      
        xrandr --output <X> --scale 0.5x0.5
        xrandr --output <X> --scale 2x2
      
      Arbitrary transforms still exhibit various quirks and artifacts but
      something like a basic free rotation  should now behave a bit better
      than before with reverse PRIME outputs:
      
        xrandr --output <X> --transform 0.707,-0.707,0,0.707,0.707,0,0,0,1
      
      With this change, this command yields a screen that is at least now
      rotated yet still wrongly clipped as it was also before this change.
      faa63a1c
  2. 01 Dec, 2020 3 commits
  3. 30 Nov, 2020 1 commit
    • Michel Dänzer's avatar
      glx: Remove unused bswap_CARD64 · b0530fe4
      Michel Dänzer authored and Michel Dänzer's avatar Michel Dänzer committed
      GCC warned about it:
      
      ../../../glx/indirect_dispatch_swap.c:85:1: warning: ‘bswap_CARD64’ defined but not used [-Wunused-function]
         85 | bswap_CARD64(const void *src)
            | ^~~~~~~~~~~~
      b0530fe4
  4. 26 Nov, 2020 2 commits
    • Olivier Fourdan's avatar
      modesetting: Fix build with DebugPresent() enabled · 3ce05a44
      Olivier Fourdan authored and Peter Hutterer's avatar Peter Hutterer committed
      
      
      By default, the macro DebugPresent() is a no-op but it can be enabled
      at build time for debugging purpose.
      
      However, doing so prevents the code to build because one debug statement
      tries to make use of a non-existent variable:
      
        present.c: In function ‘ms_present_queue_vblank’:
        present.c:147:18: error: ‘vbl’ undeclared (first use in this function)
          147 |                  vbl.request.sequence));
              |                  ^~~
        present.c:49:32: note: in definition of macro ‘DebugPresent’
          49 | #define DebugPresent(x) ErrorF x
             |                                ^
      
      Fix the build with DebugPresent() by removing the vbl variable from the
      debug message.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      3ce05a44
    • Erik Kurzinger's avatar
      GLX: fix context render type queries · 95b79aa9
      Erik Kurzinger authored and Adam Jackson's avatar Adam Jackson committed
      Querying the GLX_RENDER_TYPE of a GLX context via glXQueryContext will
      currently return the render type of the context's FB config, which is
      a bitmask of GLX_RGBA_BIT / GLX_COLOR_INDEX_BIT / ... values. However,
      this query should really return the render type that was specified
      when creating the context, which is one of GLX_RGBA_TYPE /
      GLX_COLOR_INDEX_TYPE / .... To enable this, save the render type when
      creating a new context (defaulting to GLX_RGBA_TYPE if unspecified),
      and then include this value in the context attributes sent to clients.
      95b79aa9
  5. 25 Nov, 2020 13 commits
  6. 24 Nov, 2020 1 commit
    • Jon Turney's avatar
      hw/xwin: Fix building with -fno-common · bb7aab6a
      Jon Turney authored
      Provide an actual definition of noDriExtension where used, rather than a
      tentative definition in a header, to fix compilation with -fno-common
      (the default with gcc 10).
      bb7aab6a
  7. 23 Nov, 2020 1 commit
  8. 19 Nov, 2020 1 commit
  9. 18 Nov, 2020 4 commits
    • Alan Coopersmith's avatar
      int10: wrap entire V_ADDR_R* macros in parens for safer expansion · e5386011
      Alan Coopersmith authored
      
      
      Resolves warnings from Oracle Parfait static analyser:
      
      Error: Misleading macro
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '|' operator has higher precedence than ternary '?:' operator inside macro body at line 431
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 431
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 442
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 442
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '|' operator has higher precedence than ternary '?:' operator inside macro body at line 443
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 441
         Misleading macro [misleading-macro]:
            misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
              at line 392 of hw/xfree86/int10/generic.c.
              '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443
              low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      e5386011
    • Alan Coopersmith's avatar
      xkb: always set *mask_rtrn in XkbVirtualModsToReal · a6574033
      Alan Coopersmith authored
      
      
      Resolves warning from Oracle Parfait static analyser:
      
      Error: Uninitialised memory
         Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
            Possible access to uninitialised memory referenced by variable 'mask'
              at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
              Path in callee avoiding write at line 720
                mask allocated at line 718
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      a6574033
    • Alan Coopersmith's avatar
      dmx: example code should set a good example · 034e7926
      Alan Coopersmith authored
      
      
      Resolves warning from Oracle Parfait static analyser:
      
      Error: Unchecked result
         Unchecked result [unchecked-result-call-X]:
            Unchecked return value from call to XOpenDisplay. Value display must be ch
      ecked to ensure this function was successful.
              at line 73 of hw/dmx/examples/xbell.c in function 'main'.
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      034e7926
    • Alan Coopersmith's avatar
      AddInputDevice: only need to check once if we failed to calloc dev · d00594eb
      Alan Coopersmith authored
      Resolves warning from Oracle Parfait static analyser:
      
      Warning: Impossible or redundant condition
         Impossible or redundant condition [impossible-redundant-condition]:
            Condition 'dev != NULL' of branch is determined by previous branch
              at line 270 of dix/devices.c in function 'AddInputDevice'.
                Condition 'dev != NULL' from this branch implies following branch is always true at line 262
      
      Fixes: commit 493ad833
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      d00594eb
  10. 17 Nov, 2020 7 commits
  11. 12 Nov, 2020 1 commit
  12. 10 Nov, 2020 3 commits
  13. 09 Nov, 2020 2 commits