mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
backend/drm: check format when scanning out DMA-BUF
This commit is contained in:
parent
96d6fde5dc
commit
e516ea4c79
6 changed files with 90 additions and 22 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <wayland-util.h>
|
||||
#include <wlr/backend/drm.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/render/drm_format_set.h>
|
||||
#include <wlr/render/egl.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include "iface.h"
|
||||
|
|
@ -27,6 +28,7 @@ struct wlr_drm_plane {
|
|||
struct wlr_drm_surface mgpu_surf;
|
||||
|
||||
uint32_t drm_format; // ARGB8888 or XRGB8888
|
||||
struct wlr_drm_format_set formats;
|
||||
|
||||
// Only used by cursor
|
||||
float matrix[9];
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ union wlr_drm_plane_props {
|
|||
struct {
|
||||
uint32_t type;
|
||||
uint32_t rotation; // Not guaranteed to exist
|
||||
uint32_t in_formats; // Not guaranteed to exist
|
||||
|
||||
// atomic-modesetting only
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ union wlr_drm_plane_props {
|
|||
uint32_t fb_id;
|
||||
uint32_t crtc_id;
|
||||
};
|
||||
uint32_t props[12];
|
||||
uint32_t props[13];
|
||||
};
|
||||
|
||||
bool get_drm_connector_props(int fd, uint32_t id,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ void wlr_drm_format_set_finish(struct wlr_drm_format_set *set);
|
|||
const struct wlr_drm_format *wlr_drm_format_set_get(
|
||||
const struct wlr_drm_format_set *set, uint32_t format);
|
||||
|
||||
bool wlr_drm_format_set_has(const struct wlr_drm_format_set *set,
|
||||
uint32_t format, uint64_t modifier);
|
||||
|
||||
bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format,
|
||||
uint64_t modifier);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue