virtio: Remove virglrenderer_hw.h entirely

Capset definitions replaced by those in virtgpu_drm.h

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34300>
This commit is contained in:
Aaron Ruby
2025-04-01 14:46:27 -04:00
committed by Marge Bot
parent b1ca6a0b43
commit 8513bcbd2f
11 changed files with 21 additions and 71 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
#include "util/simple_mtx.h"
#include "virglrenderer_hw.h"
#include "virtio/virtio-gpu/drm_hw.h"
#ifdef __cplusplus
extern "C" {
+2 -2
View File
@@ -290,7 +290,7 @@ static int
get_capset(int fd, struct virgl_renderer_capset_drm *caps)
{
struct drm_virtgpu_get_caps args = {
.cap_set_id = VIRGL_RENDERER_CAPSET_DRM,
.cap_set_id = VIRTGPU_DRM_CAPSET_DRM,
.cap_set_ver = 0,
.addr = (uintptr_t)caps,
.size = sizeof(*caps),
@@ -305,7 +305,7 @@ static int
set_context(int fd)
{
struct drm_virtgpu_context_set_param params[] = {
{ VIRTGPU_CONTEXT_PARAM_CAPSET_ID, VIRGL_RENDERER_CAPSET_DRM },
{ VIRTGPU_CONTEXT_PARAM_CAPSET_ID, VIRTGPU_DRM_CAPSET_DRM },
{ VIRTGPU_CONTEXT_PARAM_NUM_RINGS, 64 },
};
struct drm_virtgpu_context_init args = {
-40
View File
@@ -1,40 +0,0 @@
/*
* Copyright 2020 Chromium
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef VIRGLRENDERER_HW_H
#define VIRGLRENDERER_HW_H
#include "venus_hw.h"
#include "virgl_hw.h"
#include "drm_hw.h"
enum virgl_renderer_capset {
VIRGL_RENDERER_CAPSET_VIRGL = 1,
VIRGL_RENDERER_CAPSET_VIRGL2 = 2,
/* 3 is reserved for gfxstream */
VIRGL_RENDERER_CAPSET_VENUS = 4,
/* 5 is reserved for cross-domain */
VIRGL_RENDERER_CAPSET_DRM = 6,
};
#endif /* VIRGLRENDERER_HW_H */
+5 -5
View File
@@ -22,9 +22,9 @@
#include "drm-uapi/virtgpu_drm.h"
#include "util/os_file.h"
#include "util/sparse_array.h"
#include "virtio-gpu/virglrenderer_hw.h"
#include "vn_renderer_internal.h"
#include "virtio/virtio-gpu/venus_hw.h"
#ifndef VIRTGPU_PARAM_GUEST_VRAM
/* All guest allocations happen via virtgpu dedicated heap. */
@@ -96,7 +96,7 @@ struct virtgpu {
uint32_t max_timeline_count;
struct {
enum virgl_renderer_capset id;
uint32_t id;
uint32_t version;
struct virgl_renderer_capset_venus data;
} capset;
@@ -581,7 +581,7 @@ virtgpu_ioctl_getparam(struct virtgpu *gpu, uint64_t param)
static int
virtgpu_ioctl_get_caps(struct virtgpu *gpu,
enum virgl_renderer_capset id,
uint32_t id,
uint32_t version,
void *capset,
size_t capset_size)
@@ -598,7 +598,7 @@ virtgpu_ioctl_get_caps(struct virtgpu *gpu,
static int
virtgpu_ioctl_context_init(struct virtgpu *gpu,
enum virgl_renderer_capset capset_id)
uint32_t capset_id)
{
struct drm_virtgpu_context_set_param ctx_set_params[3] = {
{
@@ -1476,7 +1476,7 @@ virtgpu_init_context(struct virtgpu *gpu)
static VkResult
virtgpu_init_capset(struct virtgpu *gpu)
{
gpu->capset.id = VIRGL_RENDERER_CAPSET_VENUS;
gpu->capset.id = VIRTGPU_DRM_CAPSET_VENUS;
gpu->capset.version = 0;
const int ret =
+6 -5
View File
@@ -19,10 +19,11 @@
#include "util/os_misc.h"
#include "util/sparse_array.h"
#include "util/u_process.h"
#include "virtio-gpu/virglrenderer_hw.h"
#include "drm-uapi/virtgpu_drm.h"
#include "vtest/vtest_protocol.h"
#include "vn_renderer_internal.h"
#include "virtio/virtio-gpu/venus_hw.h"
#define VTEST_PCI_VENDOR_ID 0x1af4
#define VTEST_PCI_DEVICE_ID 0x1050
@@ -57,7 +58,7 @@ struct vtest {
uint32_t max_timeline_count;
struct {
enum virgl_renderer_capset id;
uint32_t id;
uint32_t version;
struct virgl_renderer_capset_venus data;
} capset;
@@ -255,7 +256,7 @@ vtest_vcmd_get_param(struct vtest *vtest, enum vcmd_param param)
static bool
vtest_vcmd_get_capset(struct vtest *vtest,
enum virgl_renderer_capset id,
uint32_t id,
uint32_t version,
void *capset,
size_t capset_size)
@@ -299,7 +300,7 @@ vtest_vcmd_get_capset(struct vtest *vtest,
static void
vtest_vcmd_context_init(struct vtest *vtest,
enum virgl_renderer_capset capset_id)
uint32_t capset_id)
{
uint32_t vtest_hdr[VTEST_HDR_SIZE];
uint32_t vcmd_context_init[VCMD_CONTEXT_INIT_SIZE];
@@ -975,7 +976,7 @@ vtest_destroy(struct vn_renderer *renderer,
static VkResult
vtest_init_capset(struct vtest *vtest)
{
vtest->capset.id = VIRGL_RENDERER_CAPSET_VENUS;
vtest->capset.id = VIRTGPU_DRM_CAPSET_VENUS;
vtest->capset.version = 0;
if (!vtest_vcmd_get_capset(vtest, vtest->capset.id, vtest->capset.version,