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 2BE5B3E0087; Fri, 15 May 2026 16:17:54 +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=1778861874; cv=none; b=GKl9k+NaHBXXJaI8vOwkxXM1SDvACPBGPbFwt+BnsO2aDGt2i8cyQ7g82UuqCBTww1q39L5RJIJhkwDaJCPY101D2gNj7uCLtLu8rXXrW8o0PmLbnavgrn+L6LVmii39Qn+FL74h0WNLciAhF1qKiX9/+cEG39SCDr+b0ScWkqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778861874; c=relaxed/simple; bh=dFIpGIwqYDBw36xmNrE6LYFlKG5EXFu6+0mVEgaUtLA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AKixLCzY7KYgBr8g5VBkYyY7E+srp4m2IGV8molxvk5W1WJrkl9aG4HB+wIfqs2e6Oey8YINHXfEzQsyANjgqPxpo+zVjnKonmhnWDg8JoVhHd+ratVB1yB4Zng7tai13g4YYlacmuPXI7bEq+yj+wbvxbonoC8MaSPMZXFRSSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=emLqNWom; 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="emLqNWom" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D001C2BCB0; Fri, 15 May 2026 16:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778861874; bh=dFIpGIwqYDBw36xmNrE6LYFlKG5EXFu6+0mVEgaUtLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=emLqNWomaY+hyl5dn2IMRegsbYON2hsdTUITxBCfAwdjd5LsqSP47hgX5R3c7r1l/ iy2CpmYe1raAf0VHQdz5oRdEBm1atXbFzSq6CJtN56piOOsIsWjDadefQ/NF8UoQKC BMU3KbRx8QzrBSgsu02DVu1yfhg508Xrk/WOvL3s= 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.18 007/188] media: uvcvideo: Enable VB2_DMABUF for metadata stream Date: Fri, 15 May 2026 17:47:04 +0200 Message-ID: <20260515154657.469631727@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515154657.309489048@linuxfoundation.org> References: <20260515154657.309489048@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.18-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 @@ -243,7 +243,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; @@ -256,7 +256,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; }