Age | Commit message (Collapse) | Author |
|
We already depend on libdrm 2.4.95, which is the first to have the
writeback connector type.
|
|
|
|
This requires a change to the type of `struct wlr_tablet` and
`wlr_tablet_init` signature, both of which are part of the unstable API.
|
|
Instead blit in drm_plane_lock_surface. This makes drm_fb_import simpler
and better fits its name.
|
|
Make it take a plane instead, and rename to drm_plane_lock_surface.
|
|
In 93cd3a79b26c ("backend/drm: stop using GBM flags"), we stopped
using the GBM_BO_USE_LINEAR flag in favor of a modifier list set
to { DRM_FORMAT_MOD_LINEAR }. However, the last argument of
drm_plane_init_surface disables modifiers -- so the buffer will just
get allocated with an implicit modifier, without necessarily being
LINEAR.
To fix this, allow modifiers when allocating the cursor buffers.
wlr_drm_plane.formats should already have the necessary LINEAR
restrictions.
Fixes: 93cd3a79b26c ("backend/drm: stop using GBM flags")
|
|
This allows a compositor to get a KMS connector object ID from a
wlr_output. The compositor can then query more information about
the connector via libdrm.
This gives more freedom to compositors and allows them to read
KMS properties that wlroots doesn't know about. For instance,
they could read the EDID or the suggested_{X,Y} properties and
change their output configuration based on that.
|
|
The subconnector property indicates the connector sub-type. This is
useful because that usually indicates what kind of connector the user
has plugged in to their monitor, e.g. a DisplayPort-to-DVI cable will
indicate a DVI subconnector. Also some laptops have non-DP connectors
that are internally linked to a DP port on the GPU.
Set the output description accordingly.
See https://drmdb.emersion.fr/properties/3233857728/subconnector
|
|
The new wlr_renderer_autocreate API is great for compositors, however
it causes some issues with DRM multi-GPU support.
A DRM child backend wants the compositor to use the parent GPU, so it
exposes the parent's DRM FD in get_drm_fd. However, in order to be able
to perform multi-GPU buffer copies, the child DRM backend still needs to
create a local renderer.
Use the new private wlr_renderer_autocreate_with_drm_fd function to
avoid creating a renderer for the parent GPU.
Fixes: e128e6c08dc0 ("render: drop egl parameters from wlr_renderer_autocreate")
|
|
Instead of requiring callers to manually make the EGL context current
before binding a buffer and unsetting it after unbinding a buffer, do
it inside wlr_renderer_bind_buffer.
This hides renderer-specific implementation details inside the
wlr_renderer interface. Non-GLES2 renderers may not use EGL.
This removes all EGL dependencies from the backends.
References: https://github.com/swaywm/wlroots/issues/2618
References: https://github.com/swaywm/wlroots/pull/2615#issuecomment-756687006
|
|
|
|
|
|
|
|
|
|
We don't need this check, wlr_buf is guaranteed not to be NULL.
|
|
Since 5b1b43c68c7a ("backend/drm: make wlr_drm_plane.{pending,queued,current}_fb
pointers"), current_fb can be NULL if there's no buffer. If current_fb
is not NULL, current_fb->wlr_buf is guaranteed to not be NULL.
Closes: https://github.com/swaywm/wlroots/issues/2634
|
|
These aren't used anymore.
|
|
Stop using wlr_drm_surface.{width,height} to figure out the size of a
gbm_bo. In the future we'll stop using wlr_drm_plane.surf, so these will
be zero. Instead, rely on gbm_bo_get_{width,height}.
|
|
Instead of importing buffers to GBM and KMS at each frame, cache them
and re-use them while the wlr_buffer is alive.
This is the same as [1] and [2] but for the DRM backend.
[1]: https://github.com/swaywm/wlroots/pull/2538
[2]: https://github.com/swaywm/wlroots/pull/2539
|
|
Stop keeping track of buffers on the parent GPU when multi-GPU is used.
This removes support for export_dmabuf on secondary GPUs, but renderer
v6 will bring this back by managing the swapchains in wlr_output instead
of the backends.
|
|
|
|
|
|
This will be useful once we start re-using wlr_drm_fb.
|
|
|
|
|
|
errno isn't guaranteed to be set after a plane_get_next_fb failure, so
we were printing garbage.
|
|
This isn't used anymore by any backend.
Some examples still provide an EGL config to wlr_egl_init, so we can't
drop it yet there.
|
|
wlr_drm_connector.crtc may be updated by the DRM backend while a
page-flip is pending. In this case, the page-flip handler won't be able
to find the right wlr_drm_connector from the CRTC ID.
Save the CRTC when performing a page-flip to ensure we always find the
right connector when we get the event.
|
|
When the session is inactive, we can't change the KMS state. Ignore
hotplug events so that compositors don't try to perform a modeset when
a connector is plugged in. We already re-scan connectors when the
session becomes active.
To test, run a wlroots compositor on VT 1, switch to VT 2, unplug a
connector, re-plug it, switch back to VT 1. Without this patch the
screen is black on VT 1.
References: https://github.com/swaywm/wlroots/issues/2370
|
|
This callback allowed compositors to customize the EGL config used by
the renderer. However with renderer v6 EGL configs aren't used anymore.
Instead, buffers are allocated via GBM and GL FBOs are rendered to. So
customizing the EGL config is a no-op.
|
|
We now properly mark the cursor plane's formats as linear-only, and we
now have a version of wlr_drm_format_intersect that handles the case of
linear-only formats and implicit modifiers.
We can remove the special drm_plane_init_surface flag we had for cursor
planes. This also allows us to use a non-linear layout for cursor planes
on drivers that support it.
Tested on amdgpu GFX9.
|
|
Simplifies error handling.
|
|
If the kernel driver doesn't support modifiers, it still expects cursor
FBs to have a LINEAR layout. See [1] for expectations for framebuffers
attached to the cursor plane.
[1]: https://patchwork.freedesktop.org/patch/408512/
|
|
This makes wlroots able to run on some big-endian machines like G4 and
G5 systems with ATI Radeon 7500 AGP graphics.
|
|
Use the "<object>_<event>" notation for listeners, use
"handle_<listener>" for handlers.
|
|
Just use wlr_texture.{width,height} directly.
|
|
|
|
Make it clearer it'll be free'd after add_plane returns.
|
|
The code calling add_plane now makes sure not to add a cursor plane to a
CRTC which already has one.
|
|
|
|
Parse WLR_DRM_NO_MODIFIERS at startup. Don't parse IN_FORMATS when
WLR_DRM_NO_MODIFIERS is set, so that the legacy behaviour is better
reproduced.
When modifiers aren't supported, try the initial page-flip once only.
|
|
Make it clearer that this is a bitmask of CRTC indices.
|
|
|
|
This was lost during the refactoring. We were previously calling
wlr_output_destroy, which destroyed the connector as well.
Fixes: 248c7787c7b4 ("backend/drm: refactor wlr_output destruction")
|
|
|
|
Instead, import the buffer into GBM and KMS in drm_fb_import. Also move
the multi-GPU copy there if necessary.
|
|
|
|
Not used anymore.
|
|
Get the DMA-BUF directly out of the wlr_buffer instead of relying on the
gbm_bo. This eliminates a roundtrip through GBM.
|
|
The GBM BO is destroyed when released anyways.
|