mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +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>
(cherry picked from commit 126af1feb9)
This commit is contained in:
parent
f9b723f0b6
commit
3b265663aa
2 changed files with 10 additions and 2 deletions
|
|
@ -2294,7 +2294,7 @@
|
|||
"description": "gfxstream: get rid of logspam in virtualized case",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
|
||||
|
|
@ -192,6 +193,13 @@ int32_t LinuxVirtGpuDevice::init(int32_t descriptor) {
|
|||
mCaps.params[i] = params[i].value;
|
||||
}
|
||||
|
||||
#if !DETECT_OS_ANDROID
|
||||
if ((mCaps.params[kParamSupportedCapsetIds] & (1 << VIRTGPU_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