From patchwork Mon Apr 29 16:15:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13647352 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 F12B182D69 for ; Mon, 29 Apr 2024 16:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714407678; cv=none; b=QFk+NZDOVTSI+RTtT8A96T8ynf3P20BbUhMvf4Qd4AYVAGzLwMYT5pRg3FNvJQd1PWwSwKQpK40Wcj207JCkEvvy7qnMd8LQWOZ9VytLOLHqw/NI1R5PZfR6W/BqfwlhZffpS/XlOGECoZ1zk4bov3kXxUD+CtlUEsYvUxpmRT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714407678; c=relaxed/simple; bh=448Pv/ahY1sG5cFxUnu1qKmuWBj7tjQc+RZ/nKg2f1Y=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=T2uaZ96E/7UOK9ArtPtKR5QgCz0fdKRL41Jhk60lg7oz4MmgXzNi9JEIeA+N0FD3newrEG1CwVtmyPv0m9pnzGuYS8+rgSc4wsVGK+XekoTF41X9Uj4R1nDOz9lsAiyxMy1yCD8SOqlJ+g+UROeqKXnzHpwHdgD/prTgZO88pQg= 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=JjpJ8Ghd; arc=none smtp.client-ip=209.85.128.42 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="JjpJ8Ghd" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41b9dff6be8so22121295e9.3 for ; Mon, 29 Apr 2024 09:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1714407674; x=1715012474; 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=Wi+vNP8uVDwUtAt75IkqcVC5kSDI3EMTYuGjoYXVsxg=; b=JjpJ8GhdsTS2G0EgAkg+2PC97maxHzxmAzYKCIBntFkUPsmkv3P+F21dUNsp7xSEHV FUcpAtC7d6Dcv+Hj35pq/Rn3YRAM0AL3R8YhG1NluyLud7TpI3qozA+p49fSZltO0ZFf Qt5B7avHMZECopcef8pakxMgPr8DutnulLPokZ2qP6RiqU7fuY/7prEP8mtMw6NfUo2L +wGedBOLS2YEIf/+6wioGW4wotonosjnBgKWqaAZWQ+/RvqJx7bvuE09ntvmPP+svvfc r6EpVol+/qPHGANIDD/5J/7phH6C/mJ4iOnbjlxUHIghwuNqGi/qCA3xXmexl+ZeYfNm te+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714407674; x=1715012474; 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=Wi+vNP8uVDwUtAt75IkqcVC5kSDI3EMTYuGjoYXVsxg=; b=rQ1efhYgKSxIU1PGWhVBSxBTWafdxcVlJ8pbFrQRLSV/R134GylxINrYrqIMs/Dizk JdLb+lkuz3RM9xjvnaFGqokiUkSh/E6tdwiRMTYfzF/CGBtdP5BC7BYUUDf5QG1qEGe9 5BE/FcmtSGK6+Nz6gEJNOVhdCT1r1BRvoJArtyhqUwPEjGNImeG263Qx5AldAECZkbwl K7UifqOos2nczSfGly5aUDlPakt8to0+fGaLyMUwnu1pDQtACe/lXm5mQKmNjxnMe3UM aG8MD7GG5a2CQjF5jYuP8eLY16659oxUmQpsH4MpC8GqBRF3gBPt4VZ2VxN88/NzQqSP oJLw== X-Forwarded-Encrypted: i=1; AJvYcCWo1pP8COj1Tr/eh6hgEMT1xoZd8S0wD4zBVaivT2rQz0dU8WDVPUrGchdKdpivvh5Jnd9CXfOS8C0BNwkWBtvl6mzgsv4LedgMeL8= X-Gm-Message-State: AOJu0YznCd7LdbcmzAX7c+lbVluWilgmtTGbyxGROzNDJ+Hz7Cu9C4PE mOnh1AaZQPbvT9+ud3JnQ8VbPxiP3dOQs+rYzlbTFdpnaXjyK79aWSOg/c5TFig= X-Google-Smtp-Source: AGHT+IF0+ORUjbbUuOqYIzVcdO3gi+Ake7y2ADN5ItaGlQod+k3RC42E14nq1ywvHbm+GlTrwH+Rlw== X-Received: by 2002:a05:600c:3d12:b0:41b:da7b:9b94 with SMTP id bh18-20020a05600c3d1200b0041bda7b9b94mr5841025wmb.2.1714407674286; Mon, 29 Apr 2024 09:21:14 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id t20-20020a05600c199400b0041c012ca327sm7469761wmq.45.2024.04.29.09.21.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 09:21:14 -0700 (PDT) Message-ID: <4ea494cf-134e-4380-aea1-4c166a626561@freebox.fr> Date: Mon, 29 Apr 2024 18:15:37 +0200 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v1 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: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> Content-Language: en-US In-Reply-To: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> Add YAML binding for Qualcomm MSM8998 Venus HW video encode and decode. (Based on qcom,msm8996-venus.yaml) Signed-off-by: Marc Gonzalez Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml new file mode 100644 index 0000000000000..86a20954cb354 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml @@ -0,0 +1,155 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,msm8998-venus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm MSM8998 Venus video encode and decode accelerators + +maintainers: + - Stanimir Varbanov + +description: | + The Venus IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml# + +properties: + compatible: + const: qcom,msm8998-venus + + power-domains: + maxItems: 1 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: core + - const: iface + - const: bus + - const: mbus + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: video-mem + - const: cpu-cfg + + iommus: + maxItems: 20 + + video-decoder: + type: object + + properties: + compatible: + const: venus-decoder + + clocks: + maxItems: 1 + + clock-names: + items: + - const: core + + power-domains: + maxItems: 1 + + required: + - compatible + - clocks + - clock-names + - power-domains + + additionalProperties: false + + video-encoder: + type: object + + properties: + compatible: + const: venus-encoder + + clocks: + maxItems: 1 + + clock-names: + items: + - const: core + + power-domains: + maxItems: 1 + + required: + - compatible + - clocks + - clock-names + - power-domains + + additionalProperties: false + +required: + - compatible + - iommus + - video-decoder + - video-encoder + +unevaluatedProperties: false + +examples: + - | + #include + #include + + 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>; + + 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>; + }; + }; From patchwork Mon Apr 29 16:17:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13647353 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 5F92A8529A for ; Mon, 29 Apr 2024 16:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714407678; cv=none; b=hqJKDLaMApT0sY8fGyuUdmSn3lZocTknDikpUeFUCUmSkP1z770s63SSt5ZgEVSIpBydsCD4xLN0+LYoMipSuidU88AH5/dKeB0FjlSF0UdHl0kzpnaoCNE8wRZRblcJG+GzopZXoBxtClM+QNeKh8RqiQ6se3OGz5RxLYn7rso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714407678; c=relaxed/simple; bh=m8JLb1BdA35HdBjPkaAuNAfY/AHY/SDnhNfpPmwpAr4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=sUWL4l1mq/wTlAD/u4LaQdBY+rbLl3YyzkwQgo2/C2E8LSYNGwKHdPBRetn2Qidhxd33aLqqR/maE2rCmHJqIGxWrmi644NiNx1ZYUngMSWdDEQIlrLyBQwWsi7NdQD5B6VhmiyuI012WDlRnCx1r5gk+aitcOfhOzm/baPDwzs= 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=sSTpse/J; arc=none smtp.client-ip=209.85.128.47 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="sSTpse/J" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41b782405bbso25992505e9.1 for ; Mon, 29 Apr 2024 09:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1714407675; x=1715012475; 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=TjXiKLYT+vUURpqFWBvNlsCdhsHBjZCyYATylO1W8pY=; b=sSTpse/J66i8+IIQi0z5mUfXgMRwLWKA9F5py6zcxcX5VKx/c9Hc3Aa9pu+bj/ybWe EhFZ+LE1mJrSFZeXoR+Hig2SG8R2CBTyw5tf/vmux4r9DQDDuFxlL1FJJRu1fWW27PY2 AD60vVXFTksdlq6pI9FngukxiJnpnAyLcNMttVW5MumYR5/3gpikE9wtqFL2h6yqoiCZ zCCCN4aFruArSZKZa89LwSrF1obi4sHoo9udt7Cpza35Ds3ocjBRT0q/R4YLI4qLfJRD a9VV+wg32yoEOZjBlUHHqv2LyT1RpNRV2780avbauSw/XgskZYj0olvWEyi0DRM5Rr0y 3QgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714407675; x=1715012475; 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=TjXiKLYT+vUURpqFWBvNlsCdhsHBjZCyYATylO1W8pY=; b=v7uOa6hDYAjMD2/KfIUtDtqQrXMA9jQQD7rYhIsqHNP1+Q5TB9LSM6jNSSvTnNs25q kkL+yxHLsWNMMC8AJF53JWH4aDHxQaOfPNhRdY9srHsreAQMv8Gz1UOLkQmwFK9D/7oj +Aed0A/2W1YPHy1jM2p0NQ6nmpxtubMZU9jebn0J0KY7kN834+TfZFlY0MzaOMjNKmZc wbqvBVS5lTPAn2MhCJ87CEyd1hvdS1gqZawn35t2oIu4t8fTOWX6zi09HL7D6Hpe9WcO OuTj+DX/FWdXHUwtburNnrvSUD9X1XL59OiNqHPzLtpEoqA1ziOEJ1xBFg8p4hc9V43j +bHA== X-Forwarded-Encrypted: i=1; AJvYcCVXsL9e3tx56/7Uaz4jwfKTmsaDy1stD9g0jyz/F8C7RAy2mbS/bzQNWKL3/Ok2pbE7doBE5DrJfUltBSJhp6eX5lVi849qU5QMvas= X-Gm-Message-State: AOJu0Yxd2dKd3uq/vJkNhGYWj29CwprU7waW0ILw87QfVSha4gDyl4IK kSOdUW1s8UY24sG0CLvPQUR0Y+wYlyyakNUMAg9Dsi8iGwFW63VqvMNJiuxa1oM= X-Google-Smtp-Source: AGHT+IEwTazlO5LpSJzhQHEdjt+50wYigGrsXmr6gaH7/NGRF2hB7OgAQ6yhAN9gI3nHePvx8wBg0A== X-Received: by 2002:a05:600c:4f0d:b0:419:d841:d318 with SMTP id l13-20020a05600c4f0d00b00419d841d318mr9399276wmq.29.1714407674824; Mon, 29 Apr 2024 09:21:14 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id t20-20020a05600c199400b0041c012ca327sm7469761wmq.45.2024.04.29.09.21.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 09:21:14 -0700 (PDT) Message-ID: <61729cd3-0a93-4e8c-a7c8-6832d43c7a3a@freebox.fr> Date: Mon, 29 Apr 2024 18:17:29 +0200 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v1 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: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> Content-Language: en-US In-Reply-To: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> From: Pierre-Hugues Husson Now that the venus clocks are fixed, we can add the DT node. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue --- 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 Apr 29 16:19:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13647354 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 287AD8529C for ; Mon, 29 Apr 2024 16:21:17 +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=1714407679; cv=none; b=MTkHh6+LoIx76B8HY3d9w7VjgTnLAScPF3CLKGztGsZGHiODyeSfi6gBrnRKkyAiJA9g5zeH3yu7OQAF+Q+e5gjwHvcmmosew2CunDQ9XIJxviKWIMTeV+GEjst3OZLSU+TOyiyNu09zI+uABzqmjkCdIwVatBm4XEOvO6YLEak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714407679; c=relaxed/simple; bh=f09XPEMd1cpgM+0G/Mmk2IfLd3rZXQ6Qse5lUXfMQt8=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=YnV5dHAjZ4r5Zn2frkrCErV9uo04i7YlxStxc1tYDxlFtL9yX3SwO2cB4JV0gqmhmVXQrfR17hOShbtPxaqdakHPHnacDP+vVkUOIEDJv2Pk50pdELRS3gtzhN3HfZT8sfAejAEcO2lht09vs6miXMNIdmD8YiuiqeqBvwUXQiY= 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=ccJtUqTw; 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="ccJtUqTw" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2e0a2870bceso13452311fa.2 for ; Mon, 29 Apr 2024 09:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1714407675; x=1715012475; 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=g8N15hk2cj73KP+gQB9y1hbe0Q0mU9PexGJT9++xN1o=; b=ccJtUqTwAvl/PzWKOs/c1sCeGhSYRM/LI7Qj/RuyjK2mMoMq3b0p+Kw5XvEvb8I/de +cuNrXX/HC5nlqll7PO4vSOhU3acPwTU0wg7x65Q51Nj8Bnp4SO1u4fKSnAhDImmHgY8 BAeUcW3gsVwlG7kyNxY0447Uh6MHVLvr4I1EHlmAuwSuCla24MS9BppZktzVuLs4qkL/ kYLpOX9/zIvgKkjPJLdYl2mAOyL1H0u4NALHCPFj8GkqPgj+ja+EgXkC68Sc5IwQF7dO DzRA0rvHhyBX9dD496iXn/o1y5lASSueMjT5tPGhaUpkxouJyn6z7/KH3oy/91CRW6Bp zjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714407675; x=1715012475; 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=g8N15hk2cj73KP+gQB9y1hbe0Q0mU9PexGJT9++xN1o=; b=wogV4WQzKc23SD9irE8CPtPsSDpENQuxoVwLzWOT4DF/79dcSZykRKrO1RB+zvmRwl fbTZpAU7cW3iiLUr5TlFLNmsXe711NWD2yqTdlX/Vb5/ElWrxfYwMh4LwfXWdKuf+aXg /w1R+fiGPLwuASgXtbqrVhaMGY5Q+uwHCMdXCKKEmFSBgRMo7ugqbw0eo7OGk7KkNCef rO5HhfXmCp9S/13pMNTt4EQuAVjVddEasRUJ9zS12B8gGaoPGqwzF7wXGy1eBDEOjbQ6 hJqMNJQdS98+kC8004IbEZIfTjf5IHnN0fluZjDoYo8zbQJUCl1gNk5YDU7TcAEmkLNp s7Mw== X-Forwarded-Encrypted: i=1; AJvYcCVU7dqEWTQWocq8XqUFuw/6r3oEgyJqvBKj+S1enYQId1UcTs47/fkWKdA+7mQHV2Rd0Sy6YGWM/LnJBApAMqUFPapOeD7S+dOmRBQ= X-Gm-Message-State: AOJu0Yzx4wdApYLGS9gLB1y0QEpiLgYC9Gte16bj21tavmGpl1GakOxL M+3OIDmOHvC96QvgBK80NCySSVG/PqcaALROkhUzU1MnnUEShzLqIl9Ll4NXxFE= X-Google-Smtp-Source: AGHT+IE4TOW4UjIewweRE0HIrulhSqoUwGIv3MAML2KPrKAxT78+lJT31zNYlcM2Hzb+lFfQd/FvSA== X-Received: by 2002:a2e:9497:0:b0:2da:736d:3cf5 with SMTP id c23-20020a2e9497000000b002da736d3cf5mr5229286ljh.41.1714407675418; Mon, 29 Apr 2024 09:21:15 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id t20-20020a05600c199400b0041c012ca327sm7469761wmq.45.2024.04.29.09.21.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 09:21:15 -0700 (PDT) Message-ID: <31072144-8880-483f-880b-8c8ca73b2003@freebox.fr> Date: Mon, 29 Apr 2024 18:19:27 +0200 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v1 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: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> Content-Language: en-US In-Reply-To: <2b21b160-a530-486a-9404-c5bf8863ffed@freebox.fr> From: Pierre-Hugues Husson Add the missing bits for MSM8998 support. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index ce206b7097541..42e0c580e093d 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -587,6 +587,47 @@ static const struct venus_resources msm8996_res = { .fwname = "qcom/venus-4.2/venus.mbn", }; +static const struct freq_tbl msm8998_freq_table[] = { + { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */ + { 972000, 520000000 }, /* 4k UHD @ 30 */ + { 489600, 346666667 }, /* 1080p @ 60 */ + { 244800, 150000000 }, /* 1080p @ 30 */ + { 108000, 75000000 }, /* 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 + */ +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 +934,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, },