From patchwork Fri Dec 20 16:21:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC94EE7718C for ; Fri, 20 Dec 2024 16:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ehuxIelX8DO1vrFPZF560cKcYx8GrjFEJ42I4SDiRJw=; b=xKhZxSjtWlzopDEi2EyXpGtke4 msyJrRh4z3qxPLu7WJap9An/6f6hfZOpDZiMdpzT8lZes750j9OJFORC74HboD66X1mCqv9pMP+RP jvdTMR1r55sqXRbPvZZLMxkA5DN5j+eDOiO5+NpF4W8/Qd5Xxpp9gZHSuVJPslu4kMfzZe9wOfGiu 85QAVvj6KaRhQJMjD3zmctKOQq+iUfQ3oJpMMIQzUlGDzJdFyFcctn+q/oB6V1JQ3C9GCP0wmRJxE 5HLW9PcI3lRPUPIKf1Xdlfh5lgEOE/SyGnSq96p/aKrs3lgsmQK1dYx9lhWf9WgVtabBjwvuPimO8 tjW0nhmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOfpZ-00000005SeW-1cFX; Fri, 20 Dec 2024 16:26:25 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfkz-00000005Rr0-0JU8 for linux-arm-kernel@bombadil.infradead.org; Fri, 20 Dec 2024 16:21:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=ehuxIelX8DO1vrFPZF560cKcYx8GrjFEJ42I4SDiRJw=; b=HPIuvV+ILP9n2VpD0AXXHV+rbi HE8Mb+nimk583IOnnfNzZPAP7roxZWDZ09FL2ckVFpvhNKhbaPxkwVwt9O4IcGbVkQjCgTL/TN5pQ 1nWLqjUEQoyVj0VeHyR/fPaCuWNYAZZJt8myi34ezfpIyU+KPrlpQhiaCPBLUT0ELrLdzThgx0LCO Jl6suvWWsouXzcJG3i4kwU1quysCkeeMZeTnmSJ73RYepjIAmlcybE3wqNM1iIpCb4AUIKnIU6cKr BPSCbgACxgg8lxolYp4IzuC3DfgdBjNzQtEGtX/2fL4iGr+f2+LDl6CqqZgz5SN3Eg5Z46mOPQQ5/ U1DNyrBQ==; Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfkv-00000005iTf-17K0 for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:39 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-436202dd730so15441355e9.2 for ; Fri, 20 Dec 2024 08:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711695; x=1735316495; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ehuxIelX8DO1vrFPZF560cKcYx8GrjFEJ42I4SDiRJw=; b=rJNhXw6iOWb3GjH/xmEnge1W7pDaOemTXGdVT7bSN7BaPGXO35hoXY44vmnMkhxCPp NfduDrcsNIG/X9BuzsqyI6nIM3tYStxU8SyzSIEXCKVIu28RfiBdSwYWeUf9BoOY8swS krC+Xfc+qEIT+4w2srEQJV/ABknxyk8mC+88JO8xbHYlUCpUyXY6Ukkv4JkDJzxdzNow sUG8P3dypA40CNPaYg/7QkDnjMVYMyBzEYXNlfp7xfZK6EjYW91XO9vBwbkWfsAAvH4T ld0QHYVoYFWwuTGUeWmldyt5tkiigpvmCAkeuimy7HdJeiYzn6VLcbKS7/dhsaRomDug FabQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711695; x=1735316495; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ehuxIelX8DO1vrFPZF560cKcYx8GrjFEJ42I4SDiRJw=; b=vrzhE8YJUaC3hBcA2OuCOAtPXVAokqM94g324/rzWV0+rnzUoNpb4rp0NyAinZADU5 30ux4VCiXO6an9qGjREM9cJdruyo7dUoIyAHdiCc0e3Lzf5PY6Snin1wSwefdnia/oN5 Wk+gdoM6Dy7RvnAtIoM7YAR34hcnLVw3i1jrvmgqr4u8QK31K9bxSvZxQJUqRzSNwYvL X/QLiFQQHZhphWwLnWJOQRD05TksB+GU4BXDg+gZ/o8X9HnPiRaTFqvnPIVu337g3x8u FgFIZiJGKszMhpoxlScOsXl7Y88dFm9zW+RQFF5dmz38+cRfVQEjZC6qtNw1NNY0Fsl6 7h3A== X-Forwarded-Encrypted: i=1; AJvYcCUjPWJaIYNRBNlYBTLVgkMM4glWwY+G5zZX35qFdI7xz+eqJUvvgCtBqx2/FVLeX+EAjOU7JQuyq4UFHBgUt3sd@lists.infradead.org X-Gm-Message-State: AOJu0YxSKuQllw0xgvdiAZc0AZbrONBn/gyK7sDDYV1OtQ1KK5EiT4ah t66KQEd4uWimkBY42CXa4gOdaM80gcUFpRzaAfPLS1fjU4VxyLBOonvcNhtU08g= X-Gm-Gg: ASbGnctONMZWCyhBpIaO6oaPxgNxbERIzd+teW/aNVi4Y3h8/rmwbCQorkZu7vfxNYw hyXbkhUGnOiXLPfMc4O8YlruM1p0v/iuNyuJuUXAi3y7vh7gd741JtKOyjyMY1eHPY76tLHSe3A 4vu8mTXhcLuaFVNP3SZbZo36QWoMgGp7mQwiFkq1IwlPMtuaS7xN/ULO8jYdZEBfM6OtFGiOQQn krLDlkrlnf4bq5IOYjW8AGJzXxsb4RyoTSi/L7q6r/21LQ8 X-Google-Smtp-Source: AGHT+IFgSqb5b0E+v9TtN0vGwY/ilsvnvmz9GDFQcbPASO0ILJQEFvVgGISRslh9RDK/uoVDtsQUvg== X-Received: by 2002:a05:600c:450f:b0:434:fb65:ebbb with SMTP id 5b1f17b1804b1-436686461cbmr32737635e9.17.1734711695038; Fri, 20 Dec 2024 08:21:35 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:34 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:12 +0000 Subject: [PATCH 1/7] RFC: media: Add media_request_{pin,unpin} API MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-1-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson , John Cox X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_162137_465875_90245E51 X-CRM114-Status: GOOD ( 13.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ezequiel Garcia This is probably not the API we will want to add, but it should show what semantics are needed by drivers. The goal is to allow the OUTPUT (aka source) buffer and the controls associated to a request to be released from the request, and in particular return the OUTPUT buffer back to userspace, without signalling the media request fd. This is useful for devices that are able to pre-process the OUTPUT buffer, therefore able to release it before the decoding is finished. These drivers should signal the media request fd only after the CAPTURE buffer is done. Tested-by: John Cox Signed-off-by: Ezequiel Garcia Signed-off-by: Dave Stevenson --- drivers/media/mc/mc-request.c | 35 +++++++++++++++++++++++++++++++++++ include/media/media-request.h | 12 ++++++++++++ 2 files changed, 47 insertions(+) diff --git a/drivers/media/mc/mc-request.c b/drivers/media/mc/mc-request.c index 5edfc2791ce7..b5334389d846 100644 --- a/drivers/media/mc/mc-request.c +++ b/drivers/media/mc/mc-request.c @@ -499,3 +499,38 @@ void media_request_object_complete(struct media_request_object *obj) media_request_put(req); } EXPORT_SYMBOL_GPL(media_request_object_complete); + +void media_request_pin(struct media_request *req) +{ + unsigned long flags; + + spin_lock_irqsave(&req->lock, flags); + if (WARN_ON(req->state != MEDIA_REQUEST_STATE_QUEUED)) + goto unlock; + req->num_incomplete_objects++; +unlock: + spin_unlock_irqrestore(&req->lock, flags); +} +EXPORT_SYMBOL_GPL(media_request_pin); + +void media_request_unpin(struct media_request *req) +{ + unsigned long flags; + bool completed = false; + + spin_lock_irqsave(&req->lock, flags); + if (WARN_ON(!req->num_incomplete_objects) || + WARN_ON(req->state != MEDIA_REQUEST_STATE_QUEUED)) + goto unlock; + + if (!--req->num_incomplete_objects) { + req->state = MEDIA_REQUEST_STATE_COMPLETE; + wake_up_interruptible_all(&req->poll_wait); + completed = true; + } +unlock: + spin_unlock_irqrestore(&req->lock, flags); + if (completed) + media_request_put(req); +} +EXPORT_SYMBOL_GPL(media_request_unpin); diff --git a/include/media/media-request.h b/include/media/media-request.h index d4ac557678a7..c48cfb710959 100644 --- a/include/media/media-request.h +++ b/include/media/media-request.h @@ -189,6 +189,10 @@ static inline void media_request_get(struct media_request *req) */ void media_request_put(struct media_request *req); +void media_request_pin(struct media_request *req); + +void media_request_unpin(struct media_request *req); + /** * media_request_get_by_fd - Get a media request by fd * @@ -228,6 +232,14 @@ static inline void media_request_put(struct media_request *req) { } +static inline void media_request_pin(struct media_request *req) +{ +} + +static inline void media_request_unpin(struct media_request *req) +{ +} + static inline struct media_request * media_request_get_by_fd(struct media_device *mdev, int request_fd) { From patchwork Fri Dec 20 16:21:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6888E77188 for ; Fri, 20 Dec 2024 17:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x8tvjSHvBnYEUrXXehqqoug7u5Rbl1jMwLkYtbBCoO8=; b=s102/YLTGKa5vUviY7V8I8LNKN 9K151M1vFSNi0DF7TiQL7QO53LxXtmwG1JN+8JX8ePt17+cBXPyiNq8ilJYIgKG3Od7h0d/XcMteL AY223fffcZAc+cPAaQ4nAY8YdfSIdCFMYpWMcaW9WOGkIhMip2Dy2DV+0X8H91Kks7bPc7SwIjM8L lpiJ6WtYAPjjCxRZrPWvtK3OPd2u2Nq3WBFSgNw5t8v+pOn08/jQhAGtJa2SJUZ/FOiZSeIJ9dIXy u9ut7LIusIU73tTjyMpqlqck8ZVhE93IF0X7wUDVxuCzr1NBALXUsIm+uPDRLZK8FeAYLNwxN68pZ xXh9XjiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOgkn-00000005dB9-0mKM; Fri, 20 Dec 2024 17:25:33 +0000 Received: from mail-wm1-f45.google.com ([209.85.128.45]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfkw-00000005Rpp-3YQX for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:40 +0000 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43618283d48so15694625e9.1 for ; Fri, 20 Dec 2024 08:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711696; x=1735316496; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x8tvjSHvBnYEUrXXehqqoug7u5Rbl1jMwLkYtbBCoO8=; b=iUeLCVgAQlfC6li7RHEMzKoKu1uUPibSDKYbdRg06VlCTZsgYvLFuEIqCOP8qOCgF/ LjN+vhNYYi332DK+KGsa0lK+HKZvSgcjCZMQ6r+PMsrMpH/U8bZwmx9LyhW85dPlLlZJ oiONtME/l8t247jHZ+Nr3HcKV0V/H5fxo4jyP6v2eNwZq70soOBPmKF4WiUewBEFZ3NI 4sQB5xO9Z+Q6jc78S1fi4VwN80tDP+8w1Fq0bvqnTsgytRLJDfhj8Ok79BK8IDXPhHSd hU9U4bnAa2UNe1xK5F4shRkLp67TSeBv1EsP3/EtOsOLOnJ6lu54YFLkAXu7viXqKby/ Uwnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711696; x=1735316496; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x8tvjSHvBnYEUrXXehqqoug7u5Rbl1jMwLkYtbBCoO8=; b=sPZ8Rfs3Fu245eZvooWm39I+f2fwtyGnZ0tw9xPtL+IOdPHtLMaJFb71V5nWeIOu+G 4/sTdgZxxnsudbV/w7qBhO/PE7kRRkTAAYqRze0BpRYU1F9pPCtxG7z+j2+SKUwciUga vmVvnhHfSjFHyS7YQloucvyLyJxeyIwGQ2gbVpuI+gJND3VNlvQ0Zh01s0wsvPi0GVbp EPtk6MSzOAUcBtMD4WNpEGWCIKAfuSAB2x1pvV9FRoF3oWszLLweC8RhQpWzHJAzvYlp fS1icG1j/KrzmIpUheSm/E5W0htzZFJQ/T6KveLxDEvdNaxBFZsbLsmXawGTMQeXgE+6 IbSQ== X-Forwarded-Encrypted: i=1; AJvYcCXPoiGTTKfYbxlx+Jqcw/+xYzuHboGD/gGu0J39IvqexwdF42/6wpedD/jK68J7M4Xu1nF5kwLMF1I4hliKSbVe@lists.infradead.org X-Gm-Message-State: AOJu0YxqQR0Y5OG3aSsIDb49tNv6FhKNhR22InuXN3cbZrt783SvfbYM jCmVHdaW0HDPwHoObrMka6WtoeUbSJJuy0z8oKRBbCo1E95JdagkLUGFPNyjTGo= X-Gm-Gg: ASbGnctDGriAkBuLHcuFueFxz2w6edbHdIKfCwyEWJ9v1CzLHvrS77ix9dihMQ/CxPN I3/znCeOD1ImeesFtfy7/S9H1ba5BK+iDRRsMr7wU+SxwxlidoJhr/CgefoL66BZZIGMaSbgkRz Of3EIVOGxxn+ACw4trtayoBFEltFGKmgZQBTLfdRF9HXehB47w8Q8yBvx3o5dmWUrJb6kgAoA57 R9bS7SXGTUwhkqb781LNbRCpNvmivYUXAd0Kav39y4E3VvE X-Google-Smtp-Source: AGHT+IEVPW76VkTXU2nIJfPsd/7W6ZLfDVF9Rnt4kJTE9CYOpNt7uO369Z3pkgOqLTDRQ8mK233MkA== X-Received: by 2002:a05:600c:1ca7:b0:434:fe3c:c67c with SMTP id 5b1f17b1804b1-43668b5e201mr28263535e9.26.1734711696100; Fri, 20 Dec 2024 08:21:36 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:35 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:13 +0000 Subject: [PATCH 2/7] docs: uapi: media: Document Raspberry Pi NV12 column format MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-2-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_082138_969403_9E567108 X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Raspberry Pi HEVC decoder uses a tiled format based on columns for 8 and 10 bit YUV images, so document them as NV12MT_COL128 and NV12MT_10_COL128. Signed-off-by: Dave Stevenson --- .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst index b788f6933855..90414491d7b5 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst @@ -827,6 +827,48 @@ Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian ord - Cb\ :sub:`11` - Cr\ :sub:`11` +NV12MT_COL128 and NV12MT_10_COL128 +---------------------------------- + +``V4L2_PIX_FMT_NV12MT_COL128`` is a tiled version of +``V4L2_PIX_FMT_NV12M`` where the two planes are split into 128 byte wide columns +of Y or interleaved CbCr. + +NV12MT_10_COL128 expands that as a 10 bit format where 3 10 bit values are +packed into a 32bit word. A 128 byte wide column therefore holds 96 samples +(either Y or interleaved CrCb). That effectively makes it 6 values in a 64 bit +word for the CbCr plane, as the values always go in pairs. + +Bit-packed representation. + +.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 8 8 8 8 + + * - Y'\ :sub:`00[7:0]` + - Y'\ :sub:`01[5:0] (bits 7--2)` Y'\ :sub:`00[9:8]`\ (bits 1--0) + - Y'\ :sub:`02[3:0] (bits 7--4)` Y'\ :sub:`01[9:6]`\ (bits 3--0) + - unused (bits 7--6)` Y'\ :sub:`02[9:4]`\ (bits 5--0) + +.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 12 12 12 12 12 12 12 12 + + * - Cb\ :sub:`00[7:0]` + - Cr\ :sub:`00[5:0]`\ (bits 7--2) Cb\ :sub:`00[9:8]`\ (bits 1--0) + - Cb\ :sub:`01[3:0]`\ (bits 7--4) Cr\ :sub:`00[9:6]`\ (bits 3--0) + - unused (bits 7--6) Cb\ :sub:`02[9:4]`\ (bits 5--0) + - Cr\ :sub:`01[7:0]` + - Cb\ :sub:`02[5:0]`\ (bits 7--2) Cr\ :sub:`01[9:8]`\ (bits 1--0) + - Cr\ :sub:`02[3:0]`\ (bits 7--4) Cb\ :sub:`02[9:6]`\ (bits 3--0) + - unused (bits 7--6) Cr\ :sub:`02[9:4]`\ (bits 5--0) + Fully Planar YUV Formats ======================== From patchwork Fri Dec 20 16:21:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6ADBCE7718B for ; Fri, 20 Dec 2024 16:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x7IbY/YnqtHAUDFghwcKoK/zkq5StHeb++vxI+BXHd4=; b=GsnaGhXhzEkRrfgYomieE7Ob/6 kh0ngZGuGxaxU6LDVoB6rwDIgRoozejUfOXBWfSJLHaKTbVQ8Q8YFOisChvQCMkJaIdmkTK8LNbOR nAzafuih2kNnfN5IaClmpQkEI+R80OtfVb4hDQjXjUPCDOIaPeFTYilmiGhjm/eDYpGB4g+bBwhG+ qzzejmzxHQyjtnOBYRzkc6B1B6ymeKQHMzaOYZcw+D0oUWL/nY3RncgkI3Dfr79rqZUfUyvVYiJuF fUu8c43yPoQhv0gVarVah9hCp6Jp/8JhIOGzF12d0pxawyyVa0bruwEVGujSvwLLhJu6xlUJ5fnFx BYqrjF1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOfnD-00000005S9T-091U; Fri, 20 Dec 2024 16:23:59 +0000 Received: from mail-wm1-f43.google.com ([209.85.128.43]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfkw-00000005Rpu-426W for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:40 +0000 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso20485405e9.0 for ; Fri, 20 Dec 2024 08:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711697; x=1735316497; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x7IbY/YnqtHAUDFghwcKoK/zkq5StHeb++vxI+BXHd4=; b=efOA8/TBL+JsO4Ythmb8jdqsdp5KmkkF1MmQwpsa1lPhizrZV33BkdxMpn3hMxIb34 oMxAsGl010kZWOFXBlLuOplGrRozR/8Ca2mLFY200tSxwQ5/b8sBW61ZjWHIO/sTQZ/Z NluP+pwnMJnzx6zb5qlC2rWQ9/V5RnIzZLjlvdzqm7zlaYAxWSx3sq7WvC8oCcOj4mh3 cYWejAtu5M+Vi50PgL+O9vV+eumFdnhetKPVCAGTfH972CCI1qWwRgXyWTsLyt54JKH1 BLqiOOGftKJqJPtRXRCUDQxgg1W45Ri/rRsgEUz+coIada66x0TV3ZMomppZ4Uv5NZRc vfOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711697; x=1735316497; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7IbY/YnqtHAUDFghwcKoK/zkq5StHeb++vxI+BXHd4=; b=kCfvPtlTTBDRXYKINcPBW8SB5oHJAXfXhC2fdwNT9cLGXQbgHAYL8yQKrLrpK8hiyF 65dk7HLywBQEicLpPoKwgnT7Eorgwl0HM3ALA4BMiFbpEzBqZ0GvMLqAyea/w3mCn8hL DmhJGbk17lxT6wpxeLg97AqpMDVuCQBlfn6eYO0hcLjJ7De+tJurV75o2vm1CpmOwexY lEZEQyHg45F3GMy22fDMKVWsg+TeNMH57cjJdfZKzXG+G2NHNDm35ZHNi0+w7ACVCpxJ Nth45i5UX0HBLbcGQA0sCcVmkQE/VlAv+OlAAJ3yOhYJaTvFiXtThDSDdx5EQpkUVNan 7vpQ== X-Forwarded-Encrypted: i=1; AJvYcCWIxbUrHfkNc38+Ges44zhRNvP5RV8QQU6H37msn74cLOp2t+mPQCQmYh2fORacOiJUM33DqH/+Ut6gltyF9TxZ@lists.infradead.org X-Gm-Message-State: AOJu0YzitDDXzyv+Ll3dk2px+PDjKY52S2MPDeAG8x0CTRWRAvG0R74B 5lYH87sZQ2D5zACNoyU7mbzcIAY1yggycPTpAD1/pHGvskQHq1PaRp2CHHHe6Bs= X-Gm-Gg: ASbGncsY4KP68P47VSYAr/2vkSmEPrn2kCi7ZRKXbLdMex32R2IhOp6ENGq43iHIY5v 3YdToLatb66vF3K6Wxi1dKKJovSVguEz6nzcHjuplK5nEwaqeIYGbY9snWQwbk9VAewDtMp3T7x uLsuR9+LIeFqNFwLDJcji2zEN64A3bAmXqJvTmNIi4M4T8D6+r1NpOEkHLDuRBObqXX6jhYbnYa +TpAleGmnur/QV5rzSWoOJ7NvzPZo+BwdGIPugl1NCLS6HJ X-Google-Smtp-Source: AGHT+IEAPTJ5m18DH1xYnQd8cUicgjor10RVrkkz1NLTlQt2JRNWxgVG080MQ9UkLDrS81AzW5xAKg== X-Received: by 2002:a05:600c:45cf:b0:434:a781:f5e2 with SMTP id 5b1f17b1804b1-43668642289mr31526005e9.8.1734711696988; Fri, 20 Dec 2024 08:21:36 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:36 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:14 +0000 Subject: [PATCH 3/7] media: ioctl: Add pixel formats NV12MT_COL128 and NV12MT_10_COL128 MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-3-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_082139_003473_37557343 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add V4L2_PIXFMT_NV12MT_COL128 and V4L2_PIXFMT_NV12MT_10_COL128 to describe the Raspberry Pi HEVC decoder NV12 multiplanar formats. Signed-off-by: Dave Stevenson --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 0304daa8471d..e510e375a871 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1377,7 +1377,9 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_NV16M: descr = "Y/UV 4:2:2 (N-C)"; break; case V4L2_PIX_FMT_NV61M: descr = "Y/VU 4:2:2 (N-C)"; break; case V4L2_PIX_FMT_NV12MT: descr = "Y/UV 4:2:0 (64x32 MB, N-C)"; break; + case V4L2_PIX_FMT_NV12MT_COL128: descr = "Y/CbCr 4:2:0 (128b cols)"; break; case V4L2_PIX_FMT_NV12MT_16X16: descr = "Y/UV 4:2:0 (16x16 MB, N-C)"; break; + case V4L2_PIX_FMT_NV12MT_10_COL128: descr = "10-bit Y/CbCr 4:2:0 (128b cols)"; break; case V4L2_PIX_FMT_P012M: descr = "12-bit Y/UV 4:2:0 (N-C)"; break; case V4L2_PIX_FMT_YUV420M: descr = "Planar YUV 4:2:0 (N-C)"; break; case V4L2_PIX_FMT_YVU420M: descr = "Planar YVU 4:2:0 (N-C)"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index e7c4dce39007..f8f97aa6a616 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -687,6 +687,11 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ #define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ #define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */ +#define V4L2_PIX_FMT_NV12MT_COL128 v4l2_fourcc('N', 'c', '1', '2') /* 12 Y/CbCr 4:2:0 128 pixel wide column */ +#define V4L2_PIX_FMT_NV12MT_10_COL128 v4l2_fourcc('N', 'c', '3', '0') + /* Y/CbCr 4:2:0 10bpc, 3x10 packed as 4 bytes in + * a 128 bytes / 96 pixel wide column */ + /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ From patchwork Fri Dec 20 16:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB4C3E7718C for ; Fri, 20 Dec 2024 17:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dRQf5pCtS98olBDfm75Y/wTQJYSNQxlX5eEUv/v7GTM=; b=VT3Dla2BFDLhQAd3HelAEU6Zty R8zYwTLWc5tCyPn+SAOevz9qpaAcFFYAuEdfeTCsjh59f2n4a2ZY38x9U5i/UWFlwyxjSFcH2urx0 BoCjdybVFMsD+8OPlpJiApVJHS21+Q6L0JUlP84TvYMiLQDaD9MSqxJo8/6cOw5r5D1osJ+DkCtS8 G24LWEMLYJOKxld269B0rpe7M2bAZB9iovHSncYKWGKfKX9iLNCiMR1aHtAJ/WaaNtNPxmVk8tuXR X4v+OVkTaHKqK6JsssyHoK9MmfmgXCZgvfkhjtSpNrAHEI9XXCc1yEeDzpGF63vvYYZV6BKhjVtdD yiLRI5MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOhCK-00000005hrA-2baa; Fri, 20 Dec 2024 17:54:00 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfkx-00000005Rpx-3CEQ for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:41 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4361d5dcf5bso22687075e9.3 for ; Fri, 20 Dec 2024 08:21:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711698; x=1735316498; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dRQf5pCtS98olBDfm75Y/wTQJYSNQxlX5eEUv/v7GTM=; b=Ef5qP4s+2o3hcTgIuk2fXuGwZgpOzvyOzQxZJqJKoaANGL+PB8jyRCTVrI4B6qtEiG Gpd8RJs+wvoPKyIUqf9FX8mdwN/LJ3SB0ysEUxaBUPWBIYlXz7KykiHY1MGakx5bz6Xh OuJZtXTRtfs1/Xw1tNgBKIPhe3RiFqcm1nyglWAsf9qfDuniITeRgxRCxCrnCWt1EGYj E42Oqf1ae18LwHJpP6MdVx+pzvDLK6qDtKswosZ0G7UY3SRvFOErQZLb436dU1U+tnYQ SPd6HxvNlkIPhhfOMMKNj9lwjCQ8QQ5TYBMFL2QZw7ppKAeikNAW//oYvqfgzCsPqSmW z78w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711698; x=1735316498; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dRQf5pCtS98olBDfm75Y/wTQJYSNQxlX5eEUv/v7GTM=; b=C+aNWaJnM5B+lRCmsf9qlZfGl53qikUAphIIvGuk/nEbbxbnwtkgaCQAorI5/bTG8F oZYK5MaH0gre7RP1/AUudPlZbGb6of7aDuFQG2tcygeO5a1qoPBV86se++ZhajMTczF3 3FyF27yhxuld0fC0IH0x+5VWomswKamAuDbrhTgbRGMgHwS7f2AEFdqFNsFvzS+o+7yK a1r93npwL/TaDKxPVpF/LtZAdZjYtYPYA1CWDeZGp1ePmnc1+c/X+qx3rjXG/KLEsHI0 VRQakSESLb1U6q3nAAAGgq0QyJsnxURkAJxwCHQck7WIW67Kk7KYaT9ShWSyKf2L/QXl eSHQ== X-Forwarded-Encrypted: i=1; AJvYcCWXGtMD36iwaMy8OziEmcKGJymjW+mHAJWWg+N1ZSAgvDxMxumtqJJSNZMY/seIGafQNz1jVdTTK36chEsFUI8H@lists.infradead.org X-Gm-Message-State: AOJu0YwZ7h9lAD9atJzvLh+1joFhsOuTplyICRlG7JCan95QAZywakUi dWR4PLU4TXLjf1Tbr+PjAgfYV2Lyj9o98jPtpi+CBhJdtkZSYOheQP49BAAo+Y4= X-Gm-Gg: ASbGncvwXDrCdRESkq8BWtDiLvilgu4p716SUEveaQQ6ps3SXxLs68vyACEWRYkbmQO xREbYs+3MU8JijoafDKUL6UBuXCPK+3ZWDsY85QtBFBqWOsSnqj+Ru4yiFSnQgJU4kEMIFuciDP fGUrXh2obsG9/T4RBiyWqrGY4vCYsiKoEFq83C9JnxoLY/tzJwBGXWtFkpI/P2jSWMUuv54SxY5 8ChLQNXhM496IZGXsctt5mZ7KY50n+Q2+wK0Ez62S9Y5Mxd X-Google-Smtp-Source: AGHT+IFxW+RopysqEF8jPbYWDmorW73wBvGIWAYULKR3uETdewbravBIGqJ2B2OrN6Kmdympczu2lQ== X-Received: by 2002:a05:6000:1fab:b0:385:e30a:394e with SMTP id ffacd0b85a97d-38a221e2066mr4017975f8f.3.1734711697793; Fri, 20 Dec 2024 08:21:37 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:37 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:15 +0000 Subject: [PATCH 4/7] media: dt-bindings: media: Add binding for the Raspberry Pi HEVC decoder MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-4-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_082139_815920_992591A5 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4, and BCM2712 / Raspberry Pi 5. Signed-off-by: Dave Stevenson --- .../bindings/media/raspberrypi,hevc-dec.yaml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml new file mode 100644 index 000000000000..d9e804300297 --- /dev/null +++ b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/raspberrypi,hevc-dec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Raspberry Pi HEVC Decoder + +maintainers: + - John Cox + - Dom Cobley + - Dave Stevenson + - Raspberry Pi internal review list + +description: |- + The Raspberry Pi HEVC decoder is a hardware video decode accelerator block + found in the BCM2711 and BCM2712 processors used on Raspberry Pi 4 and 5 + boards respectively. + +properties: + compatible: + enum: + - raspberrypi,hevc-dec + + reg: + items: + - description: The HEVC main register region + - description: The Interrupt control register region + + reg-names: + items: + - const: intc + - const: hevc + + interrupts: + maxItems: 1 + + clocks: + items: + - description: The HEVC block clock + + clock-names: + items: + - const: hevc + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + + video-codec@7eb10000 { + compatible = "raspberrypi,hevc-dec"; + reg = <0x7eb10000 0x1000>, /* INTC */ + <0x7eb00000 0x10000>; /* HEVC */ + reg-names = "intc", + "hevc"; + + interrupts = ; + + clocks = <&clk 0>; + clock-names = "hevc"; + }; + +... From patchwork Fri Dec 20 16:21:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED580E77188 for ; Fri, 20 Dec 2024 16:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v2BNxauvgR86wVgxl1iZjGE4qN7o21GTD/GjGRmEaXA=; b=i0Z82UD7KPqG5iI1gn0JGWSRy+ /pyFjR+l7c2GytSN2oCguzwPXvmMqLkOvx2HwDHBL1m/ETbVQbnbeyDLCW8LzpMXwTFfbx4/FptwA fgNPDEQqNEaXApjKAbEc3TLiYRvXpFVFt1F1UFlefwnqH49OF77LZqgd+UQ8d6+MnZF6EAydnkalY YybN8VyQXGKleYUOwFQZRBMOYb63VPmO8V7wS1sNoZ0nRZkNRc+H5NomboSR/Oloz1r/DQ93J5QTX BAPX8NPNWLWCVbSM1ID8iJAcF+em0WuQkvrnGUK5pIy/LhUPCOt7hJ2fQ33oqPhxG4X64P3YcKKLU LVYEGHkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOfry-00000005T3l-46Ue; Fri, 20 Dec 2024 16:28:54 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfl2-00000005RsB-3YxX for linux-arm-kernel@bombadil.infradead.org; Fri, 20 Dec 2024 16:21:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=v2BNxauvgR86wVgxl1iZjGE4qN7o21GTD/GjGRmEaXA=; b=FcE7CXmdkMLuIpQu6zU7VeMJGn TmpjXAIRewJVXRH23tiFVR+ngmnOAR9EQt2HanPvZ117SjI81Evq2y/9x+mbaZUDE4G8RFys5YfwK y53h+J3m1fkx8bSbxae39VRucRIukqKejG5Eea38ZIu7G4b3BFvsmpu2Wq403iEB6xikwhadEiJXY OLgLZrhEC8miVGLqOhdWeCGzJoXiRz3uXBbQLrq9n/2tsokvRs6xqXfHGve2kt9qOMLpd2slBH0mq u1QvxsKujFBFFLjxsF/ovhCqKv7moMBKIVhtAiYreG0pZtkY6BafZgOYdmu05ACZ01w6tEYoKx/M+ 9VwXwOIw==; Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfl0-00000005iWK-0tN3 for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:43 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43623f0c574so14645075e9.2 for ; Fri, 20 Dec 2024 08:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711700; x=1735316500; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=v2BNxauvgR86wVgxl1iZjGE4qN7o21GTD/GjGRmEaXA=; b=X1unj05JjHoQ9ho4A0Xcv6iYDa0J0OhlN149DBGIVfAPn6R2PDKfBOK6QpEqf+AqsH eNM86uJ20ki0CtLwpnnlo08dFA/2orXwsY1BJkRZJ/ags0GWRP/bad8hRDbIBkfQrLny RrHbhleNAo28sfqgZLQFjP8Oqu75cFuLvgTiNxaoMl4A4mrZhga2/7IjE+meGl6ZhZ/p r3l6tZW0+46DHQVcjKoFCAeN6NLjao+Us1V+dBUp9PJxD0s6ba3ZzcNLLILocMQfyrAD 22ZuJGT9ph4a9T+wNAR+v8MW/aS0H6Sq77EYObuhfP793VXkSVTe8Lq1PGeRTWAwRX9l 28UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711700; x=1735316500; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2BNxauvgR86wVgxl1iZjGE4qN7o21GTD/GjGRmEaXA=; b=N9O04QLaPO2PbRXsh9OmpLufJ3cIzcW/VWCgXMSw0f5GYjlo/hFd0sR+/JZ7FM4iWC wV5+hZKk6bVEW7g5GpPGbSya8/OsloLqfaGRUw6ZHPux7XLUBgmKaxuKHCQuFe8z/bVb kkQvB4nUJeggWdRLyKdfUry/buNWdFw4cdduWNNBk8BfzRZxeSdkpUXwoR2oo8p9NdWY 6XkTScT3EPEDFYzSpzTIEVQC4d3J3zf90S4gcVlOGA3KBiRz9DZEIvcL278TIuHWSjgm ENBlaf/vU5bD8FtcydcCYhmMS2hH/udLfQKu0tdTXcnRRQvaMGlrO1KejKnZF11GiC9v vsZw== X-Forwarded-Encrypted: i=1; AJvYcCUvpsprTrRQXIP4ARFGWhMMiL0xKR18R+Lqkzal77u5gf3LaHXiOkMg0LwWrJkrd/tYQFYhu37x43OFeKz9Zen0@lists.infradead.org X-Gm-Message-State: AOJu0Yz50XwJg2qAtzetHe75z5t1ppLV4dKCuADvYybowLfmTYX4NW6r Z3upn6lWyQMXJWpONrqH2KdAFH69pLXMYx+oOgTZrlqnu/I/1945xbEUlE1TWt8= X-Gm-Gg: ASbGnctoPBHesFLMAg/4s568btDFBVWejSYZuJp2N4CNJTMyH3l/zqlFBplOB7CBWhY DLZPRp8K4zx8kMkCZLHv5Jjm6lESze5FG5cHiRRwi4cCsa8kj4KaPa2BaLuA76BtNnFYE/7/3ej W/8v8/Ywxv85a/vH9FSCNZEk5J0U2H0pCfMtbXHAsWhfrtLvG7D1nVKfL3tzCXcp8ew33rtdlhS ja/nVlJDU2YTojR7EDcVYUoEeHUCi/CzeZsMDmtCTDcMtZl X-Google-Smtp-Source: AGHT+IHZKwXSt3EtkR4/vJsXBDTgJju7+F4kSqL+22sBCcY1J09BA0FGI2cPpS1gnn5GDXEf6EXehw== X-Received: by 2002:a05:600c:138d:b0:434:ff08:202b with SMTP id 5b1f17b1804b1-43668643173mr32952625e9.12.1734711699939; Fri, 20 Dec 2024 08:21:39 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:39 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:17 +0000 Subject: [PATCH 6/7] RFC: v4l2-mem2mem: Remove warning from v4l2_m2m_job_finish MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-6-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_162142_335984_6C7251A6 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: John Cox The Raspberry Pi HEVC decoder has a 2 stage pipeline where the OUTPUT buffer is finished with before the CAPTURE buffer is ready. v4l2_m2m_job_finish allows us to do this, however as the driver handles VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF, this warn fires on every buffer as drivers that hold capture buffers are expected to use v4l2_m2m_buf_done_and_job_finish (introduced with [1]). That doesn't allow us to handle not returning the destination buffer. [1] Commit f8cca8c97a63 ("media: v4l2-mem2mem: support held capture buffers") Signed-off-by: John Cox Signed-off-by: Dave Stevenson --- drivers/media/v4l2-core/v4l2-mem2mem.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index eb22d6172462..325a518beff7 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -490,13 +490,6 @@ void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev, unsigned long flags; bool schedule_next; - /* - * This function should not be used for drivers that support - * holding capture buffers. Those should use - * v4l2_m2m_buf_done_and_job_finish() instead. - */ - WARN_ON(m2m_ctx->out_q_ctx.q.subsystem_flags & - VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF); spin_lock_irqsave(&m2m_dev->job_spinlock, flags); schedule_next = _v4l2_m2m_job_finish(m2m_dev, m2m_ctx); spin_unlock_irqrestore(&m2m_dev->job_spinlock, flags); From patchwork Fri Dec 20 16:21:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13917059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC85AE7718B for ; Fri, 20 Dec 2024 16:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=av9B4J24iSkn+3gVD9YhMsMCbMdNI6QkecYKJAVC1Bg=; b=TeW3qeUL0277KVC34zQNrJTjcT UPL4AmEOsKxfbwdZSu1UB18LymEwfjZe+qUY/ise/ElVxOD929YSnEZZ3Ex1rKoPUn2Wkwyxl01IO uoQ/yV79f1X+umCrAtIlhGHVLPmWcYIKDUv79eF5XBEFM28OEg1j2KkZVfIv3sQI6ENxv0SSwt5if 9K2fARqcBEGNl3lWT0MW5sgEu97EFJQsrzKX2gkOx9wNsuBZ3/zImgXh12HDUTeB12lkYPWBUIjoM E5F74r3ykVmf/hNUoYLmY2Am3UWgzHSIM+xI+0Uqb1N3gdnQoCw9+EaIWLOb4YSOAAJ4k7z5PeNaK bSj5hrRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOft6-00000005TEt-0VoR; Fri, 20 Dec 2024 16:30:04 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfl3-00000005RsD-1LtX for linux-arm-kernel@bombadil.infradead.org; Fri, 20 Dec 2024 16:21:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=av9B4J24iSkn+3gVD9YhMsMCbMdNI6QkecYKJAVC1Bg=; b=N9FWmxj6A30vS730bACGkGaby0 k6hPvTbEFinIBsrkCtkc7OBwFDIPocGHJM4jnkOrQwcC9JU4sy4PlNhjeN/oqcwafffODE65I21/0 xKXj78HP/zMj0UUTUz1duZj/u2Mi1vanyedGVPBkTiXqS6TjQ8jbmYXMuaqiGGaOQma0nbEXCLQ01 o9jcbtFftwtOJH33c4NOSmgZJKZeTfnpGQeV0k53a9fRnYax/Ej3orjRUHuXyEs38E1OchlPrOK/N U16/pfjaVDos1Ny/625l6WPMUx4had4uAeqQ2cGAIAr8KX6wsJ3/+mDSk1AWYURVFafDEAOvc5QJs YLInZfHg==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOfl0-00000005iX2-1UVL for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 16:21:44 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-436637e8c8dso16553935e9.1 for ; Fri, 20 Dec 2024 08:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734711701; x=1735316501; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=av9B4J24iSkn+3gVD9YhMsMCbMdNI6QkecYKJAVC1Bg=; b=bo+mZtxSU9AnWapi6wjiH7lHrV5JfVvVtB2JXnR759p9RwPeDhV5sNAw2MtHSQtgQ4 VjPnF+ZaACERhFgZmrflg9QwKNEVwHWjUwmfcsTsogYyLrcIqZM4l+qryUKGp3X2HbHu 4QaxfkDttvV+/O/vfwvivfGhuaBxJPnO+4Bk3k3Xkb+4Xi8Tx3PKNl+DSmzBxDvvDZbJ 2VtM4CwN9A44zsiwrQHXM63Xd2dCZLyqi1WxB2sFE/q0bVKafSxekhDpx9gKYwRGQ9Y+ M+bmE3yi1ICvB6rqhuU+XruZ3aFJhEu33Cg9xUWoFCN4WV4XJ+KSI7lm5/66rNLubh7u /kCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711701; x=1735316501; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=av9B4J24iSkn+3gVD9YhMsMCbMdNI6QkecYKJAVC1Bg=; b=jPqwcqyPqHIMALxXb0F3hDOrD6FfFhULDZdZZkXYIeG9/IiDTu69AtLfJIUPtL/G4h ZvQxfi1y94PLy6GBSdaK3Qk346VJM4U6JM2yxnB/fYynM+xh2prhKQiWCGFvH2QF8Z9p 4bbUgh/EdsegmoEQyYSYDEa6HlhGSuvBhyo13W5a5DmV0osz5Eu4zwnxKB3iJTaTxE9v BHuPJAcI1FC1lL0gET0snDqGmBc6StibXaLqcAvGAKhqrw9V+EifaFO3I8vBkKflc++Y E62yidz3TcLjPoDiu/uvUQP94lzagKB4JA8s9waBf/tJKSewXydnQYwmzeJHqySfI1PQ DWZA== X-Forwarded-Encrypted: i=1; AJvYcCWbm+avaAwWZjaD34PEz/DyX3TDL6qeaHNnlW6LCXTaGyzCE/Uy4n0TtUaWps45ACwytF5C15GteAjxolm2Ni8t@lists.infradead.org X-Gm-Message-State: AOJu0YwfNvHlK9rOj/uDqyoB8TqhRRlgJlVQ1dzhWmp1DgD2u1YrQAPm D9Yxp3YrdxcVWMysXTxXTnMMRFGKZEnZRUrtvJkCOP3qYVePQOiyHCS4b2BcsCE= X-Gm-Gg: ASbGnctnDinJkJWS/IueEB8wwnG6DhRVm4Pygzr7ueWt27hv/OzV3pWQo66BTE0EV1H lbWRWCf0DYbKS0R7MXrZ9pZN4uVs5PBYD8Mi1a4aHaVvBM8LJ8yXmDrK1qHy9RR+NItRinE73T6 pZEclIYywFxX5NHDnsUeXTSLe2pteS/zmA/0OZ0sFNNI4fc5xsH56AHgrDS2jnp/9Xz0rzX8fIc RMzrNYQLMyJ/TQlGJSZCKde+8SrMf3S0eqOTg5T3oXbUDAg X-Google-Smtp-Source: AGHT+IHg6VTmT54UYl9JM2Jsfkok9cq3oZeEbcD5pJ5HR0oeS3QenygH1VZpwXBGmdab27CtHTitYQ== X-Received: by 2002:a05:600c:35c1:b0:434:a94f:f8a9 with SMTP id 5b1f17b1804b1-43668b7873emr26854825e9.28.1734711700897; Fri, 20 Dec 2024 08:21:40 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-43656b013e1sm82824045e9.12.2024.12.20.08.21.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:21:40 -0800 (PST) From: Dave Stevenson Date: Fri, 20 Dec 2024 16:21:18 +0000 Subject: [PATCH 7/7] arm: dts: bcm2711-rpi: Add HEVC decoder node MIME-Version: 1.0 Message-Id: <20241220-media-rpi-hevc-dec-v1-7-0ebcc04ed42e@raspberrypi.com> References: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> In-Reply-To: <20241220-media-rpi-hevc-dec-v1-0-0ebcc04ed42e@raspberrypi.com> To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , John Cox , Dom Cobley , review list , Ezequiel Garcia Cc: John Cox , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241220_162142_531968_C54A8A2C X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the configuration information for the HEVC decoder. Signed-off-by: Dave Stevenson --- arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi | 5 +++++ arch/arm/boot/dts/broadcom/bcm2711.dtsi | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi index 6bf4241fe3b7..43fa2d82cedc 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi @@ -105,3 +105,8 @@ &vchiq { &xhci { power-domains = <&power RPI_POWER_DOMAIN_USB>; }; + +&hevc_dec { + clocks = <&firmware_clocks 11>; + clock-names = "hevc"; +}; diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/dts/broadcom/bcm2711.dtsi index e4e42af21ef3..0a1f05a26a6a 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi @@ -628,6 +628,15 @@ v3d: gpu@7ec00000 { resets = <&pm BCM2835_RESET_V3D>; interrupts = ; }; + + hevc_dec: codec@7eb10000 { + compatible = "raspberrypi,hevc-dec"; + reg = <0x0 0x7eb10000 0x1000>, /* INTC */ + <0x0 0x7eb00000 0x10000>; /* HEVC */ + reg-names = "intc", + "hevc"; + interrupts = ; + }; }; };