From patchwork Tue May 7 09:28:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13656480 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 3BE8E14EC48 for ; Tue, 7 May 2024 09:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074291; cv=none; b=cJpWXWp9YGp6vxu1tfyScmOMsdzug04+iYzyPeeB+twFfdhwo0o7pVNLDs4+PXCtiePbzWnKNDnNQ+ljd3MiYJ/BeyLFWV1+8uB5ynwhtb51KFVsr6cIIEEVQV4N5zCAMvp8tVzk4hEvRdRW2Q6/A5H7cWZsD4P0RlbzM+85a7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074291; c=relaxed/simple; bh=KkTKkbItVaoNaebdlZbTplZomRRkcshA7Z5iO0bO4bU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=CzBWQTgw/vk8+ETfeQwcJhp4Q/6dB62q44k7BagHbYmirTreDGVpcYejVLTiaeMOnLrG+K2GAgTp5SpZES0hf17J9cjAKnOgRziW5GMD8ujOZOBzwb3HQypc3HBqjo3lSGB5UQ6mQ/XLwYwVPpkNy0bap6o8db0wDpjZfdprVFQ= 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=LVFae5Rf; arc=none smtp.client-ip=209.85.221.41 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="LVFae5Rf" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-34f52fc2191so845816f8f.1 for ; Tue, 07 May 2024 02:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715074279; x=1715679079; 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=LVFae5RfpGMv5LTob1g/mFGi55l8vFLcw3mWgEDtaWWU17oj33b4fkyrvO9Cl1X5+R C3niGl2aT5RQyN9KNsPG8nMfcCEgB89PF96X8INzqR5rwEQoH8FpdB8fFeeBbLldHjxn ruO97iGJcCCd8ldRASmuKhPYT9M/xTExu0XciUaO/L3kES+PSb1QSa8BwXc0krzdtakh snAd4uuMhVv87oA+b8yDCqJ+cXAR/IKx7pLrbZF4Fsm4nR7943ZOSxeN+OmMzHWhj+QK yYEqcjs/16TCqmbB7A56l7KwwQeqCQCJhetMakFRA9PqEctlWJpvDh6D8ML8fhGznUvt /LqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074279; x=1715679079; 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=RU8J9OJqKaN+j4dzUH+Rl/24gBGLkkJY/8c3v3Zcm2hk/ouM7vGRv3aWpUFjHzApLx U639yP6Jqq4sHNheVjwrlk2dMsVz+u+aRHIveMVNZBfJ+r2rZLYd2bQKgddNtMfc4P62 fbamUxNIPH5LuUy3cUu3FCjZQd1GmOdYjI7u0Jv2XSe7ZI/H/SS6f22goKMZXU09AuqL 36bAusI6SzDlYODgi2E2gHZQn3IkEXekJeQIjAJVt+OM/VsemaAk/eIHxcvbFINZyv8I P3uzHWxW46WowkaVexkB4Qjn1U8o3F8tid3vp/X64El2+0qjinBMLsIhDOGF+Zh1q1rA PJ4w== X-Gm-Message-State: AOJu0YwcUS/eI5MlhCbcsjepnYbgIBvLjJ3mCxH7C/59ze45i2Mnj//H CYgEBgSLlcpfbfRGMFwSct8PmygOlpkm35uByARNuRWQxZRqYCt4BiW94m80e10= X-Google-Smtp-Source: AGHT+IEvHZqrO35Cj7iFDpIZwkGv71Jk7pChDTuL9+k9WP9x5+qLDkeol9+hXhU87pe+EvybRgC4zA== X-Received: by 2002:adf:a18f:0:b0:34c:b31e:18de with SMTP id u15-20020adfa18f000000b0034cb31e18demr8591141wru.35.1715074279066; Tue, 07 May 2024 02:31:19 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id f3-20020adfb603000000b0034dced2c5bdsm12517710wre.80.2024.05.07.02.31.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 02:31:18 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 11:28:06 +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 v4 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: <1cf08b56-a247-431b-a24b-69f563f49240@freebox.fr> Content-Language: en-US In-Reply-To: <1cf08b56-a247-431b-a24b-69f563f49240@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 Tue May 7 09:29:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13656481 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 AF58314D70F for ; Tue, 7 May 2024 09:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074291; cv=none; b=FHFA+FptY3AgS9QbkEkidS0eBEUp0P/JPZRWQuP0xI+gzRLAox9D0cyPP9pmMN1NnCcFxmQ+jvrk+a3Eurq+AugAUFZ0E45C3mNu0KB/xLulJ4eznociws1AUDcGYSQpsMnqlupuEmR73KKgjrCTwqcUKksrGxgU9oEZDqGebWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074291; c=relaxed/simple; bh=MPXbvZewmO/D2DEHW1XiJWvSM8CPq85XDTvUbnZY4DQ=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=YJjceGYrwxxF2ifkge6VR14Zlmvd+R8zXA36BrXf9uIrNscukUdDnuLtTW91Wsogfuw8ttear8eEqmaI6C0cwzxhmGcACdmDnFXJX+5oLji3gC+bfeyCd0XzJII38I95Oi9O2q0nTbArHb7M7Bx1n9/XKSzM+eOxclZphZ9xSLE= 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=YhAQC/GN; arc=none smtp.client-ip=209.85.221.51 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="YhAQC/GN" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-34da84cb755so2335032f8f.2 for ; Tue, 07 May 2024 02:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715074279; x=1715679079; 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=YhAQC/GN/jW5NaNLPJclFChPJC1mz06ncdQPUfv2SirY3NZoGnANlCoIJzr4f9xwK3 vKl4SFM/my9Eta98ihtW+3lpeMFkRHCkT2IiggLgpwwzFV1edIi9yx8j1KvM4iNU3+4R 1Le9yuaXUCgYySwsq2nF2FkgJNIyv8lJAgixWXXf+X+sXHFD7W7c1EKN7xwWzJVz5BhL tZ/w3Ep8CWQ22/6nCgiEVGShRKCwGPVxGG07SPpxZRkzKdiOQYl/ek9nyWKB4/SaoElj 9Awovj7eKEMGt8mndhythXC+V1169yvUZGgW99DFiUEfDGZdsUp0U+NZZD76c/hK4Dgp /dOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074279; x=1715679079; 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=EhGkWc22iY5RGefTdnIZ2ay4nwuNEH85mIiWB5/ULXkOEx80tY1nxEeJCsWAArLWGp QGv++8lfrwCtm6eNxNPS1NTB3zyUqh4LXdwAtWSg0evgxPrTkh7c2TsZfAx+KI3yTWFn pH5aJlH937k698C3LAEAofgIxRrIYBKQDhhf5UZKW2e0LG9TDjunVlnv56jpMFdlkhpZ QgG5alVG/aFD/eobESW8+P1Nvsr1YldJsMcpnzwSKsOObEvzs9QRk30mOHMTPrLB4ClE L7sHYCded70GIA66AHhbC0jK3Z7Wx7Xh10fVA138PQYh2lz1Ie28C+3P44QIAd1u+dDg dkwQ== X-Gm-Message-State: AOJu0YxO3BjN0ikiV1uUK+T2zWwuZR4zvSAQ825qJnkWxV1OWk6kVbLC aIH2WPec9ryQmB+pqqqanWI18SxGMFxCxf/CfHEHOtwbnxKcCzfU3J8VXbqpu6s= X-Google-Smtp-Source: AGHT+IEbF4B96xPtnD9KzivYdLyGQTnX3z26aVSw5JySkazStzElYqb1R7jUdZoog7s+4m3fqc2E/Q== X-Received: by 2002:adf:ed8e:0:b0:34c:925d:fa77 with SMTP id c14-20020adfed8e000000b0034c925dfa77mr7102080wro.41.1715074279714; Tue, 07 May 2024 02:31:19 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id f3-20020adfb603000000b0034dced2c5bdsm12517710wre.80.2024.05.07.02.31.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 02:31:19 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 11:29:09 +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 v4 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: <1cf08b56-a247-431b-a24b-69f563f49240@freebox.fr> Content-Language: en-US In-Reply-To: <1cf08b56-a247-431b-a24b-69f563f49240@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 Acked-by: Vikash Garodia --- 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 Tue May 7 09:30:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 13656479 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 4D0D414E2E6 for ; Tue, 7 May 2024 09:31:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074290; cv=none; b=cvjNbTEYJ0iYvdFxV3eb6U8A1NSHKzXHKoc5p4JheWnTlEd2QyHiRQwffnT0QNTs3s7Wv0rn3yQVjtrxf1n+z75OwIxiUrpoqm8GYF5S20MY4hNz1Mmeokusuk9i/S0R3DsQnw+r2vf4wxxIKdbPBtIu+7mOYTbKxSsRn6jSRTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074290; c=relaxed/simple; bh=m8CJb3SPjBevNO6revkMax575fM40oA2Ye3pZYO7emQ=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=QNycRe1rhLnMwEWlkxw33wqZu/AGaPIo9Aq5Kezb0ZFybEBumwpDBWOTYVQ3wCWAhw+6XyICC1T8DTrMzAB7Z1luCADupIla8blXDrousztGdMgi3RrpCl0TfdKfci7Jl6k1M3RZoo1L465TKO1F6doiSSDUecH7N22wEpI4uIs= 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=SsMsIuJX; arc=none smtp.client-ip=209.85.167.51 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="SsMsIuJX" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-518931f8d23so2842064e87.3 for ; Tue, 07 May 2024 02:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1715074280; x=1715679080; 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=5AOYNrstidsMwkuCqD1NJg/W8IphbTWRSU868Li9K8s=; b=SsMsIuJXlJsEYgTwNKE/wYU17btzHe9r1Dxfb0qqT7KtV3l+4vWwizfLUlhpBoau72 OjfaTzkm9MFF+XWufMwOa67KRX/ywLJjaNYLngLW7BlFaUmxRrMms2EcgVDgpDQWQCpo 50a5CKjfKpGnH02AGInDnrkSyUf7LVq5/I/pWTE6YNH1D3LEdWu0x8m9IaJhlwnqb05w pcbwoeUgaVAmIwxwOVy0ZdKldyUCxsuZc/9nU9UhQT9BuOlyVqoqLFj8rgUn3ArleOpg Oh0p/XY3T8HcIox1xoXPBHoRdl0hpNRR8rCe8khvikETMutnWsBxE/CYHnwDilrsUjYJ Gf5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074280; x=1715679080; 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=5AOYNrstidsMwkuCqD1NJg/W8IphbTWRSU868Li9K8s=; b=NdNwLwYA175wbPsxbgNlLhYIWbim2Z3DNP8G1mzd3RFXlrO1NbsfMvaSbtJrz7tZDQ IYF0s2Dul7G+lMhbvHSIirfh/zvv45/7MipE0zB8wMhH3Otlvj03joKsp6bRL0qg0nfW stbJRSUeLxYELLbc25pzMT4+MLpXD3twWUlZxNcCvvyuKAPOoT94MBpa+9RTGNL0LKv8 nh7O+G51cccjMKnG3P2CjVaxawvdGt9CE7h2+8yW6cC674s5Rztx0ahbXWn9u7M5GThp w8rvRmw6JYISTPxcGvblQTVC30suBt86MyQ0V9v+hR91ylT9brzHBROuu2P6CWz2bwiS RYhQ== X-Gm-Message-State: AOJu0Yxb1Ozfi+mp0ePxauidFhRV4TLt7BvhZ46DbAPibOGt4wkqexzz skxNVIRR/5HVFGgwxyeF53Sqs/jGHJumgmxZY24Zh9Aj1E8VggnojfcC9+jt7jg= X-Google-Smtp-Source: AGHT+IHUZLlmXsLgomTNPQ3kKEt2I9NW7E6TCcg7DuZg6C/VtUqmGuFjZozx3+25arCop7mtOGN88g== X-Received: by 2002:a19:5210:0:b0:51f:5a66:adce with SMTP id m16-20020a195210000000b0051f5a66adcemr7705284lfb.14.1715074280368; Tue, 07 May 2024 02:31:20 -0700 (PDT) Received: from [192.168.108.81] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id f3-20020adfb603000000b0034dced2c5bdsm12517710wre.80.2024.05.07.02.31.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 02:31:20 -0700 (PDT) Message-ID: <6df495c5-db26-431d-8ce1-8263a2a12b2f@freebox.fr> Date: Tue, 7 May 2024 11:30:11 +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 v4 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: <1cf08b56-a247-431b-a24b-69f563f49240@freebox.fr> Content-Language: en-US In-Reply-To: <1cf08b56-a247-431b-a24b-69f563f49240@freebox.fr> From: Pierre-Hugues Husson Add the missing bits for msm8998 support. Downstream vendor code for reference: 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 qcom,load-freq-tbl = /* Encoders */ <972000 465000000 0x55555555>, /* 4k UHD @ 30 */ <489600 360000000 0x55555555>, /* 1080p @ 60 */ <244800 186000000 0x55555555>, /* 1080p @ 30 */ <108000 100000000 0x55555555>, /* 720p @ 30 */ /* Decoders */ <1944000 465000000 0xffffffff>, /* 4k UHD @ 60 */ < 972000 360000000 0xffffffff>, /* 4k UHD @ 30 */ < 489600 186000000 0xffffffff>, /* 1080p @ 60 */ < 244800 100000000 0xffffffff>; /* 1080p @ 30 */ Reviewed-by: Bryan O'Donoghue Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez Acked-by: Vikash Garodia --- drivers/media/platform/qcom/venus/core.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index ce206b7097541..8b715cb7ab51a 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -587,6 +587,44 @@ static const struct venus_resources msm8996_res = { .fwname = "qcom/venus-4.2/venus.mbn", }; +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 */ +}; + +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 +931,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, },