From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C37C62836A0 for ; Mon, 13 Jul 2026 07:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=170.10.129.124 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783926025; cv=pass; b=dOsr6H1rRRSK/MtJ7e4/8/RA91y1KBrMLRlUvpUswVQ9eLnecX/J/Imq7QNcDWa69Pk5fYts5dYrrxhc6yMRcjhUrWqPdWBVPIH/rmusC34iJgnjfbqJmSmtDptffGhz/SN1tTUFsVpfyXkHlLDYDo4iO9gUVH5DYqq1wKsrp54= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783926025; c=relaxed/simple; bh=eC5GpoKfKxvsELUEqf2RNXAik2cyFhLNi3JDYAbcpUs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=J6LWXMv7rB0RwDFXOx5up9UJOMXFDsvWpznBZvt7LhqUWNYYpgJeq8wA8kgonuXkNLzck98WPWrhEV6CgFkjt+EPz7fVoCds3Ka32iDUTNAb5FdSXCzSzmcynhsK26GC1sPjkSUDEZlSa2/tJkecSZ/vYgDtn4V/xpjdl5B8Fgk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=B/fojiQT; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=IcAfwHCx; arc=pass smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B/fojiQT"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="IcAfwHCx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783926022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eC5GpoKfKxvsELUEqf2RNXAik2cyFhLNi3JDYAbcpUs=; b=B/fojiQTdlVwcotgVv3TkDqliAd+0ZRO2jvXCd5A+LMw9NzAF3s3qNh5kh5XYaG6uTYqPa c7RKjVej+cSgeQzwXxBBvU0NTTq/hQs2vwB2TxAXOJUhlsJGM1d4rU/8ttX3SAy8XmxvwR /0koRD17ZnSJbBkuag+vuMKtXa/Gsec= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-Ox46CCo8PO6aC5vg5sUmaw-1; Mon, 13 Jul 2026 03:00:21 -0400 X-MC-Unique: Ox46CCo8PO6aC5vg5sUmaw-1 X-Mimecast-MFC-AGG-ID: Ox46CCo8PO6aC5vg5sUmaw_1783926021 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-81e76f0dec0so72590457b3.1 for ; Mon, 13 Jul 2026 00:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783926021; cv=none; d=google.com; s=arc-20260327; b=NIsi+NGKAwNbj5pnp7yKffdNSsr8LqNxFZErOMaYESSuHjqQAEq3ZaR+jIza3kGRH9 gBCpY8768NVybJfGufL5I51hl6D+QiDnr/3y2XPeXHgAIu5b/hitgwATJ5i83Yyk258u F5eyj8z7Vym9iMtpNMaTH75wgjqBRCZHrQFnaTfZfVxTQWidqGCenOt6MU0msN7inp64 oHbLKDoxGHCk3EcZ8au4gcF9wc+SoLvoU0OKsfhs6zo+y/gLDI/hPizqKqtKjVJ8tDCB mr64/Lf87cHl3bzD0i9I4FXR/kyof2XTYN8Jreww3a+D/KjFp1cJYEXPXVe4eQBhYfDU neww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eC5GpoKfKxvsELUEqf2RNXAik2cyFhLNi3JDYAbcpUs=; fh=3NVlevHv3i1GlWXo48vCVnyxZ+5s331N4ruEcHKFc4k=; b=Lv/Mym91o4kCW1pmhkwDq4NqZpPNPYHtNq9lDRfXixq1IY/i4/Jss76S2QhonT72uV TYhQBpNpt6OhoaJE5JOMFrIdzwBJWZiIE9qPjAOvCG249XcTjbUn8OVSktCyl3moB6LD kJU/iFxBmsrUgknPNHfttZ8cpAnTLoAfjoEZKIl+koDSfDiIj7PYpa8lwL3qA8yZY6B+ ARDvZDtzW5h4z8c/RfAy9StlbzH8Yf2f5YTnnYWZzUo7uk5D3EdEPJeDDEj8ukYMvuyD nFoIzeZEHO7ZWDS5HIuyo7h/O/yc5kT0wksuDFACcYi2qMQ2RwDhNk5RsI6pttO02i3u Cx3A==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1783926021; x=1784530821; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=eC5GpoKfKxvsELUEqf2RNXAik2cyFhLNi3JDYAbcpUs=; b=IcAfwHCxex4/lu1HfDTQujc9UyNLjfnxCdcRseQOBMXO7uo8XGYEl1JI5HkIFfTmfb 6NSNdquCX/idBnAo0CRbENA3FPuMHG1BfV/Y6ToFd0/prWvo6sEO+MV3sFb0YWn78srP hJAG06EykHqJBP797lPa/1dO36yUCxM/bd/K1pyBk57ICPNWUv1UopAFMjl34JUDjo2Q ZI2W09iveY4eOjzA62LukPpJDI/Cca7MHxZ12sRZiqfWuz7V+b8XeWgru/xNIz9/OaA5 LMM3TBlWO2JkGoc/h7azvwSv+DXox4NfZMMX6t6zBh4X/3T0b8ci/AhtcKLxMd+1aumx wdaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783926021; x=1784530821; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eC5GpoKfKxvsELUEqf2RNXAik2cyFhLNi3JDYAbcpUs=; b=F9m7VBkUr4XIgIA7q2I+LJw2qcHyXUMu6P4tSoSkBLY5gBg+K2+lMGpD3ObkurfR5D PQdlcgLq6X9qqyU8fan9CYrEa7twzf9I2lzbI5tQMcbd+3PHOVEJXyjYKuCSfqQDMjYg tDXqvUEi78JXxwJQ8Df/sfUnbbH6xLY8YEYXUFb1oQc2yQe7zAymwe4Be270N4JZfDfw qY4Z3s4xsSFqyvuyPsfaEv7ObdIjV2Vn3T4FpomxGmh28bUOncdsKQbSOMQJTSFSmE/8 SzbQKVSNCXIw54YiVvn+YGRH/oHp5LN8uYM11xx/tEQNPYOhr0egtBcmjfECzr0Fe6O3 3zxQ== X-Forwarded-Encrypted: i=1; AHgh+RriGEAoPJS0/O1ueXy6zhrosd66RgdQPK5rW1lvVk5SRFQdRlzZdGb+znUg1ZZ0jWpKHCIlLprq7X+gLrI=@vger.kernel.org X-Gm-Message-State: AOJu0YwTZb2tbu0TRRQUDfnyw3jbz7WBfpyA9Yp1WbmM8AMpwl33dd9a k5FXB0Pbgtypqx4qLRHW7gg+tfEkleAxFoY/rA5um2gGFOFFXg/N9HxT4hJqLhSWLRg0+eM49T1 qxLe7WwY99jpi2Wd/lLJ8OxM/bf6P1awtDl3i5XE+63tOm74EN9vqHqFB10ZXoe/ApWGJzKfLcy 7He0B1IW1DGPQF7MEXc8q6QcqjcVyl0/9QtFmIybu5 X-Gm-Gg: AfdE7cl9lCDVT7W7zPrpEEuvf389+4o7jHlvESNWWG872JhnUKA0IyV/Y5RUapV4TMM 7Fb4/uOw1sQhJIid+YlsdsV5hSkDppCGuZ0e3E2OaC0a7p8vH1U/Occf1+ThlN3vzVuLwF0o/Pa 817XdPUVwZJ2WM4VJgxkFbO/lDXwD+QdICRkYmCmpugDLbvhMn4pLh0DcVszySDDIgeMY= X-Received: by 2002:a05:690c:6f03:b0:80e:dc2:873b with SMTP id 00721157ae682-81e9073d1efmr51155467b3.16.1783926020743; Mon, 13 Jul 2026 00:00:20 -0700 (PDT) X-Received: by 2002:a05:690c:6f03:b0:80e:dc2:873b with SMTP id 00721157ae682-81e9073d1efmr51155287b3.16.1783926020220; Mon, 13 Jul 2026 00:00:20 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260622204343.1994418-1-briandaniels@google.com> <20260712091036.5b0f170c@foz.lan> In-Reply-To: <20260712091036.5b0f170c@foz.lan> From: Albert Esteve Date: Mon, 13 Jul 2026 09:00:08 +0200 X-Gm-Features: AVVi8CeRKs7MaGFl4VgdlnIBfaYMvYk4BjPSu6rUnReNBedWrQaBg8R849tbmoo Message-ID: Subject: Re: [PATCH v4 0/8] media: add virtio-media driver To: Mauro Carvalho Chehab Cc: Brian Daniels , Mauro Carvalho Chehab , acourbot@google.com, adelva@google.com, changyeon@google.com, daniel.almeida@collabora.com, eperezma@redhat.com, gnurou@gmail.com, gurchetansingh@google.com, hverkuil@xs4all.nl, jasowang@redhat.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, mst@redhat.com, nicolas.dufresne@collabora.com, virtualization@lists.linux.dev, xuanzhuo@linux.alibaba.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jul 12, 2026 at 9:10=E2=80=AFAM Mauro Carvalho Chehab wrote: > > On Mon, 22 Jun 2026 16:43:35 -0400 > Brian Daniels wrote: > > > From: Alexandre Courbot > > > > Add the first version of the virtio-media driver. > > > > This driver acts roughly as a V4L2 relay between user-space and the > > virtio virtual device on the host, so it is relatively simple, yet > > unconventional. It doesn't use VB2 or other frameworks typically used i= n > > a V4L2 driver, and most of its complexity resides in correctly and > > efficiently building the virtio descriptor chain to pass to the host, > > avoiding copies whenever possible. This is done by > > scatterlist_builder.[ch]. > > > > This version supports MMAP buffers, while USERPTR buffers can also be > > enabled through a driver option. DMABUF support is still pending. > > In practice, USERPTR was used on several drivers that wanted to > share buffers between V4L2 and GPU (so, a previous approach before > DMABUF implementation). > > On my tests with this driver, I was unable use a 1080p camera with > V4L2 and GPU on crossvm. Lower resolutions worked. No idea if this > was a limitation of crossvm (I only used it to test this driver) > or if it is due to a poor MMAP implementation. > > > > > Compliance Testing > > > > This was tested using v4l2-compliance. Since virtio-media serves as > > a proxy to host devices for the guest VMs, we expect the guest > > compliance test to essentially match the host compliance test for the > > same device. > > > > NOTE: v4l2-compliance changes its test behavior depending on the driver > > name. In the guest, the driver name for virtio-media proxied-devices is > > always "virtio-media", even if the actual host device has a driver name > > of e.g. "uvcvideo". To ensure the test is consistent between the host > > and the guest, I created a patch for the v4l2-compliance tool that > > allows you to override the driver name. All test results that follow us= e > > this patch: > > https://lore.kernel.org/r/20260528163448.4031965-1-briandaniels@google.= com/ > > As mentioned before, please submit this with their rationale in > separate as a [PATCH v4l-utils] to linux-media ML. > > > > > All tests used a Logitech USB Webcam C925e. > > Please test it displaying inside crossvm - or even better to QEMU if > you manage to add virtio-media support to it. > > Being at QEMU makes a lot easier for everyone to test it. Hi, Regarding the QEMU support mention, I created this series in QEMU to add the virtio-media PCI device: https://lore.kernel.org/all/20260630112310.552606-1-aesteve@redhat.com/ Testing was done using an older driver version at https://github.com/chromeos/virtio-media/tree/main/driver as described in the cover letter. But I can try testing it with this series. Either way, the procedure for using QEMU is in the cover letter, so anyone can try it. BR, Albert. > > > Thanks, > Mauro >