Commit Graph

163 Commits

Author SHA1 Message Date
Jan Beich 1dd44c85e7
drm: add missing include to fix BSD (#15)
src/backend/Backend.cpp:317:13: error: use of undeclared identifier 'close'
  317 |             close(newFD);
      |             ^
src/backend/Backend.cpp:323:13: error: use of undeclared identifier 'close'
  323 |             close(newFD);
      |             ^
2024-07-16 11:53:20 +02:00
Ikalco db417a49e8
drm: handle monitor hotplugs and fix a few bugs that it revealed (#14)
* handle monitor hotplugs and fix a few bugs that it revealed

* fix cursorFB uaf and other stuf
2024-07-15 20:03:00 +02:00
Ikalco ad8261ba99
api: add getting monitor render formats (#13) 2024-07-14 11:06:13 +02:00
Vaxry 2efe4296f8 drm: fix build on 32b archs
fixes #5
2024-07-13 22:56:46 +02:00
Vaxry 8d73016db8 drm/renderer: use the duped fd for gl 2024-07-12 23:23:39 +02:00
Vaxry 5199868794 drm: reopen allocator node for mgpu 2024-07-12 21:25:53 +02:00
Vaxry 05219d5287 drm: reopen DRM node to avoid KMS refcounting issues 2024-07-12 20:53:11 +02:00
Vaxry 59fc21940d drm/renderer: properly save texture data in attachment 2024-07-12 17:31:28 +02:00
Vaxry 45bea6dab2 drm/renderer: support external rendering 2024-07-12 17:20:08 +02:00
Vaxry f3c6b673f9 drm: return render formats properly on mgpu 2024-07-12 16:46:26 +02:00
Vaxry 27008ef767 drm: avoid using unsupported modifiers for mgpu 2024-07-12 16:32:08 +02:00
UjinT34 815df06da2
gbm: Expose bo buffer mapping (#12)
* expose bo buffer mapping

* update comment

* implement endDataPtr to unmap gbm buffer
2024-07-12 15:59:47 +02:00
Vaxry 47d95b8a73 drm/renderer: log modifier in createEGLImage 2024-07-12 15:56:32 +02:00
Vaxry 13cf43497e drm: avoid crash on nullptr cursors 2024-07-12 15:52:23 +02:00
Vaxry 7bbdf32fb8 drm/renderer: handle external formats
shoutout nvidia...
2024-07-12 11:16:47 +02:00
Vaxry 996cc6f6a4 drm/atomic: fix gamma resetting
thanks @ikalco
2024-07-12 10:52:05 +02:00
Vaxry ee0dea62e2 drm/renderer: also use blitting for cursor planes 2024-07-12 10:48:59 +02:00
Vaxry 0faf47cf2f drm/atomic: fix dpms 2024-07-12 00:39:38 +02:00
Vaxry f485ad7546 drm: guard connector in calculateMode 2024-07-11 23:06:26 +02:00
Vaxry 4fd590af94 drm: fix synchronization on amd 2024-07-11 23:00:56 +02:00
Vaxry d619af4971 drm: better handle drm blits 2024-07-11 22:17:57 +02:00
Vaxry 46ce868cbb wayland: band-aid for frame scheduling
thanks @phonetic112
2024-07-11 20:54:23 +02:00
Vaxry c4a5fafe76 drm: properly blit multigpu surfaces 2024-07-11 20:41:57 +02:00
UjinT34 1ae9ead82c
drm: pass explicitOutFence pointer and do not touch the value (#10)
* pass explicitOutFence pointer and do not touch the value

* add resetExplicitFences
2024-07-11 16:13:44 +02:00
Vaxry d92d55d454 drm: handle mismatched formats in commit 2024-07-11 12:19:41 +02:00
Vaxry 965f429b29 drm: avoid crashes on non-existent modes in restoring after vt 2024-07-10 12:28:38 +02:00
Vaxry e3f2c0d5cc drm: split allocators per drm device 2024-07-09 14:10:52 +02:00
Vaxry dbace2b794 session: support setting the leds 2024-07-09 10:39:30 +02:00
Vaxry bd6da3bec6 drm: always rescan connectors after rechecking crtcs 2024-07-09 10:31:01 +02:00
Vaxry 05995dd21e drm: reset boHandles after freed in fb 2024-07-08 23:04:12 +02:00
Vaxry 3c118519e6 drm: reimport cursor fb on multigpu 2024-07-08 21:22:56 +02:00
Vaxry 157f067cf8 gbm: emit deestroy before destroying bo 2024-07-08 20:21:37 +02:00
UjinT34 0ce4b193cf
gbm: fix gbm buffer creation (#9) 2024-07-08 19:47:06 +02:00
Vaxry ef43e5174b drm: drop buffers from KMS on .destroy 2024-07-08 18:45:59 +02:00
Vaxry d69569698e drm: add log for rescan after alloc 2024-07-08 18:38:41 +02:00
Vaxry 5f9f0601c3 drm: fix log 2024-07-08 18:37:49 +02:00
Vaxry acba4aa037 drm: avoid sending state to non-existent outputs 2024-07-08 17:20:41 +02:00
Vaxry 42585b413d drm: do not assign many crtcs to single port 2024-07-08 17:20:18 +02:00
Vaxry 56e7659ad8 drm: recheck CRTCs after launch and reset 2024-07-08 15:57:16 +02:00
Vaxry dc1181a65e drm: fix epic string parsing fail 2024-07-07 23:19:11 +02:00
UjinT34 a473c5313d
output: add scheduleFrame reasons (#7) 2024-07-07 18:05:05 +02:00
Jan Beich 5d08afba5a Add missing headers for BSDs
src/allocator/GBM.cpp:137:17: error: use of undeclared identifier 'close'
  137 |                 close(attrs.fds.at(j));
      |                 ^
src/allocator/GBM.cpp:159:9: error: use of undeclared identifier 'close'
  159 |         close(attrs.fds.at(i));
      |         ^
src/backend/Session.cpp:141:5: error: use of undeclared identifier 'close'
  141 |     close(fd);
      |     ^
src/backend/Wayland.cpp:44:9: error: use of undeclared identifier 'close'
   44 |         close(fd);
      |         ^
src/backend/Wayland.cpp:63:9: error: use of undeclared identifier 'close'
   63 |         close(drmState.fd);
      |         ^
src/backend/Wayland.cpp:658:13: error: use of undeclared identifier 'close'
  658 |             close(fd);
      |             ^
src/backend/Wayland.cpp:668:13: error: use of undeclared identifier 'close'
  668 |             close(fd);
      |             ^
src/backend/Wayland.cpp:676:9: error: use of undeclared identifier 'close'
  676 |         close(fd);
      |         ^
2024-07-07 16:10:40 +03:00
Vaxry d8525fbd63 drm: check for timeline support for explicit sync 2024-07-06 17:45:47 +02:00
Vaxry 330c089cd8 drm: add support for explicit sync 2024-07-06 17:38:18 +02:00
Tom Englund 263cb161da
allocator: add missing virtual destructor (#3)
add missing virtual destructor to base class and free gbm device on
destruction of CGBMAllocator
2024-07-06 14:57:27 +02:00
Vaxry 29c415a4f5 drm: nullcheck output in reset 2024-07-06 11:30:47 +02:00
Vaxry ea92cba414 backends: set needsFrame for manually scheduled frames 2024-07-06 11:26:42 +02:00
Vaxry d048d1c644 drm: lease support 2024-07-05 19:21:40 +02:00
Tom Englund 2a3ff6a61d
formatutils: ensure we dont leak name ptr (#2)
store format name in a std::string and free the char ptr to ensure we
dont leak on each call to drmGetFormatName.
2024-07-05 15:18:44 +02:00
Vaxry c5cf93a3cc backends: fix needsFrame being stuck 2024-07-05 14:24:10 +02:00
Vaxry d3bacb4600 swapchain: add rollback 2024-07-04 23:13:23 +02:00
Vaxry 8d1d10397a drm: don't shift state on failed commits 2024-07-04 23:11:18 +02:00
Vaxry 205472bad7 drm: fix vrr checks 2024-07-04 15:33:46 +02:00
Vaxry f48653cf0e session: Tablet support
woo
2024-07-03 19:12:17 +02:00
Vaxry a0cfad9ec0 session: clear libinput devices before unrefing libinput
thanks @ikalco
2024-07-03 12:49:12 +02:00
Vaxry 4ca125d05a drm: set fbs on vt restore
thanks @ikalco
2024-07-02 23:06:03 +02:00
Vaxry 2f220d9301 logging: add AQ_TRACE for omitting trace logs 2024-07-02 14:42:24 +02:00
Vaxry 874183997f backend: idle fd improvements 2024-07-02 14:32:41 +02:00
Vaxry 20a99be9f4 drm: implement edid parsing 2024-07-02 13:15:56 +02:00
Vaxry 7e4ae2e226 drm/atomic: add support for gamma ramps 2024-07-02 12:41:32 +02:00
Vaxry 0eb28d40f0 drm: log vrr capabilities in connect 2024-07-02 12:11:54 +02:00
Vaxry d1e48322ed wayland: avoid leaving the swapchain null on late displays 2024-07-01 14:59:16 +02:00
Vaxry 13f94112aa core: allow specifying names for outputs 2024-07-01 14:52:50 +02:00
Vaxry 51cd6f4374 Headless: Add backend 2024-07-01 14:33:05 +02:00
Vaxry b8fc53e69d wayland: handle close events 2024-07-01 13:06:41 +02:00
Vaxry cef415f033 drm/legacy: avoid crashing on missing crtcs 2024-06-30 21:43:18 +02:00
Vaxry 25836ee88e drm: reset on beginning of DRM
We do not set atomic props for everything, so all else should be reset
2024-06-30 20:54:11 +02:00
Vaxry c19bf35c02 drm/backend: idle improvements and drm fixes 2024-06-30 19:04:14 +02:00
Vaxry a313f6f0e4 session: fix missing break in eventtype 2024-06-29 20:02:12 +02:00
Vaxry 3ffa774f12 drm: deny implicit modifiers for the cursor plane 2024-06-29 19:28:51 +02:00
Vaxry ffeea4bed2 gbm: attempt implicit buffers when modifiers fail 2024-06-29 19:26:04 +02:00
Vaxry 9c4bb5d2ea gbm: log modifiers 2024-06-29 18:22:23 +02:00
Vaxry d0b4e69eda libinput: fix invalid use of axis func 2024-06-29 18:20:08 +02:00
Vaxry c7fa62afe8 libinput: add switch support 2024-06-29 18:10:21 +02:00
Vaxry 84b936b21e libinput: implement gesture and touch 2024-06-29 15:10:34 +02:00
Vaxry 903f31ec58 drm: use a colon for separating device lists 2024-06-28 23:38:01 +02:00
Vaxry 57e100c802 drm: fix cursor being stuck invisible 2024-06-28 21:34:31 +02:00
Vaxry 320a6d40a7 drm: reimport buffers when on a secondary gpu 2024-06-28 21:21:40 +02:00
Vaxry 8ecf8773db drm: fix minor oopsie 2024-06-28 18:33:16 +02:00
Vaxry 9096cd0e8e drm: more logging, minor cleanups 2024-06-28 18:03:04 +02:00
Vaxry 0ffcb7fa74 backend: avoid out_of_range on iterating options 2024-06-28 17:35:43 +02:00
Vaxry 40f6fa5173 drm: very initial work on multigpu 2024-06-28 17:13:03 +02:00
Vaxry 944b0465fa drm: misc/atomic fixes
atomic: launches, but mode blobs are broken

fixed frame events being signaled too often
2024-06-28 14:02:56 +02:00
Vaxry 55ac96271f DRM: preliminary atomic support
doesn't fucking work yet
2024-06-27 21:48:23 +02:00
Vaxry 511600133c backend: rework event loop api 2024-06-27 00:07:59 +02:00
Vaxry 461d33583a drm: reject double-pf commits only with a buffer or when modesetting 2024-06-26 23:21:02 +02:00
Vaxry 25ee42673f backend: allow iterating impls 2024-06-26 22:35:14 +02:00
Vaxry f6d4c5e6a3 drm: prettify bitwise ops 2024-06-26 22:25:45 +02:00
Vaxry a03c2af877 drm: reject unimportable buffers early 2024-06-26 22:25:13 +02:00
Vaxry 13caeb2bd1 swapchain: improve default format guessing 2024-06-26 22:18:33 +02:00
Vaxry 3dbff4025c allocator: allow format-less allocations
will pick a format
2024-06-26 19:42:39 +02:00
Vaxry 41b1b28ce1 drm: Implement hardware cursors 2024-06-26 19:26:38 +02:00
Vaxry 0027280d27 drm: ignore crtc-less connectors in scanConnectors 2024-06-25 23:01:11 +02:00
Vaxry aa0c2157e8 drm: adjust drmfb storage 2024-06-25 20:30:00 +02:00
Vaxry 6cfa0652c8 backend: avoid crashing on session-less 2024-06-25 19:59:34 +02:00
Vaxry 70f4321a93 drm/legacy: fix crash on null mode commit 2024-06-25 18:34:44 +02:00
Vaxry c8c1e6ae3f session: fixup a few missing nullchecks 2024-06-25 18:09:53 +02:00
Vaxry 1e4fd47865 Session: Added support for pointers and keyboards
Via libinput, of course.
2024-06-25 17:59:47 +02:00
Vaxry 3e2fe425e4 session: add vt switching 2024-06-25 13:38:25 +02:00
Vaxry 917d48153a drm: fixes for hotplugging monitors and vt 2024-06-25 13:36:21 +02:00