Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18296877rwd; Tue, 27 Jun 2023 15:00:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fReZw7wnYgzgKkUkFCg/f0+1E+TLsSN9I3SNoEK6lxxKBsdu+yHxbz8HwCYU1Ju0SYBAy X-Received: by 2002:aa7:dbd9:0:b0:518:7ad9:64bb with SMTP id v25-20020aa7dbd9000000b005187ad964bbmr22086451edt.19.1687903206718; Tue, 27 Jun 2023 15:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687903206; cv=none; d=google.com; s=arc-20160816; b=iLqYkWHDrIzohuTDUW4s06hhDjXxHJq0HkUh5V7g3vGOIBT1m5Og0QVso1o4kRcCLW E2VokqdOM1ToWizWYSihYrjI7QusBhIUUBJq7z6UxNdrVZ4x7RVgbgkCJEMRiP5QlymV x9QIgR6g0yBIAxTuk2o50nHAFLUDjmXCDtdNmIH4Tk3ZFCgdwEkasfX3GoiJ80RqIjqY X7oZAjSFEEkNhjqzxZliofPBHvkgFZgxAGKpMi7BdLXRNruN2+l9OuSKWRubyMaCjLJ0 34wC0AU+w5P1GJIGxQy6qaFFXvp6OgPqBzhC885/UcR3nnndCiyqLBx1/DUtCE443nvq P35w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lovDh0f1HoN/hr+c8ZKChGSkRfc9AwqDwegn/jkLxsk=; fh=R1fKKnvz0anVmD9ACD6MlNbYQvyB/ouHA74OOm0zbws=; b=fdnL1gVQFHXsAcTp64Em31xCD/EQ0EBvtlQNrnQWRkTqYT6VpONcUreC/XqjhvGi9Q 05vbRS2bVNbUfeNtXjgxCzPNjNvTCm3p82tpHF1m9Pz0QFXAFeTavy8/Qtjxbnnfolmd 2+ynwo9jf3qsX33GIBlKxr6/xMz5lEOTPzHo20AqdWfhfyGoqWQD5/Fo4oyO841eblr1 IU1hDKH4IM9JiVdNr58T1QOry2tNzLrGcU+QGk36nn05PaLjfl4iEcimDRZZ1rRF0Jhs migAgbirPAwi7Js0ea7tXyr9U9FUSJABReQ1aRZH+mZc91bxjQrDiapf0wPyifft6XKk /dKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ayyHcKhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q25-20020aa7d459000000b00518a604e243si4376848edr.20.2023.06.27.14.59.42; Tue, 27 Jun 2023 15:00:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ayyHcKhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbjF0Vq1 (ORCPT + 99 others); Tue, 27 Jun 2023 17:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbjF0Vq0 (ORCPT ); Tue, 27 Jun 2023 17:46:26 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0F922726; Tue, 27 Jun 2023 14:46:24 -0700 (PDT) Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id A80B16607165; Tue, 27 Jun 2023 22:46:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687902383; bh=kkctlcmF7HHs9xmRVKmHoOLxTdyllUjYdjDvH2KJ+iM=; h=From:To:Cc:Subject:Date:From; b=ayyHcKhCA4DCZx5dTMACPJUsF4zsnIbu4EJzI+jyCdJUuGS8MjA+LnswqAFBCHFRR j2Hg14iJyo1nDnoPdQ8M6RB8dys5mvt0QspJzqpmx4vGUoorDwywBPe8iri2BYgfi7 KGiDU5hUX+r9/hiPHY/yAzX5nagnFcWD4/GcCB3V0+Bje7EkxgB9bwjvISS86e8pDN AntFF1mbj2vMTtte+quz9tDCGjY6xYWV2J2VXIFSZzxIkMGtW8lyefHJG72b1Cev4P Kx04gPTfwYE0Wr7AlNfXdq5PgOi5UogFYg/JXKmIQpUST0E5OYM/rAdtPHcxLX1zfh BXbEodfJ0LUlQ== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger , Hans Verkuil Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Andrew-CT Chen , Conor Dooley , Krzysztof Kozlowski , Mauro Carvalho Chehab , Rob Herring , Tiffany Lin , Yunfei Dong , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v4 0/7] Enable decoder for mt8183 Date: Tue, 27 Jun 2023 17:45:50 -0400 Message-ID: <20230627214615.1503901-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series enables the hardware decoder present on mt8183. At first glance, the only missing piece is the devicetree node for it, however, simply adding it as is would cause an address collision between the first register iospace and the clock-controller node, so a rework of the dt-binding and driver, as well as addition of a new syscon phandle property, were needed first. Tested that H264 decoding works with the hardware decoder on mt8183-kukui-jacuzzi-juniper-sku16, giving a fluster score of 98/135 on the JVT-AVC_V1 test suite. And ensured other SoCs (MT8192 and MT8195) still work as usual. Changes in v4: - Removed VDEC_SYS reg from mt8173 as well - Made driver handling cleaner Changes in v3: - Switched the handling of the VDEC_HW_ACTIVE bit to use a syscon instead of the 'active' clock Changes in v2: - Merged commit 1 (media: dt-bindings: mediatek,vcodec: Allow single clock for mt8183) into commit 3 (media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183) - Further constrained properties in dt-binding - Added CLK_IGNORE_UNUSED flag to active clock - Reformatted reg-names in DT node NĂ­colas F. R. A. Prado (6): media: dt-bindings: mediatek,vcodec: Allow single clock for mt8183 media: dt-bindings: mediatek,vcodec: Don't require assigned-clocks media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS register space media: mediatek: vcodec: Define address for VDEC_HW_ACTIVE media: mediatek: vcodec: Read HW active status from syscon arm64: dts: mediatek: mt8173: Drop VDEC_SYS reg from decoder Yunfei Dong (1): arm64: dts: mediatek: mt8183: Add decoder .../media/mediatek,vcodec-decoder.yaml | 67 ++++++++++++---- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 8 +- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 30 ++++++++ .../mediatek/vcodec/mtk_vcodec_dec_drv.c | 76 ++++++++++++++++--- .../mediatek/vcodec/mtk_vcodec_dec_hw.c | 4 +- .../mediatek/vcodec/mtk_vcodec_dec_hw.h | 3 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + .../mediatek/vcodec/mtk_vcodec_util.c | 15 ++++ .../mediatek/vcodec/mtk_vcodec_util.h | 2 + .../mediatek/vcodec/vdec/vdec_vp8_if.c | 10 +-- 10 files changed, 177 insertions(+), 39 deletions(-) -- 2.41.0