Commit graph

193 commits

Author SHA1 Message Date
Ikalco
a132fa41be
drm: udev scan only drm_minor, not connectors (#119) 2024-12-17 02:58:49 +01:00
Ikalco
9fc2d8e1fb
drm: allow multigpu blit from explicit to implicit (#114) 2024-12-09 22:14:39 +01:00
Ikalco
1af9816244
drm: clearer flow when rescanning connectors (#113)
* consolidates into checkOutput for clearer flow when rescanning connectors

* add error log
2024-12-07 17:53:24 +01:00
Ziyao
4468981c1c
drm: Validate conn before dereference in CDRMAtomicRequest::commit() (#108)
During startup, CDRMAtomicImpl::reset() may emit a call to method
commit of a CDRMAtomicRequest instance with member "conn" uninitialized,
leading to a segfault. Validate the the pointer before dereference it as
a workaround.

Fixes: 55ac962 ("DRM: preliminary atomic support")
Closes: https://github.com/hyprwm/aquamarine/issues/107

Signed-off-by: Yao Zi <ziyao@disroot.org>
2024-11-18 19:43:51 +00:00
Tom Englund
3b00e96f90
drm: scan only cards and not outputs, safeguard against null renderer (#106)
* drm: dont scan card outputs

no need to scan for card[0-9]* and probe card0-eDP etc if they are kms,
bootvga and rendernodes etc. skip the wildcard and remove a unused
size_t variable.

* drm: dont commit state if renderer is missing

setting certain env vars to force egl implentations makes the render
creation fail on the second gpu. instead of causing a coredump,
safeguard commitState and let the monitor turn blank instead.
2024-11-13 11:10:16 +00:00
UjinT34
545f506a63
drm: fix fences according to spec (#105) 2024-11-11 21:29:19 +00:00
Vaxry
e6c392aa2c
DRM: Add a dumb allocator (#104)
Adds a drm_dumb allocator to the DRM allocator for nvidia hw cursors.
2024-11-11 13:04:23 +00:00
Maximilian Seidler
8d732fa8af
drm: guard cursorFB buffer in restoreAfterVT (#100) 2024-10-21 17:13:19 +01:00
Ikalco
7c1322da25
drm: fix leases not having a backend attached (#97) 2024-10-14 11:36:46 +01:00
Vaxry
d352c0dd98
DRM/Output: Implement CTM support (#92)
* flake.lock: update hyprutils

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-10-07 19:40:37 +01:00
b82fdaff91 wayland: log compositor name in startup 2024-09-25 11:45:04 +01:00
Maximilian Seidler
203fc0f4e4
headless: add a default mode for headless outputs (#87) 2024-09-24 20:09:40 +01:00
Vaxry
8b728612a9
Session: only dispatch udev in dispatchPendingEventsAsync if on linux (#86) 2024-09-24 00:48:00 +01:00
dawsers
dc399a37d3
gbm: fix modifier list not updating when renderable list is empty (#84) 2024-09-17 14:29:08 +01:00
9996d365ad gbm: don't select opaque pixel formats for cursor 2024-09-08 00:51:37 +01:00
Ikalco
a8eb8ae014
drm: add AQ_NO_MODIFIERS to try to mitigate hardware limitations (#77) 2024-09-06 01:00:39 +01:00
Ikalco
dd9890d2bc
drm: allow disabling commit, even if pageFlipPending (#72) 2024-09-01 19:48:15 +02:00
moetayuko
e12b0a9c67
gbm: override gbm_bo_get_modifier results for modifier-based allocation (#71)
Fixes https://github.com/hyprwm/Hyprland/issues/7577
2024-09-01 12:03:52 +02:00
16bbbcba65 wayland: send 1280x720 if w/h is 0 in configure 2024-08-31 14:02:08 +02:00
865cd94f97 gbm/drm: conform to different scanout requirements for different planes
ref https://github.com/hyprwm/Hyprland/issues/7005
2024-08-31 13:52:04 +02:00
b9ab839ab3 output: always emit a destroy event in ~dtor 2024-08-31 12:42:00 +02:00
Ikalco
561f50bfae
drm: don't connect before crtcs are guaranteed (#68) 2024-08-29 15:51:04 +02:00
23c7925dd3 gbm: improve automatic format selection 2024-08-28 15:01:37 +02:00
Tom Englund
7cc3d3179c
misc: make for loops const reference (#66)
we all like the dreams and prayers that compilers can optimize things
further with const.
2024-08-27 20:04:26 +02:00
Ikalco
abb3c81c59
drm: recheck crtcs before connecting on udev event (#65) 2024-08-26 20:36:16 +02:00
3989aa9b2f wayland: fix possible out-of-range crash in setCursor 2024-08-26 10:30:29 +02:00
Tom Englund
ddf6987b53
backend: dont overflow on 32bit builds (#64)
make the definition long long as its used as long long later, only the
value was being calculated TIMESPEC_NSEC_PER_SEC * 240 and rolls over
before assigning to the variable.
2024-08-25 17:48:53 +02:00
romanstingler
9a3161ad4c
drm: fix typo in schedule (#62)
Co-authored-by: Roman Stingler <roman.stingler@waterdrop.com>
2024-08-21 21:59:51 +01:00
Colt-M16A1
41d842669b
drm: request page flip events after commit (#60)
Apparently fixes stuff.
2024-08-21 20:36:34 +01:00
1c3256287c drm: verify output format in commit 2024-08-21 12:17:50 +02:00
2cd1f78241 GBM: fixup good() return value 2024-08-21 12:17:34 +02:00
Tom Englund
b02d4f4d72
output: avoid crashing on no crtc (#58)
dual gpus can init with no crtc and later rescan for them, however
getRenderFormats might be called before that happends and null ptr
deref, guard against it.
2024-08-20 20:10:13 +01:00
b474796cdb drm: reconfigure swapchain props after creating 2024-08-20 20:58:07 +02:00
1e43d9a719 gbm: improve trace logging around allocs 2024-08-20 19:09:03 +02:00
8079098326 drm: fix crash on null crtc setCursor
ref #54
2024-08-20 18:44:18 +02:00
696a5ad4ec gbm: guard for drm renderer being present before clearing
ref #56
2024-08-19 18:26:38 +02:00
Vaxry
2bff4a4521
drm: don't schedule new frame events on disabled outputs (#52)
* drm: don't schedule new frame events on disabled outputs

* e

* test
2024-08-18 19:24:52 +01:00
2d29c86d69 drm: use modelines in vt restore 2024-08-18 20:15:46 +02:00
Vaxry
71d49670fe
drm: clear buffer on creation for scanout DRM buffers (#51) 2024-08-17 19:42:51 +01:00
cd152140fd drm: don't report pointer capability when no HW cursor plane is present
ref https://github.com/hyprwm/Hyprland/issues/7364
2024-08-17 19:18:46 +02:00
Tom Englund
05f4efca81
buffer: align size to stride (#50)
calculate the size to the stride we get from gb_bo_map to better align
it.
2024-08-17 17:47:57 +01:00
4f6642808b drm: avoid crashes on connecting a null crtc 2024-08-16 09:06:27 +02:00
e947af7894 drm/atomic: clip damage to pixel size
ref https://github.com/hyprwm/Hyprland/issues/7356
2024-08-15 22:34:45 +02:00
Vaxry
589346162f DRM: Allow checking no-crtc connectors (#49) 2024-08-15 18:01:37 +02:00
daf96f0da7 drm: fixup modeline calculations 2024-08-09 19:20:25 +02:00
c94060b22c drm: log calculated modeline for custom modes 2024-08-09 19:06:34 +02:00
1a7ca38fa3 drm: fix custom mode check 2024-08-09 18:02:03 +02:00
Jan Beich
131ed05f99
drm: add missing include to fix BSD (#42)
src/backend/drm/Renderer.cpp:504:13: error: use of undeclared identifier 'close'
  504 |             close(dupFd);
      |             ^
src/backend/drm/Renderer.cpp:532:13: error: use of undeclared identifier 'close'
  532 |             close(egl.lastBlitSyncFD);
      |             ^
2024-08-06 22:06:30 +02:00
21f9c44789 drm: don't use explicit in blit without explicit requested from user 2024-08-06 13:19:53 +02:00
8a8afd3896 drm: add AQ_MGPU_NO_EXPLICIT 2024-08-05 16:42:03 +02:00