mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: "Sergio Lopez" <slp@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Daniel Verkamp" <dverkamp@chromium.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"David Airlie" <airlied@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Gurchetan Singh" <gurchetansingh@chromium.org>,
	"Chia-I Wu" <olvaffe@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Rob Clark" <robdclark@gmail.com>,
	fnkl.kernel@gmail.com
Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RFC v2 5/5] drm/virtio: add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE to params
Date: Fri, 14 Feb 2025 20:13:12 +0300	[thread overview]
Message-ID: <f6d6de4d-1b87-4a53-a2eb-0d9ddfbc4311@collabora.com> (raw)
In-Reply-To: <20250214-virtio-shm-page-size-v2-5-aa1619e6908b@redhat.com>

On 2/14/25 18:16, Sergio Lopez wrote:
> diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> index c33c057365f85a2ace536f91655c903036827312..4b49635b4fe1d4256f219823341cef8e5fa8f029 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> @@ -117,6 +117,11 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data,
>  	case VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME:
>  		value = vgdev->has_context_init ? 1 : 0;
>  		break;
> +	case VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE:
> +		if (!vgdev->has_host_visible)
> +			return -EINVAL;

Nit: virtio_gpu_getparam_ioctl() returns EINVAL for unsupported params.
While this is a supported param, but there is no hostmem available.
Hence, should a different error code, maybe ENOENT or ENXIO.

-- 
Best regards,
Dmitry

  reply	other threads:[~2025-02-14 17:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 15:16 [RFC PATCH v2 0/5] virtio: obtain SHM page size from device Sergio Lopez
2025-02-14 15:16 ` [PATCH RFC v2 1/5] virtio_config: add page_size field to virtio_shm_region Sergio Lopez
2025-02-20  3:07   ` Dmitry Osipenko
2025-02-14 15:16 ` [PATCH RFC v2 2/5] virtio: introduce VIRTIO_F_SHM_PAGE_SIZE Sergio Lopez
2025-02-20  3:08   ` Dmitry Osipenko
2025-02-14 15:16 ` [PATCH RFC v2 3/5] virtio-pci: extend virtio_pci_cap with page_shift Sergio Lopez
2025-02-20  3:14   ` Dmitry Osipenko
2025-02-14 15:16 ` [PATCH RFC v2 4/5] virtio-mmio: read shm region page size Sergio Lopez
2025-02-20  3:20   ` Dmitry Osipenko
2025-02-20 10:24     ` Sergio Lopez Pascual
2025-02-20 13:31       ` Dmitry Osipenko
2025-02-14 15:16 ` [PATCH RFC v2 5/5] drm/virtio: add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE to params Sergio Lopez
2025-02-14 17:13   ` Dmitry Osipenko [this message]
2025-02-17  7:19     ` Sergio Lopez Pascual

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=f6d6de4d-1b87-4a53-a2eb-0d9ddfbc4311@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dverkamp@chromium.org \
    --cc=eperezma@redhat.com \
    --cc=fnkl.kernel@gmail.com \
    --cc=gurchetansingh@chromium.org \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mst@redhat.com \
    --cc=olvaffe@gmail.com \
    --cc=robdclark@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=slp@redhat.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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®