Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
329 commits
Select commit Hold shift + click to select a range
d2007d7
types/color_representation: correctly cleanup in manager create
asterwyx Jul 18, 2025
ccec411
types/color_management: check on invalid image description
asterwyx Jul 20, 2025
80c7e0f
ext-image-capture-source: output: Apply transform to cursor
any1 Jul 23, 2025
be5e266
cursor: update output cursor even if output is disabled
Jul 23, 2025
efb1798
ext_image_capture_source_v1: remove unused struct definition
wineee Jul 21, 2025
db5e9ca
meson: bump minimum wayland-protocols version
llyyr Jul 21, 2025
47a90d6
color_management_v1: add helpers to convert TF/primaries enums
emersion Jun 18, 2025
2f2c0df
scene: use helpers to convert TF/primaries enums
emersion Jun 18, 2025
1beb25a
tinywl: fix cursor disappears when focused window is closed
qaqland Jul 22, 2025
51a78cb
color_management_v1: set output color properties
kode54 Jul 27, 2025
c8b7600
wlr_ext_data_control_v1: Make all listeners private
wineee Jul 30, 2025
dd3c63f
color-representation-v1: Fix missing destroy signal init
kode54 Jul 31, 2025
1231641
ext_image_capture_source_v1: advertise fallback {A,X}RGB8888 formats
emersion Jul 31, 2025
07e92fb
output/cursor: Fix double cursor bug
DelusionalLogic Aug 5, 2025
7392b33
backend, output: send commit events after applying all in wlr_backend…
emersion Aug 12, 2025
812675b
fixes: add implementation
vyivel May 12, 2024
ad1b2f2
Avoid including generated headers publicly where possible
vyivel May 20, 2025
bb1f867
compositor: use wl_resource_post_error_vargs()
vyivel Aug 9, 2024
7431d84
color-management-v1: handle inert outputs in get_output
emersion Aug 18, 2025
b0c886e
render/allocator/gbm: insert buffer after export gbm bo
Aug 25, 2025
7bf5ff4
wlr_xdg_toplevel_icon_v1: check the correct resource
Aug 27, 2025
bbd9a49
tinywl: stop generating xdg-shell header
emersion Aug 16, 2025
1a18e47
render/vulkan: fix VkPushConstantRange for wlr_vk_frag_texture_pcr_data
emersion Aug 16, 2025
e95117b
render/vulkan: remove hardcoded counts
emersion Aug 16, 2025
b799ffc
docs: deprecate legacy wlr_data_control_v1 interface
wineee Jul 30, 2025
122310a
build: add wayland-protocols to dependencies array
emersion Aug 16, 2025
423afc3
types: deprecate wlr-screencopy-unstable-v1
bl4ckb0ne Aug 27, 2025
0166fd9
drm-lease-v1: remove connector active_lease & lease connectors
bl4ckb0ne Jul 4, 2025
06aacb2
input-method: rename input_method event to new_input_method
tokyo4j Jul 6, 2025
102a6bd
input-method: use `NULL` when emitting signals
tokyo4j Jul 6, 2025
905465b
color-representation-v1: Actually set supported_*_len
cillian64 Sep 9, 2025
cdd2c7e
protocols: sync with wlr-protocols, apply non-breaking updates and do…
wineee Aug 5, 2025
5e5842c
drm_lease_v1: initialize device resource link during abnormal exit
Aug 30, 2025
fd069ad
output/cursor: fix missing second cursor
emersion Aug 7, 2025
b62c687
scene/surface: simplify single-pixel-buffer check in surface_reconfig…
emersion Aug 3, 2025
bd56622
scene/surface: fix NULL deref when source buffer is destroyed
emersion Aug 3, 2025
462046f
cursor: use source buffer to signal release timeline point
emersion Aug 3, 2025
d7ae9a8
xwayland: fix assertion failure in wlr_xwayland_shell_v1
zccrs Sep 15, 2025
dd7f543
render/vulkan: Handle multi-descriptor sets
kennylevinsen Sep 8, 2025
54374b6
render/vulkan: rename plain to two_pass
emersion Jun 21, 2025
7f6d66e
render/vulkan: use sRGB image view when color transform is set
emersion Jun 21, 2025
6fee362
render/vulkan: rename vulkan_setup_srgb_framebuffer() for linear
emersion Jun 21, 2025
a91f96b
render/vulkan: introduce wlr_vk_render_buffer_out
emersion Jun 21, 2025
35eba5f
render/vulkan: add wlr_vk_render_pass.render_setup
emersion Jun 21, 2025
b2d09cd
render/vulkan: add wlr_vk_render_pass.render_buffer_out
emersion Jun 21, 2025
3e88a79
render/vulkan: replace wlr_vk_render_pass.srgb_pathway with two_pass
emersion Jun 21, 2025
d1c88e9
render/vulkan: add linear single-subpass
emersion Jun 21, 2025
aaf82ee
wlr_drag: drag motion signal also needs to be sent
Aug 7, 2025
108d94f
Add release script
emersion Sep 21, 2025
845a7a5
color_management_v1: drop duplicated enum converters
emersion Jul 29, 2025
138210f
color_management_v1: make from_wlr enum converters public
emersion Jul 29, 2025
26c1476
color_management_v1: add destroy event to manager
emersion Jul 29, 2025
7cb3393
scene: send color_management_v1 surface feedback
emersion Jul 29, 2025
60d7272
render/color: fix bounds check in lut_1d_get()
emersion Sep 30, 2025
3f0d338
backend/wayland: log when getting disconnected from remote display
emersion Jun 26, 2023
d039ad8
backend/wayland: continue reading on hangup
emersion Jun 26, 2023
2ec4012
backend/drm: avoid error message when EDID is missing
emersion Oct 1, 2025
406aa5f
backend/session: fix crash on udev device remove event
emersion Oct 1, 2025
dde07b6
wlr_scene: fix tf/prim comparison for scanout attempt
llyyr Oct 2, 2025
2252854
wlr_scene: return scene_direct_scanout_result instead of bool
llyyr Oct 2, 2025
6978509
Revert "wlr_scene: fix tf/prim comparison for scanout attempt"
emersion Oct 3, 2025
c2d9ae2
render: introduce Gamma 2.2 color transform
poisotf Aug 17, 2025
d8fb7ad
scene, render: use Gamma 2.2 TF as default
poisotf Aug 17, 2025
6e1c874
render: introduce bt.1886 transfer function
llyyr Oct 4, 2025
5529aae
wlr_scene: fix direct scanout for gamma2.2 buffers
llyyr Oct 5, 2025
03e7966
ci: fix VKMS lookup after faux bus migration
emersion Oct 16, 2025
0627510
input-method-v2: Destroy keyboard grab before input method
sahinf Oct 10, 2025
19c5d22
util/box.c: use 1/256 instead of 1/65536 in wlr_box_closest_point()
tokyo4j Sep 23, 2025
6d63871
linux_drm_syncobj_v1: fix use-after-free in surface_commit_destroy()
emersion Oct 16, 2025
d786e07
backend/session: use device `boot_display`
sahinf Oct 14, 2025
3d36ab9
render/color: add wlr_color_transform_eval()
emersion Jun 15, 2025
0b58bdd
render/color: add wlr_color_transform_pipeline
emersion Jun 15, 2025
74ce6c2
output: check for color transform no-op changes
emersion Jun 23, 2025
91f4890
gamma_control_v1: add wlr_gamma_control_v1_get_color_transform()
emersion Jul 2, 2025
3e08e3b
gamma_control_v1: introduce fallback_gamma_size
emersion Oct 5, 2025
989cffe
scene: add software fallback for gamma LUT
emersion Oct 5, 2025
879243e
xwm: Fix double-close
cillian64 Oct 20, 2025
604fcdb
render/vulkan: clip negative values before applying transfer function
llyyr Oct 6, 2025
47d0a90
types/wlr_input_device: name maybe NULL
Nov 4, 2025
8f7d763
drm: save edid color characteristics in wlr_output
poisotf Oct 28, 2025
aef84f0
wlr_virtual_pointer: Set axis source on all axis
David96 Feb 2, 2025
0d24cdb
cursor: apply output image description when preparing texture
poisotf Nov 10, 2025
378a491
render/color: turn enum wlr_color_encoding into a bitfield
emersion Oct 28, 2025
2a87ec8
render: add color encoding and range to wlr_render_texture_options
emersion Oct 28, 2025
fecaf6d
render/vulkan: add suport for color encoding and range
emersion Oct 28, 2025
e8f9e9e
color_representation_v1: make supported_alpha_modes const
emersion Oct 28, 2025
2fbc0b5
scene: add support for color encoding and range
emersion Oct 28, 2025
87c3cb5
scene: add support for color-representation-v1 coeffs and range
emersion Oct 28, 2025
fa7b66b
color_representation_v1: add helper to create global from renderer
emersion Oct 28, 2025
106f0f9
output/state: add missing unref for color_transform
poisotf Nov 14, 2025
b989047
render/vulkan: fix single-pass linear path
poisotf Nov 22, 2025
bd86126
input-method-unstable-v2: There are no enable / disable events
agx Nov 22, 2025
9b9d7d8
input-method-unstable-v2: surrounding text sends surrounding text
agx Nov 22, 2025
17f3f28
render/color: add wlr_color_primaries_transform_absolute_colorimetric
poisotf Nov 1, 2025
2995f31
render/color: introduce wlr_color_transform_matrix
emersion Oct 28, 2025
2cac711
render/vulkan: apply "matrix" color transforms in shader
poisotf Nov 2, 2025
fdb473e
scene: always apply user gamma after scene color transform
poisotf Nov 21, 2025
3d3d5fb
render: remove buffer primaries from pass options
poisotf Nov 12, 2025
7101a69
scene: don't rebuild color transforms each frame
poisotf Nov 12, 2025
811765f
output: don't rebuild cursor color transform for each update
poisotf Nov 23, 2025
abf80b5
wlr-foreign-toplevel: avoid wl_resource_find_for_client()
tokyo4j Nov 24, 2025
4748654
Add "const" to eliminate "error: initialization discards ‘const’ qual…
rxguy Dec 4, 2025
c45b3b1
color_representation_v1: don't leak supported_* on display destroy
llyyr Dec 4, 2025
a962d58
render/color: make wlr_color_primaries_from_named public
poisotf Dec 5, 2025
bf94524
render/vulkan: normalize luminance range in bt.1886 formula
llyyr Dec 4, 2025
03b465f
drag: destroy data source on touch_up
ammen99 Aug 20, 2022
0e9c6dd
seat: add wlr_seat_touch_notify_clear_focus
ammen99 Dec 4, 2025
ba93102
Add wlr_version_get_{major,minor,micro}()
tokyo4j Jul 6, 2025
9b4d9ea
color_management_v1: add helpers to get supported TFs/primaries
emersion Jun 18, 2025
322291c
tinywl: fix duplicate object files passed to linker
emersion Dec 18, 2025
c0b93a9
render/pixman: add support for ABGR16161616
emersion Nov 20, 2025
3d8c471
color_management_v1: add BT.1886 to TF-from-renderer helper
emersion Dec 18, 2025
32d5fc1
render/color: introduce color_transform_compose
poisotf Nov 28, 2025
450d90a
render/color: assert that wlr_color_transform_pipeline contains no NULLs
poisotf Nov 28, 2025
0ad8395
backend/session: respond to event hangup or error
Dec 17, 2025
16cb509
render/allocator: add missing wlr_buffer_finish() in destroy impls
jlindgren90 Dec 20, 2025
9119b8a
session: simplify libudev unref handling
Dec 22, 2025
8611aa8
scene: don't assign outputs to invisible nodes
emersion Dec 28, 2025
53cdceb
scene: constify pixman_region32_t
emersion Dec 28, 2025
d512c00
render: add new 16- and 32-bits-per-component pixel formats
emersion Nov 20, 2025
1723f85
render/gles2: add BGR161616F and BGR161616
emersion Nov 20, 2025
ca8b49d
render/vulkan: add new 16- and 32-bits-per-component pixel formats
emersion Nov 20, 2025
3f9a164
scene: keep last preferred configuration when leaving last output
emersion Jan 3, 2026
caed9d7
render: drop <linux/dma-buf.h> compat defines
emersion Jan 1, 2026
2699b68
ext_image_capture_source_v1/scene: fix stop for parallel captures
emersion Dec 28, 2025
b094f8a
scene/surface: don't cache frame pacing output
emersion Dec 30, 2025
2c64b30
scene: add knob to turn off Xwayland surface restacking
emersion Jul 8, 2025
89c9ef6
render/gles2: skip glslang check when shaders are unchanged
emersion Jan 3, 2026
98733c9
xcursor: add shared helper to create a wlr_xcursor_image
emersion Jan 4, 2026
d7f7b68
xcursor: introduce wlr_xcursor_image_get_buffer()
emersion Jan 4, 2026
53d75a4
cursor: use wlr_xcursor_image_get_buffer()
emersion Jan 4, 2026
84d603a
xwayland: take wlr_buffer in wlr_xwayland_set_cursor()
emersion Jan 4, 2026
6ae54dc
xwayland: lock new buffer instead of the old one
llyyr Jan 5, 2026
f93865e
ext_image_copy_capture_v1: replace schedule_frame with request_frame
emersion Jan 4, 2026
368dcfb
ext_image_capture_source_v1: wait for capture client before sending f…
emersion Jan 4, 2026
3b9f599
wlr_ext_image_copy_capture_v1: new_session event
pmkap Jan 3, 2026
4957646
image_capture_source: wlr_output_try_from_ext_image_capture_source_v1()
pmkap Jan 5, 2026
edc12e8
wlr_scene: Make restack_xwayland_surface_below generic
Nefsen402 Jan 7, 2026
56eb27a
wlr_scene: Don't recurse when disabling scene node if a child is alre…
Nefsen402 Jan 7, 2026
ef19f52
wlr_scene: Update outputs when node is disabled
Nefsen402 Jan 7, 2026
ed7b633
wlr_scene: Only do disable cleanup when explicit damage is given
Nefsen402 Jan 7, 2026
1f0fb95
wlr_scene: Add documentation to scene_node_update()
Nefsen402 Jan 8, 2026
ba76d37
wlr_ext_image_copy_capture_v1: Fix segmentation fault when using curs…
Molytho Jan 12, 2026
f735439
xwayland: add set_size_hints signal
ifreund Jan 15, 2026
b7312b4
xwm: don't leak msg in case of realloc failure
Lompik Jan 18, 2026
3eb07b1
backend/libinput: expose libinput_tablet_tool
jp7677 Jan 19, 2026
91c08d5
xwayland/selection/dnd: fix parameter type
Jan 20, 2026
5661ac1
output-swapchain-manager: Reject zero resolution
kennylevinsen Jan 22, 2026
e6ddb6c
meson: bump minimum wayland-protocols version
poisotf Dec 27, 2025
58f0867
color_management_v1: relax restrictions on maxCLL and maxFALL
poisotf Dec 27, 2025
bb882e9
color_management_v1: use 64bit image description identities
poisotf Dec 27, 2025
68052f3
color_management_v1: new enum value for 'srgb' transfer function
poisotf Dec 27, 2025
5a40da7
render: don't infer luminance multipliers from color TF
poisotf Jan 11, 2026
5e32b66
ext_image_copy_capture_v1: Only render scene source on damage
kennylevinsen Jan 15, 2026
82d5ffb
ext-workspace-v1: add implementation
tokyo4j Jul 13, 2025
d6c7a16
color_representation_v1: send chroma_location protocol error
emersion Nov 23, 2025
4477ca7
build: bump version to 0.20.0-rc1
emersion Feb 1, 2026
7f87e25
render/drm_syncobj: drop unnecessary drmSyncobjTimelineWait() arg
Feb 2, 2026
12c9502
render/drm_syncobj: fix function name in drmSyncobjTimelineWait() err…
Feb 2, 2026
4fe51aa
types: Simplify wlr_keyboard_group_destroy
wineee Jan 31, 2026
98196bb
wlr_cursor: add comments for signal parameters
wineee Feb 3, 2026
7cb4e30
wlr_cursor: fix event type in handle_tablet_tool_button
wineee Feb 3, 2026
90f9f59
xwayland: try flushing immediately in xwm_schedule_flush()
emersion Feb 3, 2026
d362ed1
xwayland: fix wl_array rollback when adding selection targets
zzxyb Feb 4, 2026
bc11ac9
ext_image_capture_source_v1: remove unused variable
wineee Feb 6, 2026
dfccf5f
output/cursor: fix missing newline at end of file
zzxyb Feb 6, 2026
19d6829
render/pixel-format: add function to determine YCbCr from drm fourcc
Jan 31, 2026
4c81cb1
vulkan: make use of new pixel_format_is_ycbcr function
Jan 31, 2026
439985f
color_representation: ensure encoding/range/drm formats compatibility
Jan 31, 2026
bb78861
color-representation: add support for identity+full
Jan 31, 2026
ef88246
types/wlr_buffer: add buffer_get_drm_format helper function
Feb 5, 2026
436bcf9
color-representation-v1: fix condition in surface commit
Feb 7, 2026
c1452d8
backend/libinput: fix build with libinput 1.31
alebastr Feb 8, 2026
3676ab4
backend/libinput: add support for LIBINPUT_SWITCH_KEYPAD_SLIDE
alebastr Feb 8, 2026
910fd26
build: bump version to 0.20.0-rc2
emersion Feb 12, 2026
25f94c5
backend/x11: reject shm buffers with non-min strides
ifreund Feb 13, 2026
884d29e
backend/libinput: guard against new enum entries
emersion Feb 12, 2026
1efb216
backend/drm: Close non-master drm fd on failure
kennylevinsen Feb 19, 2026
25bec59
CONTRIBUTING.md: update git host
Feb 19, 2026
7be5e36
build: bump version to 0.20.0-rc3
emersion Feb 22, 2026
a6e5807
render/vulkan: introduce buffer_import_sync_file()
emersion Feb 14, 2026
73bbad8
render/vulkan: take render pass in vulkan_sync_render_buffer()
emersion Feb 14, 2026
43b37e3
render/vulkan: fix missing DMA-BUF implicit read fence for textures
emersion Feb 14, 2026
ff4ce12
render/vulkan: introduce buffer_export_sync_file()
emersion Feb 14, 2026
8c8d636
render/vulkan: add "acquire" to vulkan_sync_foreign_texture()
emersion Feb 14, 2026
2367d78
render/vulkan: fix missing DMA-BUF implicit write fence for render bu…
emersion Feb 14, 2026
1ce992d
scene/layer_shell_v1: Add support for exclusive_edge
kennylevinsen Feb 24, 2026
6d9aa17
treewide: fix typos
diegoviola Feb 28, 2026
a55b85e
xwayland: fix memory leak on pipe() failure
wyu71 Mar 3, 2026
55bb69e
render/gles: use optimized clears for unblended rects
zzxyb Feb 6, 2026
1b8c3ea
screencopy: simplify capture error handling
Mar 4, 2026
2d39166
build: bump version to 0.20.0-rc4
emersion Mar 5, 2026
e444836
image_capture_source/output: Update constraints on enable
any1 Mar 5, 2026
557fde4
ci: update dalligi upstream repo
bl4ckb0ne Mar 6, 2026
3105ac2
scene: fix color format compare
kode54 Mar 7, 2026
ec26eb2
util/box: Use integer min/max for intersection
kennylevinsen Feb 26, 2026
af228b8
backend/x11: ignore DestroyNotify events
marler8997 Mar 11, 2026
b727521
wlr-export-dmabuf-unstable-v1: fix typo
diegoviola Mar 9, 2026
9c3bfbe
scene: avoid redundant wl_surface.enter/leave events
ifreund Mar 13, 2026
ba32abb
scene: use wl_list_for_each_safe to iterate outputs
llyyr Mar 13, 2026
47a43e1
wlr_ext_image_copy_capture_v1: Fix crash when client creates a cursor…
soreau Mar 12, 2026
6a90223
virtual-keyboard: add wlr_virtual_keyboard_v1_from_resource()
ifreund Mar 17, 2026
88718e8
virtual-keyboard: handle seat destroy
ifreund Mar 17, 2026
c4ff394
render/drm_syncobj: add wlr_drm_syncobj_timeline_signal()
poisotf Jan 31, 2025
2f14845
scene: add buffer release point to 'sample' event
poisotf Jan 31, 2025
288ba9e
drm/syncobj: add timeline point merger utility
poisotf Jan 31, 2025
52564ea
linux_drm_syncobj_v1: add release point accumulation
poisotf Mar 12, 2026
8daba32
scene: transfer sample syncobj to client timeline
poisotf Jan 31, 2025
eff5aa5
backend/drm: properly delay syncobj signalling
poisotf Jan 31, 2025
df1539d
output/drm: don't use OUT_FENCE_PTR
poisotf Mar 14, 2025
bba38a0
build: bump version to 0.20.0-rc5
emersion Mar 19, 2026
ad82740
color_management_v1: use early continue in surface loop
emersion Mar 13, 2026
1a9b129
color_management_v1: ignore surface update if no-op
emersion Mar 13, 2026
2bfbec4
linux_drm_syncobj_v1: fix handling of empty first commit
poisotf Mar 20, 2026
a945fd8
render/vulkan: compile against vulkan 1.2 header
bl4ckb0ne Mar 24, 2026
c1d3853
build: bump version to 0.20.0
emersion Mar 26, 2026
7610326
ext_image_capture_source_v1/scene: fix extents
ifreund Mar 30, 2026
13bac74
toplevel_capture: allocate new_request argument on the stack
Apr 3, 2026
d0fbe1c
wlr-foreign-toplevel-management: add new toplevels to end of list
tokyo4j Apr 11, 2026
61ed450
ext-foreign-toplevel-list: add new toplevels to end of list
tokyo4j Apr 11, 2026
b9ca8fd
wlr_ext_workspace_v1.c: add new workspaces to end of list
johanmalm Apr 11, 2026
7310756
wlr_virtual_keyboard_v1: specify size when creating keymap
emersion Apr 6, 2026
5d2172b
render/pixman: fix bilinear filtering to match gles2 renderer
Apr 1, 2026
1688cfb
keyboard: fix modifiers event when no keymap set
ifreund Mar 30, 2026
a8b8837
scene/surface: schedule on frame pacing output
Apr 12, 2026
b23a3e8
wlr_compositor: Apply state before updating surface_damage
kennylevinsen Mar 28, 2026
ac378ce
linux_drm_syncobj_v1: fix memory leak
May 8, 2026
9d3ec64
scene: only send leave events to outputs with matching scene root
rpigott Mar 27, 2026
a7f2006
build: bump version to 0.20.1
emersion May 19, 2026
d5208fa
xwayland/selection: stop using VLAs for MIME type atom lists
emersion May 21, 2026
8ca360b
xwayland: use const pointers for xcb_get_property_value()
emersion May 21, 2026
4412992
xwayland/xwm: fix out-of-bounds strndup() in read_surface_class()
emersion May 21, 2026
9d4fc33
xwayland/xwm: pluralize array variable in read_surface_net_wm_state()
emersion May 21, 2026
1aac997
xwayland: stop using xcb_get_property_reply_t.value_len
emersion May 21, 2026
f0a04a1
xwayland/xwm: align WL_SURFACE_ID error message with WL_SURFACE_SERIAL
emersion May 22, 2026
9092019
xwayland/xwm: expand comment about WL_SURFACE_ID event ordering
emersion May 22, 2026
94e6278
xwayland/xwm: check whether surface is already associated for WL_SURF…
emersion May 22, 2026
2bacd74
xwayland/xwm: check object type in xwm_handle_surface_id_message()
emersion May 22, 2026
5af4343
xwayland/xwm: check WM_TRANSIENT_FOR length
emersion Jun 11, 2026
9843c7f
xwayland: emit set_parent signal when parent is destroyed
wineee Jun 2, 2026
c484b94
scene: don't send new dmabuf feedback after node disable
poisotf May 22, 2026
06e2d21
drag: check dnd action and accepted on touch up
Jun 16, 2026
08921dd
xwayland:use size of the pointed type instead of pointer
Jun 20, 2026
eb02e65
scene: intersect visible area with output layout in update_node_updat…
emersion Jun 28, 2026
d9cd649
security_context_v1: set CLOEXEC for client FDs
emersion Jul 3, 2026
d783533
build: bump version to 0.20.2
emersion Jul 7, 2026
39bc5ca
Merge commit 'd783533489e1f75d6886c2ab5c5960090ef268f8' into new
zzxyb Aug 4, 2026
5663c78
fix(wlroots): define HAVE_LINUX_SYNC_FILE for CMake builds
zzxyb Aug 4, 2026
51cb546
fix(qwlroots): guard wlroots C99 array parameters in C++ headers
zzxyb Aug 4, 2026
aaf2feb
feat(wlroots): upgrade vendored wlroots to 0.20.2
zzxyb Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/wlroots/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ don't, however, allow me to make a suggestion: feature branches pulled from
upstream. Try this:

1. Fork wlroots
2. `git clone git@gitlab.freedesktop.org:<username>/wlroots.git && cd wlroots`
2. `git clone git@ssh.gitlab.freedesktop.org:<username>/wlroots.git && cd wlroots`
3. `git remote add upstream https://gitlab.freedesktop.org/wlroots/wlroots.git`

You only need to do this once. You're never going to use your fork's master
Expand Down
147 changes: 116 additions & 31 deletions 3rdparty/wlroots/backend/drm/atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "backend/drm/fb.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
#include "render/color.h"

static char *atomic_commit_flags_str(uint32_t flags) {
const char *const l[] = {
Expand Down Expand Up @@ -177,6 +178,85 @@ bool create_fb_damage_clips_blob(struct wlr_drm_backend *drm,
return true;
}

static uint8_t convert_cta861_eotf(enum wlr_color_transfer_function tf) {
switch (tf) {
case WLR_COLOR_TRANSFER_FUNCTION_SRGB:
abort(); // unsupported
case WLR_COLOR_TRANSFER_FUNCTION_ST2084_PQ:
return 2;
case WLR_COLOR_TRANSFER_FUNCTION_EXT_LINEAR:
abort(); // unsupported
case WLR_COLOR_TRANSFER_FUNCTION_GAMMA22:
abort(); // unsupported
case WLR_COLOR_TRANSFER_FUNCTION_BT1886:
abort(); // unsupported
}
abort(); // unreachable
}

static uint16_t convert_cta861_color_coord(double v) {
if (v < 0) {
v = 0;
}
if (v > 1) {
v = 1;
}
return (uint16_t)round(v * 50000);
}

static bool create_hdr_output_metadata_blob(struct wlr_drm_backend *drm,
const struct wlr_output_image_description *img_desc, uint32_t *blob_id) {
if (img_desc == NULL) {
*blob_id = 0;
return true;
}

struct hdr_output_metadata metadata = {
.metadata_type = 0,
.hdmi_metadata_type1 = {
.eotf = convert_cta861_eotf(img_desc->transfer_function),
.metadata_type = 0,
.display_primaries = {
{
.x = convert_cta861_color_coord(img_desc->mastering_display_primaries.red.x),
.y = convert_cta861_color_coord(img_desc->mastering_display_primaries.red.y),
},
{
.x = convert_cta861_color_coord(img_desc->mastering_display_primaries.green.x),
.y = convert_cta861_color_coord(img_desc->mastering_display_primaries.green.y),
},
{
.x = convert_cta861_color_coord(img_desc->mastering_display_primaries.blue.x),
.y = convert_cta861_color_coord(img_desc->mastering_display_primaries.blue.y),
},
},
.white_point = {
.x = convert_cta861_color_coord(img_desc->mastering_display_primaries.white.x),
.y = convert_cta861_color_coord(img_desc->mastering_display_primaries.white.y),
},
.max_display_mastering_luminance = img_desc->mastering_luminance.max,
.min_display_mastering_luminance = img_desc->mastering_luminance.min * 0.0001,
.max_cll = img_desc->max_cll,
.max_fall = img_desc->max_fall,
},
};
if (drmModeCreatePropertyBlob(drm->fd, &metadata, sizeof(metadata), blob_id) != 0) {
wlr_log_errno(WLR_ERROR, "Failed to create HDR_OUTPUT_METADATA property");
return false;
}
return true;
}

static uint64_t convert_primaries_to_colorspace(uint32_t primaries) {
switch (primaries) {
case 0:
return 0; // Default
case WLR_COLOR_NAMED_PRIMARIES_BT2020:
return 9; // BT2020_RGB
}
abort(); // unreachable
}

static uint64_t max_bpc_for_format(uint32_t format) {
switch (format) {
case DRM_FORMAT_XRGB2101010:
Expand Down Expand Up @@ -251,19 +331,25 @@ bool drm_atomic_connector_prepare(struct wlr_drm_connector_state *state, bool mo
}

uint32_t gamma_lut = crtc->gamma_lut;
if (state->base->committed & WLR_OUTPUT_STATE_GAMMA_LUT) {
if (state->base->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) {
size_t dim = 0;
uint16_t *lut = NULL;
if (state->base->color_transform != NULL) {
struct wlr_color_transform_lut_3x1d *tr =
color_transform_lut_3x1d_from_base(state->base->color_transform);
dim = tr->dim;
lut = tr->lut_3x1d;
}

// Fallback to legacy gamma interface when gamma properties are not
// available (can happen on older Intel GPUs that support gamma but not
// degamma).
if (crtc->props.gamma_lut == 0) {
if (!drm_legacy_crtc_set_gamma(drm, crtc,
state->base->gamma_lut_size,
state->base->gamma_lut)) {
if (!drm_legacy_crtc_set_gamma(drm, crtc, dim, lut)) {
return false;
}
} else {
if (!create_gamma_lut_blob(drm, state->base->gamma_lut_size,
state->base->gamma_lut, &gamma_lut)) {
if (!create_gamma_lut_blob(drm, dim, lut, &gamma_lut)) {
return false;
}
}
Expand Down Expand Up @@ -295,11 +381,25 @@ bool drm_atomic_connector_prepare(struct wlr_drm_connector_state *state, bool mo
vrr_enabled = state->base->adaptive_sync_enabled;
}

uint32_t colorspace = conn->colorspace;
if (state->base->committed & WLR_OUTPUT_STATE_IMAGE_DESCRIPTION) {
colorspace = convert_primaries_to_colorspace(
state->base->image_description ? state->base->image_description->primaries : 0);
}

uint32_t hdr_output_metadata = conn->hdr_output_metadata;
if ((state->base->committed & WLR_OUTPUT_STATE_IMAGE_DESCRIPTION) &&
!create_hdr_output_metadata_blob(drm, state->base->image_description, &hdr_output_metadata)) {
return false;
}

state->mode_id = mode_id;
state->gamma_lut = gamma_lut;
state->fb_damage_clips = fb_damage_clips;
state->primary_in_fence_fd = in_fence_fd;
state->vrr_enabled = vrr_enabled;
state->colorspace = colorspace;
state->hdr_output_metadata = hdr_output_metadata;
return true;
}

Expand All @@ -314,6 +414,7 @@ void drm_atomic_connector_apply_commit(struct wlr_drm_connector_state *state) {
crtc->own_mode_id = true;
commit_blob(drm, &crtc->mode_id, state->mode_id);
commit_blob(drm, &crtc->gamma_lut, state->gamma_lut);
commit_blob(drm, &conn->hdr_output_metadata, state->hdr_output_metadata);

conn->output.adaptive_sync_status = state->vrr_enabled ?
WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED : WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED;
Expand All @@ -322,12 +423,8 @@ void drm_atomic_connector_apply_commit(struct wlr_drm_connector_state *state) {
if (state->primary_in_fence_fd >= 0) {
close(state->primary_in_fence_fd);
}
if (state->out_fence_fd >= 0) {
// TODO: error handling
wlr_drm_syncobj_timeline_import_sync_file(state->base->signal_timeline,
state->base->signal_point, state->out_fence_fd);
close(state->out_fence_fd);
}

conn->colorspace = state->colorspace;
}

void drm_atomic_connector_rollback_commit(struct wlr_drm_connector_state *state) {
Expand All @@ -337,14 +434,12 @@ void drm_atomic_connector_rollback_commit(struct wlr_drm_connector_state *state)

rollback_blob(drm, &crtc->mode_id, state->mode_id);
rollback_blob(drm, &crtc->gamma_lut, state->gamma_lut);
rollback_blob(drm, &conn->hdr_output_metadata, state->hdr_output_metadata);

destroy_blob(drm, state->fb_damage_clips);
if (state->primary_in_fence_fd >= 0) {
close(state->primary_in_fence_fd);
}
if (state->out_fence_fd >= 0) {
close(state->out_fence_fd);
}
}

static void plane_disable(struct atomic *atom, struct wlr_drm_plane *plane) {
Expand Down Expand Up @@ -396,19 +491,6 @@ static void set_plane_in_fence_fd(struct atomic *atom,
atomic_add(atom, plane->id, plane->props.in_fence_fd, sync_file_fd);
}

static void set_crtc_out_fence_ptr(struct atomic *atom, struct wlr_drm_crtc *crtc,
int *fd_ptr) {
if (!crtc->props.out_fence_ptr) {
wlr_log(WLR_ERROR,
"CRTC %"PRIu32" is missing the OUT_FENCE_PTR property",
crtc->id);
atom->failed = true;
return;
}

atomic_add(atom, crtc->id, crtc->props.out_fence_ptr, (uintptr_t)fd_ptr);
}

static void atomic_connector_add(struct atomic *atom,
struct wlr_drm_connector_state *state, bool modeset) {
struct wlr_drm_connector *conn = state->connector;
Expand All @@ -428,6 +510,12 @@ static void atomic_connector_add(struct atomic *atom,
if (modeset && active && conn->props.max_bpc != 0 && conn->max_bpc_bounds[1] != 0) {
atomic_add(atom, conn->id, conn->props.max_bpc, pick_max_bpc(conn, state->primary_fb));
}
if (conn->props.colorspace != 0) {
atomic_add(atom, conn->id, conn->props.colorspace, state->colorspace);
}
if (conn->props.hdr_output_metadata != 0) {
atomic_add(atom, conn->id, conn->props.hdr_output_metadata, state->hdr_output_metadata);
}
atomic_add(atom, crtc->id, crtc->props.mode_id, state->mode_id);
atomic_add(atom, crtc->id, crtc->props.active, active);
if (active) {
Expand All @@ -447,9 +535,6 @@ static void atomic_connector_add(struct atomic *atom,
if (state->primary_in_fence_fd >= 0) {
set_plane_in_fence_fd(atom, crtc->primary, state->primary_in_fence_fd);
}
if (state->base->committed & WLR_OUTPUT_STATE_SIGNAL_TIMELINE) {
set_crtc_out_fence_ptr(atom, crtc, &state->out_fence_fd);
}
if (crtc->cursor) {
if (drm_connector_is_cursor_visible(conn)) {
struct wlr_fbox cursor_src = {
Expand Down
58 changes: 53 additions & 5 deletions 3rdparty/wlroots/backend/drm/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "backend/drm/fb.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
#include "render/color.h"
#include "types/wlr_output.h"
#include "util/env.h"
#include "config.h"
Expand All @@ -37,11 +38,12 @@ static const uint32_t COMMIT_OUTPUT_STATE =
WLR_OUTPUT_STATE_BUFFER |
WLR_OUTPUT_STATE_MODE |
WLR_OUTPUT_STATE_ENABLED |
WLR_OUTPUT_STATE_GAMMA_LUT |
WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED |
WLR_OUTPUT_STATE_LAYERS |
WLR_OUTPUT_STATE_WAIT_TIMELINE |
WLR_OUTPUT_STATE_SIGNAL_TIMELINE;
WLR_OUTPUT_STATE_SIGNAL_TIMELINE |
WLR_OUTPUT_STATE_COLOR_TRANSFORM |
WLR_OUTPUT_STATE_IMAGE_DESCRIPTION;

static const uint32_t SUPPORTED_OUTPUT_STATE =
WLR_OUTPUT_STATE_BACKEND_OPTIONAL | COMMIT_OUTPUT_STATE;
Expand Down Expand Up @@ -365,7 +367,17 @@ static void drm_plane_finish_surface(struct wlr_drm_plane *plane) {
}

drm_fb_clear(&plane->queued_fb);
if (plane->queued_release_timeline != NULL) {
wlr_drm_syncobj_timeline_signal(plane->queued_release_timeline, plane->queued_release_point);
wlr_drm_syncobj_timeline_unref(plane->queued_release_timeline);
plane->queued_release_timeline = NULL;
}
drm_fb_clear(&plane->current_fb);
if (plane->current_release_timeline != NULL) {
wlr_drm_syncobj_timeline_signal(plane->current_release_timeline, plane->current_release_point);
wlr_drm_syncobj_timeline_unref(plane->current_release_timeline);
plane->current_release_timeline = NULL;
}

finish_drm_surface(&plane->mgpu_surf);
}
Expand Down Expand Up @@ -554,6 +566,18 @@ static void drm_connector_apply_commit(const struct wlr_drm_connector_state *sta
struct wlr_drm_crtc *crtc = conn->crtc;

drm_fb_copy(&crtc->primary->queued_fb, state->primary_fb);
if (crtc->primary->queued_release_timeline != NULL) {
wlr_drm_syncobj_timeline_signal(crtc->primary->queued_release_timeline, crtc->primary->queued_release_point);
wlr_drm_syncobj_timeline_unref(crtc->primary->queued_release_timeline);
}
if (state->base->signal_timeline != NULL) {
crtc->primary->queued_release_timeline = wlr_drm_syncobj_timeline_ref(state->base->signal_timeline);
crtc->primary->queued_release_point = state->base->signal_point;
} else {
crtc->primary->queued_release_timeline = NULL;
crtc->primary->queued_release_point = 0;
}

crtc->primary->viewport = state->primary_viewport;
if (crtc->cursor != NULL) {
drm_fb_copy(&crtc->cursor->queued_fb, state->cursor_fb);
Expand Down Expand Up @@ -644,7 +668,6 @@ static void drm_connector_state_init(struct wlr_drm_connector_state *state,
.base = base,
.active = output_pending_enabled(&conn->output, base),
.primary_in_fence_fd = -1,
.out_fence_fd = -1,
};

struct wlr_output_mode *mode = conn->output.current_mode;
Expand Down Expand Up @@ -856,6 +879,19 @@ static bool drm_connector_prepare(struct wlr_drm_connector_state *conn_state, bo
}
}

if ((state->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) && state->color_transform != NULL &&
state->color_transform->type != COLOR_TRANSFORM_LUT_3X1D) {
wlr_drm_conn_log(conn, WLR_DEBUG,
"Only 3x1D LUT color transforms are supported");
return false;
}

if ((state->committed & WLR_OUTPUT_STATE_IMAGE_DESCRIPTION) &&
conn->backend->iface != &atomic_iface) {
wlr_log(WLR_DEBUG, "Image descriptions are only supported by the atomic interface");
return false;
}

if (test_only && conn->backend->mgpu_renderer.wlr_rend) {
// If we're running as a secondary GPU, we can't perform an atomic
// commit without blitting a buffer.
Expand Down Expand Up @@ -1702,7 +1738,11 @@ static bool connect_drm_connector(struct wlr_drm_connector *wlr_conn,
size_t edid_len = 0;
uint8_t *edid = get_drm_prop_blob(drm->fd,
wlr_conn->id, wlr_conn->props.edid, &edid_len);
parse_edid(wlr_conn, edid_len, edid);
if (edid_len > 0) {
parse_edid(wlr_conn, edid_len, edid);
} else {
wlr_log(WLR_DEBUG, "Connector has no EDID");
}
free(edid);

char *subconnector = NULL;
Expand Down Expand Up @@ -1999,6 +2039,14 @@ static void handle_page_flip(int fd, unsigned seq,
struct wlr_drm_plane *plane = conn->crtc->primary;
if (plane->queued_fb) {
drm_fb_move(&plane->current_fb, &plane->queued_fb);
if (plane->current_release_timeline != NULL) {
wlr_drm_syncobj_timeline_signal(plane->current_release_timeline, plane->current_release_point);
wlr_drm_syncobj_timeline_unref(plane->current_release_timeline);
}
plane->current_release_timeline = plane->queued_release_timeline;
plane->current_release_point = plane->queued_release_point;
plane->queued_release_timeline = NULL;
plane->queued_release_point = 0;
}
if (conn->crtc->cursor && conn->crtc->cursor->queued_fb) {
drm_fb_move(&conn->crtc->cursor->current_fb,
Expand Down Expand Up @@ -2120,7 +2168,7 @@ struct wlr_drm_lease *wlr_drm_create_lease(struct wlr_output **outputs,
wlr_log(WLR_DEBUG, "Connector %d", conn->id);

if (!drm_connector_alloc_crtc(conn)) {
wlr_log(WLR_ERROR, "Failled to allocate connector CRTC");
wlr_log(WLR_ERROR, "Failed to allocate connector CRTC");
return NULL;
}

Expand Down
15 changes: 12 additions & 3 deletions 3rdparty/wlroots/backend/drm/legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "backend/drm/fb.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
#include "render/color.h"
#include "types/wlr_output.h"

static bool legacy_fb_props_match(struct wlr_drm_fb *fb1,
Expand Down Expand Up @@ -124,9 +125,17 @@ static bool legacy_crtc_commit(const struct wlr_drm_connector_state *state,
}
}

if (state->base->committed & WLR_OUTPUT_STATE_GAMMA_LUT) {
if (!drm_legacy_crtc_set_gamma(drm, crtc,
state->base->gamma_lut_size, state->base->gamma_lut)) {
if (state->base->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) {
size_t dim = 0;
uint16_t *lut = NULL;
if (state->base->color_transform != NULL) {
struct wlr_color_transform_lut_3x1d *tr =
color_transform_lut_3x1d_from_base(state->base->color_transform);
dim = tr->dim;
lut = tr->lut_3x1d;
}

if (!drm_legacy_crtc_set_gamma(drm, crtc, dim, lut)) {
return false;
}
}
Expand Down
Loading
Loading