mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 19:50:24 +01:00
gfxstream: get rid of logspam in virtualized case
In the case of running a Linux VM using some other capability set than gfxstream, some logspam may be triggered. Fix this. CC: mesa-stable Reviewed-by: Aaron Ruby <aruby@qnx.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35109>
This commit is contained in:
parent
d7f6400762
commit
126af1feb9
1 changed files with 9 additions and 1 deletions
|
|
@ -7,9 +7,9 @@
|
|||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <xf86drm.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "LinuxVirtGpu.h"
|
||||
#include "drm-uapi/virtgpu_drm.h"
|
||||
#include "util/detect_os.h"
|
||||
#include "util/log.h"
|
||||
|
||||
#ifdef MAJOR_IN_MKDEV
|
||||
|
|
@ -191,6 +192,13 @@ int32_t LinuxVirtGpuDevice::init(int32_t descriptor) {
|
|||
mCaps.params[i] = params[i].value;
|
||||
}
|
||||
|
||||
#if !DETECT_OS_ANDROID
|
||||
if ((mCaps.params[kParamSupportedCapsetIds] & (1 << VIRTGPU_DRM_CAPSET_GFXSTREAM_VULKAN)) ==
|
||||
0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
auto capset = getCapset();
|
||||
get_caps.cap_set_id = static_cast<uint32_t>(capset);
|
||||
switch (capset) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue