[PATCH] media: venus: Fix MSM8998 frequency table

Konrad Dybcio posted 1 patch 8 months, 2 weeks ago
drivers/media/platform/qcom/venus/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH] media: venus: Fix MSM8998 frequency table
Posted by Konrad Dybcio 8 months, 2 weeks ago
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Fill in the correct data for the production SKU.

Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/media/platform/qcom/venus/core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
 };
 
 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 */
+	{ 1728000, 533000000 },	/* 4k UHD @ 60 (decode only) */
+	{ 1036800, 444000000 },	/* 2k @ 120 */
+	{  829440, 355200000 },	/* 4k @ 44 */
+	{  489600, 269330000 },/* 4k @ 30 */
+	{  108000, 200000000 },	/* 1080p @ 60 */
 };
 
 static const struct reg_val msm8998_reg_preset[] = {

---
base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
change-id: 20250531-topic-venus_98_tbl-5765675a4ce5

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Vikash Garodia 8 months, 1 week ago

On 5/31/2025 5:52 PM, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Fill in the correct data for the production SKU.
> 
> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
>  };
>  
>  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 */
> +	{ 1728000, 533000000 },	/* 4k UHD @ 60 (decode only) */
> +	{ 1036800, 444000000 },	/* 2k @ 120 */
> +	{  829440, 355200000 },	/* 4k @ 44 */
> +	{  489600, 269330000 },/* 4k @ 30 */
> +	{  108000, 200000000 },	/* 1080p @ 60 */
>  };
>  
>  static const struct reg_val msm8998_reg_preset[] = {
> 
> ---
> base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
> change-id: 20250531-topic-venus_98_tbl-5765675a4ce5
> 
> Best regards,

Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Vikash Garodia 8 months, 1 week ago
On 5/31/2025 5:52 PM, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Fill in the correct data for the production SKU.
> 
> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
>  };
>  
>  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 */
> +	{ 1728000, 533000000 },	/* 4k UHD @ 60 (decode only) */
> +	{ 1036800, 444000000 },	/* 2k @ 120 */
> +	{  829440, 355200000 },	/* 4k @ 44 */
> +	{  489600, 269330000 },/* 4k @ 30 */
> +	{  108000, 200000000 },	/* 1080p @ 60 */
What has ideally changed in production SKU which led to this change. Pls add
this info.

Regards,
Vikash
>  };
>  
>  static const struct reg_val msm8998_reg_preset[] = {
> 
> ---
> base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
> change-id: 20250531-topic-venus_98_tbl-5765675a4ce5
> 
> Best regards,
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Konrad Dybcio 8 months, 1 week ago
On 6/4/25 2:35 PM, Vikash Garodia wrote:
> 
> On 5/31/2025 5:52 PM, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> Fill in the correct data for the production SKU.
>>
>> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> ---
>>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>> index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
>> --- a/drivers/media/platform/qcom/venus/core.c
>> +++ b/drivers/media/platform/qcom/venus/core.c
>> @@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
>>  };
>>  
>>  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 */
>> +	{ 1728000, 533000000 },	/* 4k UHD @ 60 (decode only) */
>> +	{ 1036800, 444000000 },	/* 2k @ 120 */
>> +	{  829440, 355200000 },	/* 4k @ 44 */
>> +	{  489600, 269330000 },/* 4k @ 30 */
>> +	{  108000, 200000000 },	/* 1080p @ 60 */
> What has ideally changed in production SKU which led to this change. Pls add
> this info.

I have no clue what's the root reason for the clock plan change, probably
some hw bugs were ironed out and higher clocks were deemed stable

Konrad
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Bryan O'Donoghue 8 months, 2 weeks ago
On 31/05/2025 13:22, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Fill in the correct data for the production SKU.
> 
> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>   drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
>   };
>   
>   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 */
> +	{ 1728000, 533000000 },	/* 4k UHD @ 60 (decode only) */
> +	{ 1036800, 444000000 },	/* 2k @ 120 */
> +	{  829440, 355200000 },	/* 4k @ 44 */
> +	{  489600, 269330000 },/* 4k @ 30 */
> +	{  108000, 200000000 },	/* 1080p @ 60 */
>   };
>   
>   static const struct reg_val msm8998_reg_preset[] = {
> 
> ---
> base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
> change-id: 20250531-topic-venus_98_tbl-5765675a4ce5
> 
> Best regards,

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Dmitry Baryshkov 8 months, 2 weeks ago
On Sat, May 31, 2025 at 02:22:00PM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Fill in the correct data for the production SKU.
> 
> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

Verified against msm-4.4

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Arnaud Vrac 8 months, 1 week ago
Le dim. 1 juin 2025 à 09:46, Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> a écrit :
>
> On Sat, May 31, 2025 at 02:22:00PM +0200, Konrad Dybcio wrote:
> > From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >
> > Fill in the correct data for the production SKU.
> >
> > Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> > Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > ---
> >  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
>
> Verified against msm-4.4

Hello,

The current values are based on
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
which we've been using in production for many years.

-Arnaud
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Vikash Garodia 8 months, 1 week ago
Hi,

On 6/6/2025 5:29 PM, Arnaud Vrac wrote:
> Le dim. 1 juin 2025 à 09:46, Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> a écrit :
>>
>> On Sat, May 31, 2025 at 02:22:00PM +0200, Konrad Dybcio wrote:
>>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>>
>>> Fill in the correct data for the production SKU.
>>>
>>> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> ---
>>>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>>
>>
>> Verified against msm-4.4
> 
> Hello,
> 
> The current values are based on
> 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
> which we've been using in production for many years.

I see -v2 updates these to 533/444/.. MHz [1]. If the value changes based on
board variants, these need to be picked from board DT instead of driver then.

[1]
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-v2.dtsi#L1140

Regards,
Vikash
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Konrad Dybcio 8 months, 1 week ago
On 6/6/25 2:14 PM, Vikash Garodia wrote:
> Hi,
> 
> On 6/6/2025 5:29 PM, Arnaud Vrac wrote:
>> Le dim. 1 juin 2025 à 09:46, Dmitry Baryshkov
>> <dmitry.baryshkov@oss.qualcomm.com> a écrit :
>>>
>>> On Sat, May 31, 2025 at 02:22:00PM +0200, Konrad Dybcio wrote:
>>>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>>>
>>>> Fill in the correct data for the production SKU.
>>>>
>>>> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
>>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>>> ---
>>>>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
>>>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>>>
>>>
>>> Verified against msm-4.4
>>
>> Hello,
>>
>> The current values are based on
>> 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
>> which we've been using in production for many years.
> 
> I see -v2 updates these to 533/444/.. MHz [1]. If the value changes based on
> board variants, these need to be picked from board DT instead of driver then.

I believe they don't (although there exist some SoCs where fuses determine
maximum frequency for a given target). We really want to move off of in-driver
freq tables but that is still in progress.

> 
> [1]
> 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-v2.dtsi#L1140

Arnaud, as Vikash mentioned, dvfs tables and some other magic values may
get overriden in socname-v2/-v2.1/v3 etc. I'm not a fan that downstream
leaves irrelevant information for old revisions in place, instead of
simply replacing them, but what can I do..

Unless you somehow came into posession of v1 SoCs (which I believe were
totally internal), your hw has not been stretching its legs fully for
all this time.

Konrad
Re: [PATCH] media: venus: Fix MSM8998 frequency table
Posted by Arnaud Vrac 8 months, 1 week ago
Le sam. 7 juin 2025 à 11:36, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> a écrit :
>
> On 6/6/25 2:14 PM, Vikash Garodia wrote:
> > Hi,
> >
> > On 6/6/2025 5:29 PM, Arnaud Vrac wrote:
> >> Le dim. 1 juin 2025 à 09:46, Dmitry Baryshkov
> >> <dmitry.baryshkov@oss.qualcomm.com> a écrit :
> >>>
> >>> On Sat, May 31, 2025 at 02:22:00PM +0200, Konrad Dybcio wrote:
> >>>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >>>>
> >>>> Fill in the correct data for the production SKU.
> >>>>
> >>>> Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
> >>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >>>> ---
> >>>>  drivers/media/platform/qcom/venus/core.c | 10 +++++-----
> >>>>  1 file changed, 5 insertions(+), 5 deletions(-)
> >>>>
> >>>
> >>> Verified against msm-4.4
> >>
> >> Hello,
> >>
> >> The current values are based on
> >> 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
> >> which we've been using in production for many years.
> >
> > I see -v2 updates these to 533/444/.. MHz [1]. If the value changes based on
> > board variants, these need to be picked from board DT instead of driver then.
>
> I believe they don't (although there exist some SoCs where fuses determine
> maximum frequency for a given target). We really want to move off of in-driver
> freq tables but that is still in progress.
>
> >
> > [1]
> > 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-v2.dtsi#L1140
>
> Arnaud, as Vikash mentioned, dvfs tables and some other magic values may
> get overriden in socname-v2/-v2.1/v3 etc. I'm not a fan that downstream
> leaves irrelevant information for old revisions in place, instead of
> simply replacing them, but what can I do..
>
> Unless you somehow came into posession of v1 SoCs (which I believe were
> totally internal), your hw has not been stretching its legs fully for
> all this time.
>

Yes, I missed that the values were overridden in the msm8998-v2.dtsi
file, sorry for the confusion.

-Arnaud