Age | Commit message (Collapse) | Author |
|
wlr_output.refresh is populated by core wlr_output, and thus will
be zero for a custom mode with an unset refresh rate.
Save the refresh rate from the drmModeModeInfo in wlr_drm_connector
instead.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3791
|
|
This function touches queued_fb/current_fb, which the renderer has
nothing to do with.
|
|
|
|
Many files used to require wlr_matrix but no longer do.
|
|
We don't need the whole wl_display here anymore. The wl_event_loop
is enough.
|
|
These aren't really tied to wlr_output.
|
|
Instead of having this condition checked in multiple places,
centralize it so that they don't go out-of-sync.
|
|
This chunk of code was moved by mistake.
Fixes: 3b53d1cbf199 ("backend/drm: introduce page-flip tracking struct")
|
|
When we destroy the backend, page flips will no longer be invoked meaning
those won't clean up the page flips for us.
|
|
|
|
Introduce a per-page-flip tracking struct passed to the kernel
when we request a page-flip event for an atomic commit. The kernel
will pass us back this pointer when delivering the event.
This eliminates any risk of mixing up events together. In particular,
if two events are pending, or if the CRTC of a connector is swapped,
we no longer blow up in the page-flip event handler.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3753
|
|
Right now this is done "by chance" because we disable all CRTCs
on shutdown. However, we'll stop doing this. Plus, if disabling
a CRTC fails, we don't cleanup properly.
|
|
We can just assume CLOCK_MONOTONIC everywhere.
Simplifies the backend API, and fixes clock mismatches when multiple
backends are used together with different clocks.
|
|
The name "allow_artifacts" and associated description is very vague, and
theoretically allow for tearing behavior. Clarify that we only intend to
mean artifacts related to output configuration (e.g., modesets).
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3740
|
|
DRM_MODE_PAGE_FLIP_ASYNC doesn't allow user-space to submit new
buffers before waiting for the uevent: the kernel will return EBUSY
in that case.
Fixes: c2aa7fd965cb ("backend/drm: Add async page flip support to legacy")
|
|
Atomic doesn't support such flags yet.
|
|
|
|
Since e5fc8cd4c734 ("output: trigger frame/present events on all
commits on enabled output"), any commit on an enabled output is
supposed to trigger frame/present events.
The DRM backend was skipping the commit completely for no-op
commits. Stop doing so.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3719
|
|
Up until now, frame/present events were only triggered when the
user submitted a buffer. Change the wlr_output API so that these
events are triggered when any commit is applied on an enabled
output.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3708
|
|
|
|
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3664#note_2020392
we're gonna have to trust Simon on this one 🤞
|
|
|
|
|
|
|
|
wlr_client_buffer is a bad indicator for direct scan-out.
Compositors might use the underlying wlr_buffer instead.
|
|
This slightly improves type safety.
The culprits were found with:
git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
|
|
This is a bit more type-safe.
|
|
This fixes an issue where the panel_orientation parameter was set but wlroots was ignoring it and
returning OUTPUT_TRANSFORM_NORMAL.
Fixes 2e12de96
|
|
Removes duplication across all the backends to finally apply the mode
to the output.
|
|
Nobody remembers why this is done and it isn't that great if people
use a lot of custom modes.
|
|
wlr_output_update_needs_frame() is called unconditionally at the
end of the function already.
|
|
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.
A new wlr_output_state_init() function takes care of initializing
the Pixman region.
|
|
Destroying the liftoff_device invalidates all of the liftoff_planes.
Destroy the liftoff_planes before the liftoff_device to fix this.
|
|
|
|
This allows compositors to get back the raw drmModeModeInfo and
look at DRM-specific fields and flags.
|
|
Now it takes a reference to a destination format
|
|
|
|
Helps figuring out why e.g. get_primary_formats fails.
|
|
|
|
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
|
|
No need to store this info in struct wlr_drm_layer. We can just
extract the size when we need it.
|
|
|
|
|
|
|
|
|
|
Since 1d581656c756 ("backend/drm: set "max bpc" to the max") we
set the "max bpc" property to the maximum value. The kernel driver
is supposed to clamp this value depending on hardware capabilities.
All kernel drivers lower the value depending on the GPU capabilities.
However, none of the drivers lower the value depending on the DP-MST
link capabilities. Thus, enabling a 4k@60Hz mode can fail on some
DP-MST setups due to the "max bpc" property.
Additionally, it's not a good idea to unconditionally set "max bpc"
to the max. A high bpc consumes more lanes and more clock speed,
which means higher power consumption and the busy lanes cannot be
used for something else (e.g. other data transfers on a USB-C cable).
For now, let's tie the "max bpc" to the pixel format of the buffer.
Introduce a heuristic to make "high bit-depth buffer" a synonym of
"I want the best quality".
This is not perfect: a "max bpc" higher than 8 might be desirable
for pixel formats with a color depth of 8 bits, for instance when
the color management KMS properties are used. But we don't really
support that yet, so let's leave this for later.
Closes: https://github.com/swaywm/sway/issues/7367
|
|
We already do it for get_drm_plane_props().
|
|
We only need it for one thing: gamma size. Moreover, some bits in
the drmModeCrtc will become out-of-date, for instance the current
mode, so let's avoid caching the whole struct and only keep what
we know won't change.
|
|
connect_drm_connector() may be called long after create_drm_connector().
During that time the DRM mode might have changed. Avoid working with
stale information.
|
|
|