From patchwork Mon May 6 13:45:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13655504 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A27937FBD0 for ; Mon, 6 May 2024 13:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003313; cv=none; b=iEJk/c5TzOo2C184TbDHls877mhGnIY2U4k7hui56HjK6MyfO0BVtkJ4I1GNr8m55hOBjyIZUAPgWpDOBA4A5oTfLXXfHdnlFNYxQVjM3PYxVKoUw833J7OoC5GAMC8L8ZwM0C1CJX0Cpk6YpqzCpiZ0meaV/79UHlcKrzHpabI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003313; c=relaxed/simple; bh=KkTKkbItVaoNaebdlZbTplZomRRkcshA7Z5iO0bO4bU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=kW81Op/iPuY20kzPNsT3sTAuMVwE7bx6PVR1t3eZBeTDJ7DzXJToZBAM35rgmfpH9MHB7ZjqMwJiAGas3lOAz2kRXfyO/kZD+5kAFj8PZeZkkAmFqIg/e4uK8Efb8VPle2RyNZ8vxrUyWnq9Z+9IeJb6umFg4xtCaFSnZ7etNvQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr; spf=pass smtp.mailfrom=freebox.fr; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b=tHmY2rea; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freebox.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b="tHmY2rea" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2e38a7ebdb6so8271921fa.2 for ; Mon, 06 May 2024 06:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715003309; x=1715608109; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=jmr0hfgWJAF/7VHtSyTJsAvmgssCMuwvQVaPUW5EW3A=; b=tHmY2rea40SZGtV3urQvOGojFdJ84Xu2RZLL7uYIwm+t7JvRW474Qx0Su5oetg4It0 18KAGe4Y8tlBcRjiV5XgdXxyJndv/j3uTLWqHk4Dmz5cH1JgWvC8YFWTLja1AKPhe88K ZXClSkDJ7oxWjP8VGljiBnSfLw1AYluOJsVbLo4VAHJ9Gl1tjeabS16FXom1IN2EK3Bf JGG725cs41wGhilnK8WrrVfuuh6lDOCTo38lg3Lp5xwJ5wrKKU65VDm8ViGc0JpK8lnT DWrIW+jrBXX4T11g8zdTxkOqSdLFPaLEZZh19T8s7WIPMFFlcr287OnSd4hbPwWC4bhq H7Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715003309; x=1715608109; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jmr0hfgWJAF/7VHtSyTJsAvmgssCMuwvQVaPUW5EW3A=; b=wkDNfR/it+u8PgoLOpBLjpZB+vcAqY2uhQuoDbUQ4nlRAILCuFQJHdD5iyotJUXjf4 yE7BGxt8wb1+66RGVTDmAbf5p0NDaeell+KViNv+TUlc1hbdWDQLFysSykbSqPf5sQ41 9JxHf3EIcMwgNUGQE4w+WkITUDS0PH2hesiGjKB/6R4DzzgGmopqvYnAFCB/4l5STznx OhbHUKCrpbZHd8afV10nl5q57wwd435Z+bYShtptaAjFkBqRan+7YK44b0zM+0EvC6RS 2XF+HBfYDeEmx+ORa/znVrGU2fY4ZLFN6W2UaBERoUsR01/JXJJuE3150+k9hNmoQs0x n9FA== X-Gm-Message-State: AOJu0Yzu29AKowxyPXUaKmGucldCUACgOS3v35BAPWjxcI7OcUVwypkI o92ew6USKT8F5gVv45Dd++0NxJQrmrscVeqJxzVbr5iS9F0WgDVfI86FQod1EFw= X-Google-Smtp-Source: AGHT+IEHDHR77wZC2Yk5IorPluWW0YYOwrto2AB7fQsL46fWUFMec9hqmWFCuw9eYy7Pr6Rv+wJhcg== X-Received: by 2002:a2e:a550:0:b0:2e0:12f1:f827 with SMTP id e16-20020a2ea550000000b002e012f1f827mr8328144ljn.43.1715003308828; Mon, 06 May 2024 06:48:28 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id je8-20020a05600c1f8800b0041bf28aa11dsm16131973wmb.42.2024.05.06.06.48.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 May 2024 06:48:28 -0700 (PDT) Message-ID: Date: Mon, 6 May 2024 15:45:00 +0200 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 1/3] dt-bindings: media: add qcom,msm8998-venus From: Marc Gonzalez To: Bjorn Andersson , Jeffrey Hugo , Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , Bryan O Donoghue Cc: MSM , linux-media , DT , Pierre-Hugues Husson , Arnaud Vrac , Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> Content-Language: en-US In-Reply-To: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> msm8998 has the same video encode/decode accelerator as msm8996. Reviewed-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Gonzalez --- Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml index 3a4d817e544e2..56c16458e3bb4 100644 --- a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml @@ -18,7 +18,9 @@ allOf: properties: compatible: - const: qcom,msm8996-venus + enum: + - qcom,msm8996-venus + - qcom,msm8998-venus power-domains: maxItems: 1 From patchwork Mon May 6 13:46:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13655505 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 666227A705 for ; Mon, 6 May 2024 13:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003313; cv=none; b=FfH/0ZPz+bQwWHzNvNakt6a3/K840f5cOSPR4jrp22J/49fXQLC1JAK/6vMyKBNKgl28GLxbRpRgwFGfgPztnkMUu1+yIrQHtSHvdwM7icER33eCqs0Seg9L3/vkjrVuuC6aZ1qNc/V31xGFqRMMOcoNwsBaPwMZyyICzZMx37Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003313; c=relaxed/simple; bh=MPXbvZewmO/D2DEHW1XiJWvSM8CPq85XDTvUbnZY4DQ=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=GaiwETsZG3+bADQUp3JGJfcUGHmDbmxWpip0RqNQfG3tFSQ7x+cWs31qioCPuV6S5uuAu9CnaKlOmCn5d/ivad5eK0sxf+vrDz4Lz+lHTeRxATLmvcXvQACSv6OvuQaZcPDtdsZslK+qMArnmx5p0XlloueUzi2M+w/cg2aH9CQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr; spf=pass smtp.mailfrom=freebox.fr; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b=FP5aLMyU; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freebox.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b="FP5aLMyU" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e0a34b2899so27163271fa.3 for ; Mon, 06 May 2024 06:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715003309; x=1715608109; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=QyXdN6gxvZfSyDlB/uI/J3a7zD0pJvSdTF4inS8BuAY=; b=FP5aLMyUebHboGynTcrqRWNgvYNAHe6WccQU3+6ga5YuOiHtLHeI/8BNxpHzqtPxjE F3tGgbbAyze0d1Vf3pxY4ODkUSwRSkdrMNt7kVFpFLepoToFE7z8VgddB3qd0EcpX1C/ exVa1dxIYpEABg+jhIUYnvH2+NSXb2vadJsTyFJEvqs9t0+JvRSJS+CrdE5A6acXNQpf vElj/RgOBwmK3/vBgK4RX14IgsBI+H6r8MM/oelYh8GEoO+KOK6wbevNBzvMOOvtMq1F 6G5tZypSujyM1RSIbqR/M6slrkdPPdKiIyZM2pvU8aBz2C6E+0uPHL/fSFoJAUia3QJD fF6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715003309; x=1715608109; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QyXdN6gxvZfSyDlB/uI/J3a7zD0pJvSdTF4inS8BuAY=; b=mBp+kk5j7us5EAIC/fs/4ckOWMqPMhEKpSpIDTw9ljp9v0EoBEiPQw+iRKWJkrOx5a lS9KfgqpakLxs7yaqkk9AT5mf/wVR07chay72awoC1yILVbHVMtR8ePjZKwRasrk3nHe XyDlUP3qdZAjKwg6AkI4Ihe30J3fqJcaQX/yWAVPdAeREWWRonpYjk+ZrScDtmLNt7By uDNcUToLMvkPK2o+QDNe+U8BDsGzkInIpqX972Yj26MVNWH/HX0gAyi3Gvm0rRvwQd0O x/oQu+plQpzTVoHDqucNLSowu4OuzLhHlPKptE1gt7WHqwJojqSSVbanJDiH31W2/2sH vpmg== X-Gm-Message-State: AOJu0Yy0RHTaYqXLkm4vbK6YixJlzL/1kN9wKiyHDENFvVnO2cA7lEuE yrusg0/HelrVD6wywpPYR8097ripzUznalFCx6yMBOOvOoulHUIP6E/VQwF02d8= X-Google-Smtp-Source: AGHT+IEalc1xHQQV1lP6Ojgfs0WPNcHeEAEZZRYOqpD+rd2saelIZkJRzrjQzJzjZ4NoHZwjp0FoNQ== X-Received: by 2002:a2e:a488:0:b0:2e0:4216:6fa8 with SMTP id h8-20020a2ea488000000b002e042166fa8mr8960460lji.39.1715003309480; Mon, 06 May 2024 06:48:29 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id je8-20020a05600c1f8800b0041bf28aa11dsm16131973wmb.42.2024.05.06.06.48.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 May 2024 06:48:29 -0700 (PDT) Message-ID: Date: Mon, 6 May 2024 15:46:36 +0200 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 2/3] arm64: dts: qcom: msm8998: add venus node From: Marc Gonzalez To: Bjorn Andersson , Jeffrey Hugo , Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , Bryan O Donoghue Cc: MSM , linux-media , DT , Pierre-Hugues Husson , Arnaud Vrac , Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> Content-Language: en-US In-Reply-To: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> From: Pierre-Hugues Husson Now that the venus clocks are fixed, we can add the DT node. Reviewed-by: Bryan O'Donoghue Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 5f5b90a6e2bf1..3d3b1f61c0690 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -3010,6 +3010,54 @@ mdss_dsi1_phy: phy@c996400 { }; }; + venus: video-codec@cc00000 { + compatible = "qcom,msm8998-venus"; + reg = <0x0cc00000 0xff000>; + interrupts = ; + power-domains = <&mmcc VIDEO_TOP_GDSC>; + clocks = <&mmcc VIDEO_CORE_CLK>, + <&mmcc VIDEO_AHB_CLK>, + <&mmcc VIDEO_AXI_CLK>, + <&mmcc VIDEO_MAXI_CLK>; + clock-names = "core", "iface", "bus", "mbus"; + iommus = <&mmss_smmu 0x400>, + <&mmss_smmu 0x401>, + <&mmss_smmu 0x40a>, + <&mmss_smmu 0x407>, + <&mmss_smmu 0x40e>, + <&mmss_smmu 0x40f>, + <&mmss_smmu 0x408>, + <&mmss_smmu 0x409>, + <&mmss_smmu 0x40b>, + <&mmss_smmu 0x40c>, + <&mmss_smmu 0x40d>, + <&mmss_smmu 0x410>, + <&mmss_smmu 0x421>, + <&mmss_smmu 0x428>, + <&mmss_smmu 0x429>, + <&mmss_smmu 0x42b>, + <&mmss_smmu 0x42c>, + <&mmss_smmu 0x42d>, + <&mmss_smmu 0x411>, + <&mmss_smmu 0x431>; + memory-region = <&venus_mem>; + status = "disabled"; + + video-decoder { + compatible = "venus-decoder"; + clocks = <&mmcc VIDEO_SUBCORE0_CLK>; + clock-names = "core"; + power-domains = <&mmcc VIDEO_SUBCORE0_GDSC>; + }; + + video-encoder { + compatible = "venus-encoder"; + clocks = <&mmcc VIDEO_SUBCORE1_CLK>; + clock-names = "core"; + power-domains = <&mmcc VIDEO_SUBCORE1_GDSC>; + }; + }; + mmss_smmu: iommu@cd00000 { compatible = "qcom,msm8998-smmu-v2", "qcom,smmu-v2"; reg = <0x0cd00000 0x40000>; From patchwork Mon May 6 13:47:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13655506 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C319E80020 for ; Mon, 6 May 2024 13:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003314; cv=none; b=jnT0pp+Q5ARdvGT97X+4IcXXU4xVZP9L3q1YbYW0PKKWU4hSYufwfKxnUui3QNrS0wgY1CACE6nbUWHIZrWDo5CmkunoFpbfAY13Z+FNYnvjei8s9canHIQZ7UzSGUbcBBl889T3wFyPZnjlkdPn2l7DlpxaixJd3WGIZ8Z8lVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003314; c=relaxed/simple; bh=JgCoIyaNf84LuEOmp2FQmBp4+GiQ/TBuX7xx4VD7nv0=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=k+Thphc8BiHdqSgltZ4wHG9P3RBoyTSGDJhtIKx3ibgUSnIYEVToihcaw3I8hAhqkwKK0ztDtok2F4urzIimHPNWg8Skj56+GuErI4WnLCZ6ZDmrdBJd6lyYgnvCAtn1OztLZrZRPs2v0gD8TdLISWR9OEoP3GXCZ50UKGNxU7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr; spf=pass smtp.mailfrom=freebox.fr; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b=T5p73/Ca; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freebox.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freebox.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.b="T5p73/Ca" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-41b79451153so16232275e9.2 for ; Mon, 06 May 2024 06:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715003310; x=1715608110; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=SLH2UGXcs8WjbaIo1wdcYxN1wrBoZdoSVxpSWyyjSRA=; b=T5p73/CaI14tTFOXiS6B/3OjGXEPse16lGRUu0AgfDxlRxBieljKxi1bNm3GCRgIxI 0FBpigXxW5A/j6bdzrq3uy102SLC44FpnpjaoF3GtWooPzn4nXhdbSLDRxqeDW0exduu 7sq3SNtxs5UnC1pLHaI18z8qeVjFypMClgBMLPxIdfTUZcrFEVY5FCOv6dz+4RwMyW2O eKX2oifDRoFvG2C6t0HF33inpFR7XWPf2ztpOj0vFSOTdpjhMiK+U2GvTU13qqyuBzZT eYkl3SqCsd0BTX9jhpnnGXGHjVTf9dkfGKkHOI0YvG7a9eXW3bPDZAUO9vxr+2uiYIMR KT1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715003310; x=1715608110; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SLH2UGXcs8WjbaIo1wdcYxN1wrBoZdoSVxpSWyyjSRA=; b=UXA9J/j8iZn1j2XzqoNUEJXzmRUI8nbV1n209uk7siSDkqCuXEZUeGT3d25mpdcno3 EIm6SRTgHD56dv6oG38jVUwCBhtPaqaqNrxJn+nsV1JDvIEh68vV7HaDNo9+0TuXq1Uj nQ3ikueRcg8xdCFh71kRRBkIPH5WFSxrsrk3hhL/SKZA8MnxqK+Hbx56lWpnTbl3LL+i G2t0u+pOyDlfHF2VPy7JPXhX9+YKkscAy7LA9SngMV0QLdl3WlN8jx7FzDepiyY5dT8N sNKeLA/7/TeINGBXa+HV+plSt1Kf/lrBsRD5GQksPiEMBymdV7UxM06Pwcy4h6BvShPN e/qQ== X-Gm-Message-State: AOJu0YzFm5+bkBv/ZsAS1E917e9cTR/RplKxX7fY077Trrai/HMbpnz0 Ow9oCHkIjrFbyJjT+xqX50+azx5lZR69RR1gnuHh5HMtaNRmfOzbjuvpKr7gffU= X-Google-Smtp-Source: AGHT+IEedcw3sMzjY7rXaFp1w7fge+NsJOpm4Z2nCZgS9MvKI8F14/OUmWE4PrWNmBbJOEFSZALqnQ== X-Received: by 2002:a05:600c:35cb:b0:41b:a670:a9f1 with SMTP id r11-20020a05600c35cb00b0041ba670a9f1mr8243093wmq.7.1715003310109; Mon, 06 May 2024 06:48:30 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id je8-20020a05600c1f8800b0041bf28aa11dsm16131973wmb.42.2024.05.06.06.48.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 May 2024 06:48:29 -0700 (PDT) Message-ID: <14bda891-5035-433c-888e-b3c330eeffaf@freebox.fr> Date: Mon, 6 May 2024 15:47:24 +0200 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v3 3/3] media: venus: add msm8998 support From: Marc Gonzalez To: Bjorn Andersson , Jeffrey Hugo , Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , Bryan O Donoghue Cc: MSM , linux-media , DT , Pierre-Hugues Husson , Arnaud Vrac , Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> Content-Language: en-US In-Reply-To: <72860c1d-7434-4be6-8c1d-9ea177602802@freebox.fr> From: Pierre-Hugues Husson Add the missing bits for msm8998 support. Reviewed-by: Bryan O'Donoghue Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez --- drivers/media/platform/qcom/venus/core.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index ce206b7097541..064120127cb86 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -554,6 +554,9 @@ static const struct venus_resources msm8916_res = { .fwname = "qcom/venus-1.8/venus.mbn", }; +/* + * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blame/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8996-v3.dtsi#L403-414 + */ static const struct freq_tbl msm8996_freq_table[] = { { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */ { 972000, 520000000 }, /* 4k UHD @ 30 */ @@ -587,6 +590,50 @@ static const struct venus_resources msm8996_res = { .fwname = "qcom/venus-4.2/venus.mbn", }; +/* + * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi#L42-53 + */ +static const struct freq_tbl msm8998_freq_table[] = { + { 1944000, 465000000 }, /* 4k UHD @ 60 (decode only) */ + { 972000, 465000000 }, /* 4k UHD @ 30 */ + { 489600, 360000000 }, /* 1080p @ 60 */ + { 244800, 186000000 }, /* 1080p @ 30 */ + { 108000, 100000000 }, /* 720p @ 30 */ +}; + +/* + * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi#L29-37 + */ +static const struct reg_val msm8998_reg_preset[] = { + { 0x80124, 0x00000003 }, + { 0x80550, 0x01111111 }, + { 0x80560, 0x01111111 }, + { 0x80568, 0x01111111 }, + { 0x80570, 0x01111111 }, + { 0x80580, 0x01111111 }, + { 0x80588, 0x01111111 }, + { 0xe2010, 0x00000000 }, +}; + +static const struct venus_resources msm8998_res = { + .freq_tbl = msm8998_freq_table, + .freq_tbl_size = ARRAY_SIZE(msm8998_freq_table), + .reg_tbl = msm8998_reg_preset, + .reg_tbl_size = ARRAY_SIZE(msm8998_reg_preset), + .clks = { "core", "iface", "bus", "mbus" }, + .clks_num = 4, + .vcodec0_clks = { "core" }, + .vcodec1_clks = { "core" }, + .vcodec_clks_num = 1, + .max_load = 2563200, + .hfi_version = HFI_VERSION_3XX, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = 0xddc00000 - 1, + .fwname = "qcom/venus-4.4/venus.mbn", +}; + static const struct freq_tbl sdm660_freq_table[] = { { 979200, 518400000 }, { 489600, 441600000 }, @@ -893,6 +940,7 @@ static const struct venus_resources sc7280_res = { static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, + { .compatible = "qcom,msm8998-venus", .data = &msm8998_res, }, { .compatible = "qcom,sdm660-venus", .data = &sdm660_res, }, { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },