radeonsi/virtio: support vpipe
For now use an environment variable to test the virtio code using vpipe. Exposing DRM_PRIME_CAP_EXPORT manually is required, otherwise gbm platform will fallback to dummy buffers which aren't supported. Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Acked-by: Rob Clark <robdclark@chromium.org> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
This commit is contained in:
committed by
Marge Bot
parent
84c137ff14
commit
a96356b26e
@@ -16,6 +16,7 @@
|
||||
#include "util/u_video.h"
|
||||
#include "vl/vl_video_buffer.h"
|
||||
#include <sys/utsname.h>
|
||||
#include "drm-uapi/drm.h"
|
||||
|
||||
/* The capabilities reported by the kernel has priority
|
||||
over the existing logic in si_get_video_param */
|
||||
@@ -1148,6 +1149,11 @@ void si_init_screen_caps(struct si_screen *sscreen)
|
||||
caps->cl_gl_sharing = true;
|
||||
caps->call_finalize_nir_in_linker = true;
|
||||
|
||||
/* Fixup dmabuf caps for the virtio + vpipe case (when fd=-1, u_init_pipe_screen_caps
|
||||
* fails to set this capability). */
|
||||
if (sscreen->info.is_virtio)
|
||||
caps->dmabuf |= DRM_PRIME_CAP_EXPORT | DRM_PRIME_CAP_IMPORT;
|
||||
|
||||
caps->fbfetch = 1;
|
||||
|
||||
/* Tahiti and Verde only: reduction mode is unsupported due to a bug
|
||||
|
||||
@@ -1664,6 +1664,8 @@ struct pipe_screen *radeonsi_screen_create(int fd, const struct pipe_screen_conf
|
||||
#ifdef HAVE_AMDGPU_VIRTIO
|
||||
if (strcmp(version->name, "virtio_gpu") == 0) {
|
||||
rw = amdgpu_winsys_create(fd, config, radeonsi_screen_create_impl, true);
|
||||
} else if (debug_get_bool_option("AMD_FORCE_VPIPE", false)) {
|
||||
rw = amdgpu_winsys_create(-1, config, radeonsi_screen_create_impl, true);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user