mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Zhang <julia.zhang@amd.com>
To: "Juergen Gross" <jgross@suse.com>,
	"Gurchetan Singh" <gurchetansingh@chromium.org>,
	"Chia-I Wu" <olvaffe@gmail.com>,
	"David Airlie" <airlied@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Xenia Ragiadakou" <burzalodowa@gmail.com>,
	"Erik Faye-Lund" <kusmabite@gmail.com>,
	"Qiang Yu" <yuq825@gmail.com>,
	"Marek Olšák" <marek.olsak@amd.com>,
	"Robert Beckett" <bob.beckett@collabora.com>,
	"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
	"Honglei Huang" <honglei1.huang@amd.com>,
	"Chen Jiqian" <Jiqian.Chen@amd.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Julia Zhang" <julia.zhang@amd.com>,
	"Julia Zhang" <julizhan@amd.com>
Subject: [PATCH] virtio-gpu: Remove stride and layer_stride check for dGPU prime on VM
Date: Wed, 5 Jul 2023 11:56:22 +0800	[thread overview]
Message-ID: <20230705035622.2841499-1-julia.zhang@amd.com> (raw)

Remove stride and layer_stride check in virtio-gpu so that virgl can
send transfer data command with non zero stride to sync up data from
guest to host for dGPU prime on VM.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23896

Signed-off-by: Julia Zhang <julizhan@amd.com>
---
 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 5d05093014ac..4d3f8d36e3c7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -414,11 +414,6 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev,
 		goto err_put_free;
 	}
 
-	if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-		ret = -EINVAL;
-		goto err_put_free;
-	}
-
 	ret = virtio_gpu_array_lock_resv(objs);
 	if (ret != 0)
 		goto err_put_free;
@@ -473,11 +468,6 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
 	} else {
 		virtio_gpu_create_context(dev, file);
 
-		if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-			ret = -EINVAL;
-			goto err_put_free;
-		}
-
 		ret = virtio_gpu_array_lock_resv(objs);
 		if (ret != 0)
 			goto err_put_free;
-- 
2.34.1


                 reply	other threads:[~2023-07-05  3:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230705035622.2841499-1-julia.zhang@amd.com \
    --to=julia.zhang@amd.com \
    --cc=Jiqian.Chen@amd.com \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bob.beckett@collabora.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=burzalodowa@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=honglei1.huang@amd.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julizhan@amd.com \
    --cc=kraxel@redhat.com \
    --cc=kusmabite@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.olsak@amd.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=olvaffe@gmail.com \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=ray.huang@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=yuq825@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®