gfxstream: connect to the specificied kumquat socket
An multi-threaded test might want: - launch multiple kumquats - connect each thread to a specific instance of kumquat. Reviewed-by: Aaron Ruby <aruby@blackberry.com> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:

committed by
Marge Bot

parent
0f7101a5dc
commit
d41987eaae
@@ -47,12 +47,12 @@ VirtGpuKumquatDevice::VirtGpuKumquatDevice(enum VirtGpuCapset capset, int32_t de
|
||||
PARAM(VIRTGPU_KUMQUAT_PARAM_CREATE_GUEST_HANDLE),
|
||||
};
|
||||
|
||||
(void)descriptor;
|
||||
int ret;
|
||||
struct drm_kumquat_get_caps get_caps = {0};
|
||||
struct drm_kumquat_context_init init = {0};
|
||||
struct drm_kumquat_context_set_param ctx_set_params[3] = {{0}};
|
||||
const char* processName = nullptr;
|
||||
std::string gpu_socket_path = "/tmp/kumquat-gpu-";
|
||||
|
||||
memset(&mCaps, 0, sizeof(struct VirtGpuCaps));
|
||||
|
||||
@@ -60,7 +60,13 @@ VirtGpuKumquatDevice::VirtGpuKumquatDevice(enum VirtGpuCapset capset, int32_t de
|
||||
processName = getprogname();
|
||||
#endif
|
||||
|
||||
ret = virtgpu_kumquat_init(&mVirtGpu, nullptr);
|
||||
if (descriptor >= 0) {
|
||||
gpu_socket_path.append(std::to_string(descriptor));
|
||||
} else {
|
||||
gpu_socket_path.append("0");
|
||||
}
|
||||
|
||||
ret = virtgpu_kumquat_init(&mVirtGpu, gpu_socket_path.c_str());
|
||||
if (ret) {
|
||||
ALOGV("Failed to init virtgpu kumquat");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user