From nobody Mon Feb 9 23:02:15 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=chromium.org ARC-Seal: i=1; a=rsa-sha256; t=1682650464; cv=none; d=zohomail.com; s=zohoarc; b=nWQwp226sx0G6aO6xLWWYvol/GOUfFfpX1nVWmjjBfEVxTl4v8QY/17YIrvM6V1GnoZw7Nhcy58z9Sk7AzlAk3e7+bE9OzfF6Tn+Jp1CK+KTvBLOBHzMl1fjKWiE+IUSHGhRi5tGNzbgmYg1yDxrOTGTWoIGvV9XvqvmjlgULkg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682650464; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YCU7uFC25jpplt0AFEL9jwm9NKDRPYKBERABoJsHfkw=; b=ltrolyHVvIJ2T1opnFg9twvJAHBfvQ1ZVH/ianwuZWaGoJhlQ/myCaDWMB9Nawp+I8PEG0y1lCxAY3fWZseLDLJnhdQk55ev5CToHztH2P8q0BVnUYgzr3zDaCOXl4RRsjb2tgaF5LeVzgkkFW7FJNoOrVDs5DCGzL5VYqBNuXM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682650464380597.3725398383674; Thu, 27 Apr 2023 19:54:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psEEI-00055w-Np; Thu, 27 Apr 2023 22:53:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psEEF-000550-Rz for qemu-devel@nongnu.org; Thu, 27 Apr 2023 22:52:59 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psEEE-0005aJ-39 for qemu-devel@nongnu.org; Thu, 27 Apr 2023 22:52:59 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-63b70f0b320so11528731b3a.1 for ; Thu, 27 Apr 2023 19:52:57 -0700 (PDT) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:a7:2:9f50:6799:fba2:1f53]) by smtp.gmail.com with ESMTPSA id z21-20020a62d115000000b0063d24fcc2b7sm13854437pfg.1.2023.04.27.19.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 19:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682650376; x=1685242376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YCU7uFC25jpplt0AFEL9jwm9NKDRPYKBERABoJsHfkw=; b=mKFu3ATvXgCBB9yOL8RBbLyWlEYfkw9bo0R6/5DeqoE1R8+/Rc6xxvrkPjR3RKyxkr qV+uNrTXpo0lCNnpZoWSCzPuLkSZ5kNcY2tPA+MuwvaPme+7w3W7S3sOqhbU2UfwTo7I 4n+fszsPxc5gtM7PP22uXc3kaVlkgD3jTW1Dw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682650376; x=1685242376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YCU7uFC25jpplt0AFEL9jwm9NKDRPYKBERABoJsHfkw=; b=bm8S9mlZVrX05Wz6Fn2kheBo1prtqhdIuDiU9gPb4ixS1OeeCDxEVX93H1ufxfRACs tvyrE9tursppNrfXUZQCCvKxOY3kSXSiCnKaLhPuqdUbd9YNn/kALWYOxxuCpe7j/X/r bypaPR/lC14x6X79uKbcmW9+mp17IKCBgGx7+imYq0nNfuxgDrpZgZ8NJTkVoKL2yCP1 43CKqTMSnkmLQijQHDx3kQHFAaJXnhBVdTJqJaVM0+pt3WSwksTzUmtFnaml6klKozE8 /KGKeYT3ab6mKGQ65wdLByxgJhDbyt8GbRIYIuptZcHx/inqLLrnx9pQ/trjg5MGWAmJ 6wGw== X-Gm-Message-State: AC+VfDwhyCkkJYd+bcOis8XYdWeYMRZBfHLLavDkYY75fqEOtqOBjZLR VXp1dQA5lH66aUrtmBTn5pt153x4qgvKL2gYEss= X-Google-Smtp-Source: ACHHUZ60GfnkCW0f6eGPFPG6h5t7vvsWn6AIOdX9chFozbzGOWe/JpNpd8jY5OBTjfVwcSB3EMUzpA== X-Received: by 2002:a05:6a00:18aa:b0:63d:2f12:fa35 with SMTP id x42-20020a056a0018aa00b0063d2f12fa35mr6280796pfh.26.1682650376171; Thu, 27 Apr 2023 19:52:56 -0700 (PDT) From: Gurchetan Singh X-Google-Original-From: Gurchetan Singh To: qemu-devel@nongnu.org Cc: philmd@linaro.org, david@redhat.com, kraxel@redhat.com, marcandre.lureau@redhat.com, akihiko.odaki@gmail.com, dmitry.osipenko@collabora.com, ray.huang@amd.com, alex.bennee@linaro.org Subject: [PATCH 1/5] hw/display/virtio-gpu-virgl: virtio_gpu_gl -> virtio_gpu_virgl Date: Thu, 27 Apr 2023 19:52:47 -0700 Message-Id: <20230428025251.603-2-gurchetansingh@google.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230428025251.603-1-gurchetansingh@google.com> References: <20230428025251.603-1-gurchetansingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=gurchetansingh@chromium.org; helo=mail-pf1-x42e.google.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @chromium.org) X-ZM-MESSAGEID: 1682650465912100007 From: Gurchetan Singh The virtio-gpu GL device has a heavy dependence on virgl. Acknowledge this by naming functions accurately. Signed-off-by: Gurchetan Singh Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v1: - (Philippe) virtio_gpu_virglrenderer_reset --> virtio_gpu_virgl_reset_ren= derer hw/display/virtio-gpu-gl.c | 27 ++++++++++++++------------- hw/display/virtio-gpu-virgl.c | 2 +- include/hw/virtio/virtio-gpu.h | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index e06be60dfb..7d69050b8c 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -25,9 +25,10 @@ =20 #include =20 -static void virtio_gpu_gl_update_cursor_data(VirtIOGPU *g, - struct virtio_gpu_scanout *s, - uint32_t resource_id) +static void +virtio_gpu_virgl_update_cursor(VirtIOGPU *g, + struct virtio_gpu_scanout *s, + uint32_t resource_id) { uint32_t width, height; uint32_t pixels, *data; @@ -48,14 +49,14 @@ static void virtio_gpu_gl_update_cursor_data(VirtIOGPU = *g, free(data); } =20 -static void virtio_gpu_gl_flushed(VirtIOGPUBase *b) +static void virtio_gpu_virgl_flushed(VirtIOGPUBase *b) { VirtIOGPU *g =3D VIRTIO_GPU(b); =20 virtio_gpu_process_cmdq(g); } =20 -static void virtio_gpu_gl_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) +static void virtio_gpu_virgl_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) { VirtIOGPU *g =3D VIRTIO_GPU(vdev); VirtIOGPUGL *gl =3D VIRTIO_GPU_GL(vdev); @@ -71,7 +72,7 @@ static void virtio_gpu_gl_handle_ctrl(VirtIODevice *vdev,= VirtQueue *vq) } if (gl->renderer_reset) { gl->renderer_reset =3D false; - virtio_gpu_virgl_reset(g); + virtio_gpu_virgl_reset_renderer(g); } =20 cmd =3D virtqueue_pop(vq, sizeof(struct virtio_gpu_ctrl_command)); @@ -87,7 +88,7 @@ static void virtio_gpu_gl_handle_ctrl(VirtIODevice *vdev,= VirtQueue *vq) virtio_gpu_virgl_fence_poll(g); } =20 -static void virtio_gpu_gl_reset(VirtIODevice *vdev) +static void virtio_gpu_virgl_reset(VirtIODevice *vdev) { VirtIOGPU *g =3D VIRTIO_GPU(vdev); VirtIOGPUGL *gl =3D VIRTIO_GPU_GL(vdev); @@ -104,7 +105,7 @@ static void virtio_gpu_gl_reset(VirtIODevice *vdev) } } =20 -static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp) +static void virtio_gpu_virgl_device_realize(DeviceState *qdev, Error **err= p) { VirtIOGPU *g =3D VIRTIO_GPU(qdev); =20 @@ -143,13 +144,13 @@ static void virtio_gpu_gl_class_init(ObjectClass *kla= ss, void *data) VirtIOGPUBaseClass *vbc =3D VIRTIO_GPU_BASE_CLASS(klass); VirtIOGPUClass *vgc =3D VIRTIO_GPU_CLASS(klass); =20 - vbc->gl_flushed =3D virtio_gpu_gl_flushed; - vgc->handle_ctrl =3D virtio_gpu_gl_handle_ctrl; + vbc->gl_flushed =3D virtio_gpu_virgl_flushed; + vgc->handle_ctrl =3D virtio_gpu_virgl_handle_ctrl; vgc->process_cmd =3D virtio_gpu_virgl_process_cmd; - vgc->update_cursor_data =3D virtio_gpu_gl_update_cursor_data; + vgc->update_cursor_data =3D virtio_gpu_virgl_update_cursor; =20 - vdc->realize =3D virtio_gpu_gl_device_realize; - vdc->reset =3D virtio_gpu_gl_reset; + vdc->realize =3D virtio_gpu_virgl_device_realize; + vdc->reset =3D virtio_gpu_virgl_reset; device_class_set_props(dc, virtio_gpu_gl_properties); } =20 diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index 1c47603d40..ffe4ec7f3d 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -599,7 +599,7 @@ void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g) } } =20 -void virtio_gpu_virgl_reset(VirtIOGPU *g) +void virtio_gpu_virgl_reset_renderer(VirtIOGPU *g) { virgl_renderer_reset(); } diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 2e28507efe..21b0f55bc8 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -281,7 +281,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd); void virtio_gpu_virgl_fence_poll(VirtIOGPU *g); void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g); -void virtio_gpu_virgl_reset(VirtIOGPU *g); +void virtio_gpu_virgl_reset_renderer(VirtIOGPU *g); int virtio_gpu_virgl_init(VirtIOGPU *g); int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g); =20 --=20 2.40.1.495.gc816e09b53d-goog