-
Notifications
You must be signed in to change notification settings - Fork 340
drm backend: set "Broadcast RGB" = "Full" for all connections #2310
base: master
Are you sure you want to change the base?
Conversation
|
If it won't be the default, then it would be nice if sway could inform the user which modes use the limited mode; looking at the driver the logic seems to be in Do you have any other ideas for how it might be done? Perhaps setting full just for DP.
Yes, I wonder how other drivers handle it. In regards to the patch, if the property doesn't exist it won't cause an issue. |
Its still a good idea even on TVs to always use Full. Most TVs will autodetect, since its trivial to do, and adjust accordingly. Some let you override it, but not as many as you think always assume its always going to be limited. Furthermore, HDR is a thing now, and a lot of HDR content these days, including all of youtube, is in full range. Hence its not unreasonable to assume HDR TVs would also expect full-range. Losing 10% of your dynamic range (possibly more depending on dithering) with HDR is much more fatal than with bt709 (IEC61966-2.1) gamma. |
I see there was a proposed DRM_MODE_FLAG_CEA_861_CE_MODE flag, I wonder if it has any chance of being implemented. |
|
Ping? I've been running this for a while without problems. |
I'd still like to make this a standard property before starting to use it. |
I’m sure you are better informed but from here it looks like that patch to lkml that’s adds that standard property from a few months ago has stalled. |
Yes, those patches need some work. For reference:
|
Ping again, been running this since it was posted, had no problems, already had to help out one person who was wondering why colors look washed out. |
This email thread also suggests that we should stick to full range unconditionally (especially when we'll implement color management): https://lists.freedesktop.org/archives/dri-devel/2020-October/283396.html This PR is still blocked on registering the property as a standard one. |
More info on turning "Broadcast RGB" into a generic prop: https://dri.freedesktop.org/docs/drm/gpu/todo.html#consolidate-custom-driver-modeset-properties |
Is this the only blockage for this patch? Because in this patchset https://lkml.org/lkml/2021/6/18/294, I standardized "Broadcast RGB" and implemented it for Intel and AMD. And if you say this MR is ready to be merged once the patch got accepted it would help with: https://www.kernel.org/doc/html/v5.12/gpu/drm-uapi.html#open-source-userspace-requirements |
Yes, this is the only blocker. I trust @cyanreg that this is the correct thing to do. This patch also needs to be rebased. |
I'm still using this locally and rebasing if needed. Repo is https://github.com/cyanreg/wlroots if you need it for now. |
8011439
to
f69eb84
Compare
rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments
f69eb84
to
41331de
Compare
Thanks, I've applied the feedback and squashed. |
41331de
to
0096bf8
Compare
Not all HDR on youtube is limited-range, some is full range. And finally, |
@@ -220,6 +225,10 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn, | |||
|
|||
struct atomic atom; | |||
atomic_begin(&atom); | |||
if (conn->props.broadcast_rgb) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required on every commit? I'd assume that it is enough to set this on modeset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We always set all of our state on each commit. Simplifies the code and I don't think it's a real performance concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is a glue file to allow integration with builds.sr.ht.
wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2310 |
Subsurface position is considered to be a part of the parent surface's state, therefore it should be modified when the parent is committed.
This commit fixes the way the damage that doesn't come directly from the client is handled.
Two new events are added: name and description. The name is immutable. The description can be updated on-the-fly.
The multi backend was returned instead of the primary DRM backend.
This helper is responsible for listening for new DRM devices and create new child DRM backends as necessary.
Co-authored-by: Simon Ser <contact@emersion.fr>
This allows compositors to avoid sending multiple frame done events to a surface that is rendered on multiple outputs at once. This may also be used in the same way for presentation feedback.
This doesn't work if scene outputs are not used as the primary output of scene surfaces will always be NULL. Therefore, take a wlr_scene_output instead of separate wlr_scene and wlr_output arguments and rename the function to wlr_scene_output_send_frame_done(). The actual behavior of the function is unchanged.
Otherwise it will send enter events to clients that already have keyboard/pointer focus. Notably Qt applications warns about this.
Allows the compositor to submit tokens to the pool of currently active tokens. This can be useful when the launcher doesn't use or support xdg-activation-v1 by itself - e.g. when it is X11 based or use gtk_shell1.
Since [1], we can get the wl_display directly from the wl_global. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/commit/2b22160fb690a76247aa9bd0be3069ff43e8239f
This avoids open-coding our own logic. The resulting code is more readable. References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
This has been added in [1] and allows us to close buffer handles without manually calling drmIoctl. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/192
This helper automates sending presentation feedback to clients based on the primary output of scene surfaces.
This fixes configure loop in Sway when clients re-send same properties on every configure event. Original issue: https://todo.sr.ht/~mil/sxmo-tickets/413
This patch makes it so we bind to zwp_linux_dmabuf_v1 version 4 and we use it to grab the main device. v4 sends supported formats via a table so we need to handle this as well. v4 allows wlroots to remove the requirement for Mesa's internal wl_drm interface.
These currently use uint32_t while they are an int32_t in the protocol.
According to [1] this should be done at each release with breaking ABI changes. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/Core-contributor-guide#releasing-a-new-version Fixes: 7360810 ("build: bump to version 0.16.0")
Compositors should've all been updated to use the new header by now.
All of these projects use meson.override_dependency() so we can stop referencing their internal variable name to grab the depndencies we need.
The libinput backend is now optional. However, this means that a user building wlroots without the correct libinput dependencies will end up with a compositor which doesn't respond to input events. wlr_backend_autocreate is supposed to return a sensible setup, so in this case let's just error out and explain what happened. Users can suppress the check by setting WLR_LIBINPUT_NO_DEVICES=1 (already used to suppress the zero input device case inside the libinput backend). Compositors which really want to create a bare DRM backend can easily create it manually instead of using wlr_backend_autocreate.
This function was already removed in e5b5592 but it was forgotten to remove it from the header.
Some clients (e.g. mpv, Firefox) request a new wl_surface.frame callback without damaging their surface. When this happens, schedule a new output frame. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3350
I have a new monitor which has three similar modes:
The last one works fine, but the first two have issues displaying colors, because the "Broadcast RGB" property on the connector defaults to "Auto" which means "Limited 16:235", squashing the dynamic range.
Since there is really no way for a sway user to know that 3840x2160@60Hz displays colors poorly, while 3840x2160@59.997Hz will be fine, I was using the wrong mode for weeks.
This patch causes wlroots to always set "Broadcast RGB" = "Full", which I think most people want.