mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-22 06:47:12 -04:00
Merge gitlab.freedesktop.org:wlroots/wlroots
This commit is contained in:
commit
26f6fab4eb
275 changed files with 7472 additions and 5463 deletions
|
|
@ -58,6 +58,7 @@ struct wlr_drm_backend {
|
|||
const struct wlr_drm_interface *iface;
|
||||
clockid_t clock;
|
||||
bool addfb2_modifiers;
|
||||
struct udev_hwdb *hwdb;
|
||||
|
||||
int fd;
|
||||
char *name;
|
||||
|
|
@ -89,15 +90,6 @@ struct wlr_drm_backend {
|
|||
struct wlr_drm_format_set mgpu_formats;
|
||||
};
|
||||
|
||||
enum wlr_drm_connector_status {
|
||||
// Connector is available but no output is plugged in
|
||||
WLR_DRM_CONN_DISCONNECTED,
|
||||
// An output just has been plugged in and is waiting for a modeset
|
||||
WLR_DRM_CONN_NEEDS_MODESET,
|
||||
WLR_DRM_CONN_CLEANUP,
|
||||
WLR_DRM_CONN_CONNECTED,
|
||||
};
|
||||
|
||||
struct wlr_drm_mode {
|
||||
struct wlr_output_mode wlr_mode;
|
||||
drmModeModeInfo drm_mode;
|
||||
|
|
@ -115,9 +107,10 @@ struct wlr_drm_connector {
|
|||
|
||||
struct wlr_drm_backend *backend;
|
||||
char name[24];
|
||||
enum wlr_drm_connector_status status;
|
||||
drmModeConnection status;
|
||||
bool desired_enabled;
|
||||
uint32_t id;
|
||||
uint64_t max_bpc;
|
||||
struct wlr_drm_lease *lease;
|
||||
|
||||
struct wlr_drm_crtc *crtc;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ union wlr_drm_connector_props {
|
|||
uint32_t non_desktop;
|
||||
uint32_t panel_orientation; // not guaranteed to exist
|
||||
uint32_t tile;
|
||||
uint32_t content_type; // not guaranteed to exist
|
||||
uint32_t max_bpc; // not guaranteed to exist
|
||||
|
||||
// atomic-modesetting only
|
||||
|
||||
|
|
@ -76,4 +78,7 @@ bool get_drm_prop(int fd, uint32_t obj, uint32_t prop, uint64_t *ret);
|
|||
void *get_drm_prop_blob(int fd, uint32_t obj, uint32_t prop, size_t *ret_len);
|
||||
char *get_drm_prop_enum(int fd, uint32_t obj, uint32_t prop);
|
||||
|
||||
bool introspect_drm_prop_range(int fd, uint32_t prop_id,
|
||||
uint64_t *min, uint64_t *max);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,10 +19,6 @@ struct wlr_drm_renderer {
|
|||
|
||||
struct wlr_drm_surface {
|
||||
struct wlr_drm_renderer *renderer;
|
||||
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
|
||||
struct wlr_swapchain *swapchain;
|
||||
};
|
||||
|
||||
|
|
@ -40,7 +36,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
|
|||
void finish_drm_renderer(struct wlr_drm_renderer *renderer);
|
||||
|
||||
bool init_drm_surface(struct wlr_drm_surface *surf,
|
||||
struct wlr_drm_renderer *renderer, uint32_t width, uint32_t height,
|
||||
struct wlr_drm_renderer *renderer, int width, int height,
|
||||
const struct wlr_drm_format *drm_format);
|
||||
|
||||
bool drm_fb_import(struct wlr_drm_fb **fb, struct wlr_drm_backend *drm,
|
||||
|
|
|
|||
|
|
@ -2,20 +2,17 @@
|
|||
#define BACKEND_DRM_UTIL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
|
||||
struct wlr_drm_connector;
|
||||
|
||||
// Calculates a more accurate refresh rate (mHz) than what mode itself provides
|
||||
int32_t calculate_refresh_rate(const drmModeModeInfo *mode);
|
||||
// Populates the make/model/phys_{width,height} of output from the edid data
|
||||
void parse_edid(struct wlr_output *restrict output, size_t len,
|
||||
const uint8_t *data);
|
||||
void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
|
||||
// Parses the TILE property
|
||||
void parse_tile(struct wlr_output *restrict output, size_t len,
|
||||
const uint8_t *data);
|
||||
// Returns the string representation of a DRM output type
|
||||
const char *conn_get_name(uint32_t type_id);
|
||||
void parse_tile(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
|
||||
|
||||
// Part of match_obj
|
||||
enum {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue