Commit graph

127 commits

Author SHA1 Message Date
Tom Englund
b236a43699
drm: only scan connected connectors (#155)
only scan connected connectors when deciding which gpu to become primary
mux switched laptops still have connectors for internal panel but not
connected.
2025-03-04 14:58:38 +01:00
Lee Bousfield
7b5db3d8a2
drm: Add strict typing to attachment manager (#152)
* misc: Add strict typing to attachment manager

* misc: Trim down CAttachmentManager comments

* misc: Return full pointer in attachment manager
2025-03-02 22:32:33 +01:00
Lee Bousfield
09b3fd5932
drm: Fix multi-GPU support for Nvidia (#147)
* allocator: Don't force linear for multigpu if unsupported

* drm: Use an intermediate CPU buffer for blit if necessary

* drm: Add comment and cleanup style a bit

* drm: Fix formatting from comment addition

* drm: Use std::vector and std::span for intermediateBuf

* drm: Fix style and add null check

* drm: Remove TODO about pixel buf format
2025-03-02 03:07:00 +01:00
Ikalco
e62592f0f4
drm/atomic: fix atomic reset being skipped, check nullptr elsewhere instead (#149) 2025-02-27 15:21:05 +01:00
Ikalco
a3dda0d10c
drm: prioritize gpus with the most internal panels (#144) 2025-02-09 13:22:25 +01:00
Honkazel
343178ba45
core: Compiler fixes and options (#141)
* reorder ctors

* sign-compare

* Add some compile options from Hyprland
2025-02-02 13:46:00 +01:00
Ikalco
95506e561d
egl/drm: consolidate EGL init/state (#138)
* move renderer to EGLRenderer

* consolidate EGL state and initialization

* move over eglSync

* unbreak abi
2025-02-01 16:17:49 +01:00
Honkazel
4edeb99390
core: add clang-tidy (#135) 2025-01-22 22:39:30 +01:00
maround95
03677f8561
core: GPU hotplug support (#130) 2025-01-10 18:39:08 +00:00
UjinT34
c2369bc3ab
drm: Avoid excessive atomic properties updates (#95)
* do not set cursor planeProps unless smth changed

* do not skip cursor state flag setting

* 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.

* props: bump version to 0.5.0

* 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>

* buffer: remove useless forward def

* drm: clearer flow when rescanning connectors (#113)

* consolidates into checkOutput for clearer flow when rescanning connectors

* add error log

* drm: allow multigpu blit from explicit to implicit (#114)

* version: bump to 0.5.1

* flake.lock: update

* flake.nix: gcc13 -> gcc14 (#118)

* drm: udev scan only drm_minor, not connectors (#119)

* drm: log errno set by drmModeAtomicCommit (#120)

* drm: moved null check for renderer to shouldBlit() (#109) (#121)

* drm: only fail INVALID format when enabled (#122)

* flake.lock: update

* drm: only clear buffers when fullReconfigure succeeds (#124)

* core/drm: Add HDR Support (#112)

* version: bump to 0.6.0

* drm: limit udev drm_minor to Linux after a132fa41be (#129)

Not implemented by libudev-devd yet:

[ERR] [AQ] drm: No gpus in scanGPUs.
[ERR] [AQ] drm: Found no gpus to use, cannot continue
[ERR] [AQ] DRM Backend failed

* do not set cursor planeProps unless smth changed

* test separate cursor commits

* do not change hdr blob unless asked to

* rebase

* split atomic commit processing and move hdr & colorspace into modeset

* fix wide color gamut flag & cleanup

* remove unused debug var

---------

Signed-off-by: Yao Zi <ziyao@disroot.org>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Ziyao <ziyao@disroot.org>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
Co-authored-by: Richard Henninger <56615615+richen604@users.noreply.github.com>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
2025-01-10 18:38:51 +00:00
Jan Beich
5bc315ed56
drm: limit udev drm_minor to Linux after a132fa41be (#129)
Not implemented by libudev-devd yet:

[ERR] [AQ] drm: No gpus in scanGPUs.
[ERR] [AQ] drm: Found no gpus to use, cannot continue
[ERR] [AQ] DRM Backend failed
2025-01-07 11:35:34 +00:00
UjinT34
aeab812e0f
core/drm: Add HDR Support (#112) 2025-01-05 14:44:39 +00:00
Ikalco
5e3f6013e9
drm: only fail INVALID format when enabled (#122) 2024-12-21 23:14:38 +01:00
Richard Henninger
a23e9a9bdf
drm: moved null check for renderer to shouldBlit() (#109) (#121) 2024-12-18 16:01:56 +01:00
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
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
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
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
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
Ikalco
561f50bfae
drm: don't connect before crtcs are guaranteed (#68) 2024-08-29 15:51:04 +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
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
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
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
4f6642808b drm: avoid crashes on connecting a null crtc 2024-08-16 09:06:27 +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
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
6f5adc0568 drm: s
upport explicit sync with multi-gpu destinations

will break o
n mgpu nvidia before 560 driver
2024-08-05 00:27:09 +02:00
a70fc6a2fd drm: avoid testing with a pf event 2024-08-03 19:10:09 +02:00
18c6a8ccaf drm: immediately send presentation events for tearing 2024-08-03 18:23:24 +02:00
7c3565f9be drm: don't rollback cursors on test 2024-07-30 15:55:39 +02:00