1. 01 Oct, 2022 11 commits
  2. 30 Sep, 2022 4 commits
    • Simon Ser's avatar
      render/vulkan: use addon for wlr_vk_texture · e4efb6b6
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Avoids having to walk the list of all textures.
      e4efb6b6
    • Simon Ser's avatar
      render/vulkan: use addon for wlr_vk_render_buffer · 7899b97d
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Avoids having to walk the list containing all of the render buffers.
      7899b97d
    • Simon Ser's avatar
      backend/drm: fix missing wlr_output_state.allow_artifacts · 651c876e
      Simon Ser authored
      Without allow_artifacts, applying the new state will fail because
      it requires ALLOW_MODESET.
      
      Fixes VT switch and disabling CRTCs.
      651c876e
    • Simon Ser's avatar
      output: add wlr_output_state.allow_artifacts · a0345f28
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      When starting up, the compositor might call wlr_output_set_mode()
      with a mode which is already the current one. wlroots will detect
      this and make the wlr_output_set_mode() call a no-op. During the
      next wlr_output_commit() call, wlroots will perform an atomic
      commit without the ALLOW_MODESET flag.
      
      This is an issue, because some drivers need ALLOW_MODESET even if
      the mode is the same. For instance, if the FB stride or modifier
      changed, some drivers require a modeset.
      
      Add a new flag "allow_artifacts" which is set when the compositor
      calls mode-setting functions. Use this flag to figure out whether
      we want to perform atomic commits with ALLOW_MODESET.
      
      (The name "allow_artifacts" is picked because ALLOW_MODESET is a
      misnomer, see [1].)
      
      [1]: https://patchwork.freedesktop.org/patch/505107/
      
      Closes: #3499
      a0345f28
  3. 25 Sep, 2022 1 commit
    • Rouven Czerwinski's avatar
      meson: update default options for libdrm · baf3fa27
      Rouven Czerwinski authored
      Libdrm now uses enabled/disabled/auto for the drivers, migrate to these
      new defaults.
      
      Error message from meson:
      
        wlroots| subprojects/wlroots/subprojects/libdrm/meson.build:21:0: Exception: Value "false" (of type "string") for combo option "Enable support for Intel's KMS API." is not one of the choices. Possible choices are (as string): "enabled", "disabled", "auto".`
      baf3fa27
  4. 23 Sep, 2022 1 commit
  5. 22 Sep, 2022 7 commits
    • Simon Ser's avatar
      screencopy-v1: use wlr_buffer APIs · c153ae3c
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Instead of using low-level wl_shm_buffer and wlr_dmabuf_v1_buffer
      APIs, use the unified wlr_buffer APIs. That way it doesn't matter
      what the exact wlr_buffer implementation is used, any which provides
      the necessary capabilities (data_ptr or dmabuf) would work.
      
      Simplifies the logic a bit, and will make the transition to wlr_shm
      easier.
      c153ae3c
    • Simon Ser's avatar
      screencopy-v1: rename wlr_screencopy_frame_v1.stride · f03da484
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Make it clear it's only about shm, not about DMA-BUFs.
      f03da484
    • Simon Ser's avatar
      screencopy-v1: use DRM format code for shm buffers · 77b829e1
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Will allow us to simplify common shm/DMA-BUF logic later on.
      77b829e1
    • Simon Ser's avatar
      screencopy-v1: rename wlr_screencopy_frame_v1.{format,fourcc} · 4885c08f
      Simon Ser authored and Simon Zeni's avatar Simon Zeni committed
      Make it clear that one is for shm buffers only, and the other is
      for DMA-BUF buffers only.
      4885c08f
    • John Lindgren's avatar
      backend/libinput: Fix SIGSEGV found in low-memory fuzzing · 2b767fe7
      John Lindgren authored
      Stack trace:
      
          #0  0x00007f17081f5b99 in wl_list_insert (list=list@entry=0x2d8, elm=elm@entry=0x7ffe7f7e85d0)
              at ../wayland-1.21.0/src/wayland-util.c:48
          #1  0x00007f17081f5f2e in wl_signal_emit_mutable (signal=signal@entry=0x2d8, data=data@entry=0x7ffe7f7e8660)
              at ../wayland-1.21.0/src/wayland-server.c:2167
          #2  0x00007f170815a971 in handle_switch_toggle (wlr_switch=0x2a0, event=0x55d5ba13dc00)
              at ../backend/libinput/switch.c:50
          #3  handle_libinput_event (event=0x55d5ba13dc00, backend=0x55d5b975d740) at ../backend/libinput/events.c:234
          #4  handle_libinput_readable (fd=<optimized out>, mask=<optimized out>, _backend=<optimized out>)
              at ../backend/libinput/backend.c:58
          #5  handle_libinput_readable (fd=fd@entry=34, mask=mask@entry=1, _backend=_backend@entry=0x55d5b975d740)
              at ../backend/libinput/backend.c:48
          #6  0x00007f170815c110 in backend_start (wlr_backend=0x55d5b975d740) at ../backend/libinput/backend.c:109
          #7  0x00007f1708160996 in multi_backend_start (wlr_backend=0x55d5b97583d0) at ../backend/multi/backend.c:32
      2b767fe7
    • Simon Ser's avatar
      0cabc830
    • Simon Ser's avatar
      output: add wlr_output_mode.picture_aspect_ratio · 2178573b
      Simon Ser authored
      CTA-861-H defines a picture aspect ratio which may be attached to
      each mode. This affects the way the sink will display the image.
      See annexes H.1 and H.2 for examples.
      2178573b
  6. 21 Sep, 2022 4 commits
    • John Lindgren's avatar
      cursor: Don't warp to (0,0) when last output is disconnected · 68c8cef3
      John Lindgren authored
      There doesn't appear to be any good reason to warp the cursor to
      the top-left corner when all outputs are disconnected; it's no more
      valid than any other (x,y) point in that case.
      
      The real-world case here is a user with a single external monitor
      turning it off (which apparently counts as disconnected depending
      on the connection type/hardware).  For that user, it's desirable to
      have the cursor remain in its original location when the monitor
      is turned back on.
      68c8cef3
    • John Lindgren's avatar
      cursor: Add a more general check for infinite/NaN cursor position · 5417a182
      John Lindgren authored
      It should be considered a bug if a compositor sets a non-finite
      cursor position, so fail loudly (in debug builds) if that happens.
      
      The existing check in wlr_cursor_warp_closest() is now redundant,
      and would silently hide such bugs, so remove it.
      5417a182
    • Simon Ser's avatar
      output: fix back buffer checks · 8e8b9a72
      Simon Ser authored
      The back buffer is no longer set at commit time since 0556aa0c
      ("output: rejigger attach/clear for back buffer").
      
      Instead, check whether the buffer belongs to the output swapchain.
      This is more robust.
      
      Closes: #3496
      8e8b9a72
    • Simon Ser's avatar
      backend/drm: de-duplicate wlr_drm_mode creation · 800ea7d5
      Simon Ser authored and Alexander Orzechowski's avatar Alexander Orzechowski committed
      Introduce a function to convert a drmModeModeInfo into a new
      wlr_drm_mode.
      800ea7d5
  7. 19 Sep, 2022 5 commits
  8. 18 Sep, 2022 1 commit
  9. 17 Sep, 2022 2 commits
  10. 16 Sep, 2022 4 commits
    • Simon Ser's avatar
      buffer: split into multiple files · 69c47717
      Simon Ser authored
      wlr_buffer.c is difficult to read because it contains a mixed bag
      of unrelated things: base buffer type, buffer implementations,
      buffer resource factory, and client buffer.
      
      Split each of these into their own file.
      69c47717
    • manuel alfayate's avatar
      Only set max_bpc when full modesetting is being done. · 4ffc97d1
      manuel alfayate authored and Simon Ser's avatar Simon Ser committed
      4ffc97d1
    • manuel alfayate's avatar
      Initialize connectors current mode to the mode used by KMS on startup. · 8795dde9
      manuel alfayate authored and Simon Ser's avatar Simon Ser committed
      8795dde9
    • John Lindgren's avatar
      wlr_drm_lease_v1: Fix use-after-free in backend_destroy() · 1facdeab
      John Lindgren authored
      valgrind said (on exit from labwc):
      
          Invalid write of size 8
             at 0x487DEAF: wl_list_remove (wayland-util.c:56)
             by 0x487DF80: wl_signal_emit_mutable (wayland-server.c:2182)
             by 0x48CD6B7: backend_destroy.part.0.lto_priv.0 (backend.c:41)
             by 0x48DC19D: multi_backend_destroy (backend.c:58)
             by 0x4880286: UnknownInlinedFun (wayland-server.c:2315)
             by 0x4880286: wl_display_destroy (wayland-server.c:1170)
             by 0x112491: UnknownInlinedFun (server.c:485)
             by 0x112491: main (main.c:110)
           Address 0x1f9d0210 is 112 bytes inside a block of size 136 free'd
             at 0x484426F: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
             by 0x487DF6D: wl_signal_emit_mutable (wayland-server.c:2179)
             by 0x48CD6B7: backend_destroy.part.0.lto_priv.0 (backend.c:41)
             by 0x48DC19D: multi_backend_destroy (backend.c:58)
             by 0x4880286: UnknownInlinedFun (wayland-server.c:2315)
             by 0x4880286: wl_display_destroy (wayland-server.c:1170)
             by 0x112491: UnknownInlinedFun (server.c:485)
             by 0x112491: main (main.c:110)
           Block was alloc'd at
             at 0x4846A73: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
             by 0x4918D4E: drm_lease_device_v1_create (wlr_drm_lease_v1.c:639)
             by 0x48D3B00: wlr_multi_for_each_backend (backend.c:249)
             by 0x49191D2: wlr_drm_lease_v1_manager_create (wlr_drm_lease_v1.c:706)
             by 0x111EE9: UnknownInlinedFun (server.c:384)
             by 0x111EE9: main (main.c:92)
      1facdeab