Simon Ser
a7ab8e7a1a
drm: plane_formats -> primary_formats
2021-07-28 19:26:31 +02:00
Simon Ser
94706f0f0e
drm: get_matching_mode -> find_mode
...
For consistency with find_connector.
2021-07-28 19:15:36 +02:00
Simon Ser
6c24e829ae
drm: fallback to any connector if none matches
2021-07-28 19:07:07 +02:00
Simon Ser
f15aafe478
drm: add drm_set_connector
2021-07-28 19:03:30 +02:00
Simon Ser
041c0dad1b
drm: add drm_set_crtc
2021-07-28 19:00:11 +02:00
Simon Ser
3cbf958680
drm: allow changes from portait mode to landscape
2021-07-28 18:46:48 +02:00
Simon Ser
1b4231e33b
drm: set needs_modeset in drm_set_mode
2021-07-28 18:44:36 +02:00
Simon Ser
a978c54fff
drm: stop recording drmModeModeInfo in state
2021-07-28 18:40:29 +02:00
Simon Ser
c9b8ff3854
drm: remove outdated TODO
2021-07-28 18:18:16 +02:00
Simon Ser
f1eb06d9b7
drm: add explicit needs_modeset flag
2021-07-28 18:17:07 +02:00
Simon Ser
802f01d16f
drm: give up the modeset on failure
...
Instead of being stuck when modesetting is not possible, rollback
the changes and give up.
2021-07-28 18:11:20 +02:00
Simon Ser
3ffd29c23a
drm: group current state
2021-07-28 18:09:52 +02:00
Simon Ser
24fe84c402
drm: reload our internal state on hotplug
2021-07-28 17:58:07 +02:00
Simon Ser
fae6bfc411
drm: refresh props after VT switch
2021-07-28 17:47:41 +02:00
Simon Ser
2b975d14af
drm: add CRTC state
...
This allows tracking whether we've previously disabled a CRTC.
2021-07-28 17:33:20 +02:00
Simon Ser
df6091a3b4
drm: de-duplicate drmModeGetProperty calls
...
A property can be attached to multiple objects.
2021-07-28 17:02:47 +02:00
Simon Ser
c0c005278c
rendervulkan: remake output images on resolution change
2021-07-28 16:50:45 +02:00
Simon Ser
590d7129aa
drm: add drm_set_resolution
...
Allows to easily switch the output resolution.
2021-07-28 16:40:51 +02:00
Simon Ser
d67ce2865e
wlserver: make global static
...
Let's prevent other threads from directly accessing it. Helper
functions can be introduced as needed.
2021-07-28 16:14:59 +02:00
Simon Ser
d79530d13b
steamcompmgr: fix error path on execvp failure
2021-07-28 15:00:58 +02:00
Simon Ser
7ff26668ab
rendervulkan: don't use global g_output.pScreenshotImage in BInit
2021-07-28 13:17:58 +02:00
Simon Ser
82c89fdff9
Log screenshot filename
2021-07-28 13:17:58 +02:00
Simon Ser
e678e0c0b2
sdlwindow: replace goto with bool flag
2021-07-28 13:17:58 +02:00
Simon Ser
f44db16b1b
Check wlserver_init return value
2021-07-27 16:45:31 +02:00
Simon Ser
c33ad217e1
Handle session switch events
...
Pause/resume our frame submission on VT switch.
Closes: https://github.com/Plagman/gamescope/issues/6
2021-07-27 14:11:00 +02:00
Simon Ser
cc309681e3
drm: add more logging for prepare failures
2021-07-27 13:58:22 +02:00
Simon Ser
e125a82914
Don't die on EACCES
...
EACCES is returned by the kernel when we're VT-switched away.
2021-07-27 13:54:47 +02:00
Simon Ser
43ba33425b
Open KMS device with wlr_session
...
This allows proper integration with logind/seatd. When switching
VTs, gamescope now dies with ENOPERM instead of making VT switching
freeze.
References: https://github.com/Plagman/gamescope/issues/6
2021-07-27 11:25:05 +02:00
Simon Ser
ba79953e4e
wlserver: strip wl_ prefix from fields, remove event loop FD
2021-07-27 10:46:03 +02:00
Simon Ser
5f638dd780
wlserver: add missing newline to error log
2021-07-27 10:31:34 +02:00
Simon Ser
f33b040ba7
Move steamcompmgr init out of wlserver
2021-07-27 10:30:14 +02:00
Simon Ser
0f0489b455
wlserver: wait for Xwayland to be ready in wlserver_init
...
We''l be able to move some init bits out of wlserver with this.
2021-07-27 10:25:56 +02:00
Simon Ser
25b036a2d6
drm: simplify add_{connector,crtc,plane}_property
2021-07-26 12:17:55 +02:00
Simon Ser
fc31fcf359
drm: atomically disable CRTCs
2021-07-26 11:46:40 +02:00
Simon Ser
5c6ab5a730
drm: ignore page-flip events on other CRTCs
2021-07-26 11:46:40 +02:00
Simon Ser
d5d3efe303
drm: add missing newline in debug log message
2021-07-26 11:38:42 +02:00
Simon Ser
999673e56b
drm: print human-readable error string on commit failure
2021-07-26 11:36:12 +02:00
Simon Ser
35a0eff0c4
drm: log flipcount in drm_atomic_commit if logs are enabled
2021-07-26 11:32:59 +02:00
Simon Ser
da58d14dda
drm: log flipcount as integer in page_flip_handler
2021-07-26 11:31:16 +02:00
Simon Ser
5fedd45d2f
Switch to poll
...
epoll doesn't offer any benefit for our use-case. select is old.
Let's just make things consistent and use the portable poll
everywhere.
2021-07-25 20:42:16 +02:00
Simon Ser
9a6b72f712
rendervulkan: document bNeedsSwizzle
2021-07-25 19:59:37 +02:00
Simon Ser
c9e8634e13
rendervulkan: add back VK_FORMAT_R8G8B8A8_UNORM
...
This format is used for the cursor. Regressed by 8b70637998
("Use
VK_FORMAT_B8G8R8A8_UNORM no swizzle for DRM_FORMAT_ARGB8888").
gamescope: ../src/rendervulkan.cpp:369: bool CVulkanTexture::BInit(uint32_t, uint32_t, VkFormat, CVulkanTexture::createFlags, wlr_dmabuf_attributes*): Assertion drmFormat != DRM_FORMAT_INVALID' failed.
2021-07-25 19:55:06 +02:00
Simon Ser
5d12da3d22
drm: fetch formats for all planes
...
We were stopping at the primary plane, but we can also scanout
on the overlay planes.
2021-07-25 19:49:26 +02:00
Simon Ser
8828f7218b
drm: log selected connector
2021-07-24 12:28:49 +02:00
Joshua Ashton
8b70637998
Use VK_FORMAT_B8G8R8A8_UNORM no swizzle for DRM_FORMAT_ARGB8888
...
We use this as an input not as the output so we can just use the DRM format as this exactly with no swizzle.
This format is guaranteed to be supported.
2021-07-23 16:33:22 +02:00
Joshua Ashton
860f4d6384
Use VK_FORMAT_R8G8B8A8_UNORM for DRM ARGB formats
...
DRM formats are not endian-dependent, therefore we should not use the PACK32 formats for this.
2021-07-23 16:33:22 +02:00
Simon Ser
7a55cb80b9
drm: sort mode list for all connectors
...
We'll add multi-output support in the future, so we'll need to pick
a mode for an arbitrary connector.
2021-07-22 16:56:19 +02:00
Simon Ser
e5e0ebf5a4
drm: allow selecting a connector via -O
...
References: https://github.com/Plagman/gamescope/issues/211
2021-07-22 16:50:16 +02:00
Simon Ser
52063b3858
wlserver: improve wlr_session_create error handling
2021-07-22 15:09:10 +02:00
Simon Ser
96346bd5f1
wlserver: remove unnecessary wlr_backend_is_headless check
...
A headless backend will always pass this check.
2021-07-22 15:01:09 +02:00