mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-20 06:47:19 -04:00
Merge branch 'drm-layer-fbs' into 'master'
Draft: backend/drm: track layer FBs in wlr_drm_connector_state See merge request wlroots/wlroots!4589
This commit is contained in:
commit
cac1b1cd71
3 changed files with 54 additions and 75 deletions
|
|
@ -180,8 +180,8 @@ static uint64_t to_fp16(double v) {
|
|||
}
|
||||
|
||||
static bool set_layer_props(struct wlr_drm_backend *drm,
|
||||
const struct wlr_output_layer_state *state, uint64_t zpos,
|
||||
struct wl_array *fb_damage_clips_arr) {
|
||||
const struct wlr_output_layer_state *state, struct wlr_drm_fb *fb,
|
||||
uint64_t zpos, struct wl_array *fb_damage_clips_arr) {
|
||||
struct wlr_drm_layer *layer = get_drm_layer(drm, state->layer);
|
||||
|
||||
uint32_t width = 0, height = 0;
|
||||
|
|
@ -190,7 +190,6 @@ static bool set_layer_props(struct wlr_drm_backend *drm,
|
|||
height = state->buffer->height;
|
||||
}
|
||||
|
||||
struct wlr_drm_fb *fb = layer->pending_fb;
|
||||
int ret = 0;
|
||||
if (state->buffer == NULL) {
|
||||
ret = liftoff_layer_set_property(layer->liftoff, "FB_ID", 0);
|
||||
|
|
@ -358,12 +357,10 @@ static bool add_connector(drmModeAtomicReq *req,
|
|||
(uintptr_t)&state->out_fence_fd);
|
||||
}
|
||||
|
||||
if (state->base->committed & WLR_OUTPUT_STATE_LAYERS) {
|
||||
for (size_t i = 0; i < state->base->layers_len; i++) {
|
||||
const struct wlr_output_layer_state *layer_state = &state->base->layers[i];
|
||||
ok = ok && set_layer_props(drm, layer_state, i + 1,
|
||||
fb_damage_clips_arr);
|
||||
}
|
||||
for (size_t i = 0; i < state->base->layers_len; i++) {
|
||||
const struct wlr_output_layer_state *layer_state = &state->base->layers[i];
|
||||
ok = ok && set_layer_props(drm, layer_state,
|
||||
state->layer_fbs[i], i + 1, fb_damage_clips_arr);
|
||||
}
|
||||
|
||||
if (crtc->cursor) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue