Age | Commit message (Collapse) | Author |
|
We don't need it anymore now that we've stopped using the EGL Xlib
platform.
|
|
Fixes #2659
|
|
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.
|
|
|
|
When we receive an Expose event, that means that we must redraw that
region of the X11 window. Keep track of these regions with pixman
regions, and merge them with the additional output damaged regions.
Fixes #2670
|
|
This actually simplifies the logic since we no longer have to wait for
enter/leave events, and also improves the UX when e.g. handling a crash
with gdb attached.
See #2659
|
|
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
|
|
Add fallbacks when DRI3 1.2 isn't supported.
Closes: https://github.com/swaywm/wlroots/issues/2586
|
|
|
|
|
|
|
|
This function allows backends to return the DRM FD they are using. This
will allow the allocator and the renderer to use the right device.
|
|
Just like other backends, use the EGL GBM platform. This will make it
easier to move the allocator and renderer initialization out of the
backends.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
The Present protocol states:
> An event context is associated with a specific window; using an existing
> event context with a different window generates a Match error.
Instead of a global event context, use a per-window event context to fix
this error:
[backend/x11/backend.c:608] X11 error: op Present (SelectInput), code Match (no extension), sequence 63, value 4194307
Closes: https://github.com/swaywm/wlroots/issues/2577
|
|
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.
The previous attempt at doing this [1] hit issues with EGLSurface, but
we don't use that anymore.
[1]: https://github.com/swaywm/wlroots/pull/1894
|
|
Use the "<object>_<event>" notation for listeners, use
"handle_<listener>" for handlers.
|
|
Make it clearer that this is a bitmask of CRTC indices.
|
|
Instead, import the buffer into GBM and KMS in drm_fb_import. Also move
the multi-GPU copy there if necessary.
|
|
|
|
Not used anymore.
|
|
Instead of re-importing a buffer each time we submit a frame, re-use the
pixmaps if possible.
|
|
Instead of re-importing a buffer each time we submit a new frame, re-use
the wl_buffer objects if possible.
|
|
|
|
Instead of hand-rolling our own manual wlr_output cleanup function, rely
on wlr_output_destroy to remove an output from the compositor's state.
|
|
The DRM backend is a little special when it comes to wlr_outputs: the
wlr_drm_connectors are long-lived and are created even when no screen is
connected.
A wlr_drm_connector only advertises a wlr_output to the compositor when
a screen is connected. As such, most of wlr_output's state is invalid
when the connector is disconnected.
We want to stop using wlr_output state on disconnected connectors.
Introduce wlr_drm_connector.name which is always valid regardless of the
connector status to avoid reading wlr_output.name when disconnected.
|
|
Simplify and unify connector-specific logging with a new
wlr_drm_conn_log macro. This makes it easier to understand which
connector a failure is about, without having to explicitly integrate the
connector name in each log message.
|
|
Save the DRM device name in a wlr_drm_backend field, so that we can
easily use it for logging purposes.
|
|
This allows the DRM code to have direct access to the wlr_drm_backend
without having to go through an upcast via get_drm_backend_from_backend.
|
|
gbm_bo_create_with_modifiers doesn't take GBM flags, so our
wlr_gbm_allocator interface doesn't either. We were still internally
using GBM flags in the DRM backend, leading to awkward back-and-forth
conversions.
The only flag passed to drm_plane_init_surface was GBM_BO_USE_LINEAR, so
turn that into a bool to make sure other flags can't be passed in.
Move the "force linear" logic out of init_drm_surface, because the
supplied wlr_drm_format should already contain that information.
|
|
|
|
|
|
|
|
The cursor surface still uses a wl_egl_window.
References: https://github.com/swaywm/wlroots/issues/1352
|
|
Since we're using wlr_swapchain, we don't need to provide an EGL config.
|
|
We don't do anything with them. Once we do, we can easily add this back.
|
|
It's not a CRTC property. Remove it altogether since it's unused.
|
|
"rotation" is a plane property, it's not a CRTC property. It was also
missing from plane_info.
|
|
Register an X11 error handler, and optionally use xcb-errors to print a
detailed message.
|