From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3FCEA3FF1DA; Fri, 15 May 2026 15:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860242; cv=none; b=dauskRCm3aG0AzMFBd90mDUH+rMTALdZqtQeVuOGmwHwL9fm88z7olKt88GJeLJXp1/D3sPH/dJ8ccVd365F4Lpo/HiqIZ3fZaNb1XkQsIH6SSa0Z/35v1//FTVGfNvJVzcrwJbFJFdWcdJbyPr68N1AK8+GqlJtBMUnJZ8gTwo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860242; c=relaxed/simple; bh=axg92FLX0j6zo7tXKD1VGbNEics6H8W9ohHOmUuni54=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rx0DGMt5Ykmlz3uqe/K3A/QARLXNxJxNl8YXNZJnVjvKfq4JY6FRUxg0jqGyvONof+JUzwiTnqa0IMLeOnHJ0oDFti9bBD7YCbOcvG311agsY99zWgI1PQ9p1W7Qjnk12PpRqEaDMdtZNy14ataf9wYe+oGaFSeJef29sgZqcfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BUpg1bIJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BUpg1bIJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAF88C2BCB0; Fri, 15 May 2026 15:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778860242; bh=axg92FLX0j6zo7tXKD1VGbNEics6H8W9ohHOmUuni54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BUpg1bIJ8vPJZX8rEoa3SHDE5eUF0vOWVF4rUOgu9SH0XFHNq3kVMn9+Do/xWGlI/ C7qhF1PX9w2R2JWX5T6gf2r4Y10rmgh2vSvS6sTvxqnfEBEIjbaypCIUQ16Bqo3dDI VIYbXPIKoFTgMposT3Uh8wsPVRGm6vhK3aSkZvSc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ricardo Ribalda , Laurent Pinchart , Hans de Goede , Hans Verkuil Subject: [PATCH 6.12 002/144] media: uvcvideo: Enable VB2_DMABUF for metadata stream Date: Fri, 15 May 2026 17:47:08 +0200 Message-ID: <20260515154653.531876920@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515154653.469907118@linuxfoundation.org> References: <20260515154653.469907118@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ricardo Ribalda commit fbac03467e53d8d72e5099c03df26d9adae11416 upstream. The UVC driver has two video streams, one for the frames and another one for the metadata. Both streams share most of the codebase, but only the data stream declares support for DMABUF transfer mode. I have tried the DMABUF transfer mode with CONFIG_DMABUF_HEAPS_SYSTEM and the frames looked correct. This patch announces the support for DMABUF for the metadata stream. This is useful for apps/HALs that only want to support DMABUF. Cc: stable@vger.kernel.org Fixes: 088ead2552458 ("media: uvcvideo: Add a metadata device node") Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Reviewed-by: Hans de Goede Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-1-fc8b87bd29c5@chromium.org Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/uvc/uvc_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -218,7 +218,7 @@ int uvc_queue_init(struct uvc_video_queu int ret; queue->queue.type = type; - queue->queue.io_modes = VB2_MMAP | VB2_USERPTR; + queue->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; queue->queue.drv_priv = queue; queue->queue.buf_struct_size = sizeof(struct uvc_buffer); queue->queue.mem_ops = &vb2_vmalloc_memops; @@ -231,7 +231,6 @@ int uvc_queue_init(struct uvc_video_queu queue->queue.ops = &uvc_meta_queue_qops; break; default: - queue->queue.io_modes |= VB2_DMABUF; queue->queue.ops = &uvc_queue_qops; break; }