simple-dmabuf-drm: require zwp_linux_dmabuf_v1 v3
We effectively require it as we don't react to dmabuf_format, only to dmabuf_modifiers, so there's a chance we may not get the supported formats information at all. Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Daniel Stone
parent
678aabe829
commit
1166f8e9a1
@@ -85,7 +85,6 @@ struct display {
|
|||||||
int nv12_format_found;
|
int nv12_format_found;
|
||||||
uint64_t nv12_modifier;
|
uint64_t nv12_modifier;
|
||||||
int req_dmabuf_immediate;
|
int req_dmabuf_immediate;
|
||||||
int req_dmabuf_modifiers;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct drm_device {
|
struct drm_device {
|
||||||
@@ -821,16 +820,10 @@ registry_handle_global(void *data, struct wl_registry *registry,
|
|||||||
d->fshell = wl_registry_bind(registry,
|
d->fshell = wl_registry_bind(registry,
|
||||||
id, &zwp_fullscreen_shell_v1_interface, 1);
|
id, &zwp_fullscreen_shell_v1_interface, 1);
|
||||||
} else if (strcmp(interface, "zwp_linux_dmabuf_v1") == 0) {
|
} else if (strcmp(interface, "zwp_linux_dmabuf_v1") == 0) {
|
||||||
int ver;
|
if (version < 3)
|
||||||
if (d->req_dmabuf_modifiers)
|
return;
|
||||||
ver = 3;
|
|
||||||
else if (d->req_dmabuf_immediate)
|
|
||||||
ver = 2;
|
|
||||||
else
|
|
||||||
ver = 1;
|
|
||||||
d->dmabuf = wl_registry_bind(registry,
|
d->dmabuf = wl_registry_bind(registry,
|
||||||
id, &zwp_linux_dmabuf_v1_interface,
|
id, &zwp_linux_dmabuf_v1_interface, 3);
|
||||||
ver);
|
|
||||||
zwp_linux_dmabuf_v1_add_listener(d->dmabuf, &dmabuf_listener, d);
|
zwp_linux_dmabuf_v1_add_listener(d->dmabuf, &dmabuf_listener, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -861,7 +854,6 @@ create_display(int opts, int format)
|
|||||||
assert(display->display);
|
assert(display->display);
|
||||||
|
|
||||||
display->req_dmabuf_immediate = opts & OPT_IMMEDIATE;
|
display->req_dmabuf_immediate = opts & OPT_IMMEDIATE;
|
||||||
display->req_dmabuf_modifiers = (format == DRM_FORMAT_NV12);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hard code format if the platform egl doesn't support format
|
* hard code format if the platform egl doesn't support format
|
||||||
|
|||||||
Reference in New Issue
Block a user