lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69ec1926-760e-c957-82b5-0c3f48f65dcf@linaro.org>
Date:   Mon, 8 May 2023 13:35:07 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Luca Weiss <luca@...tu.xyz>,
        ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
        Bjorn Andersson <andersson@...nel.org>,
        Andy Gross <agross@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Bartosz Dudziak <bartosz.dudziak@...jp.pl>
Cc:     linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: qcom: mmcc-msm8974: Add OXILICX_GDSC for msm8226



On 8.05.2023 13:32, Dmitry Baryshkov wrote:
> On 08/05/2023 10:23, Konrad Dybcio wrote:
>>
>>
>> On 6.05.2023 23:20, Luca Weiss wrote:
>>> On msm8226 we also have OXILICX_GDSC but we need a slighly different
>>> config, with a .cxcs defined for clock but with no parent.
>> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and
>> to achieve that, we sometimes define it to be the GX's (also
>> implicitly known as "oxili-non-CX" in before-a6xx-times) parent..
>>
>> Roughly speaking CX powers the "GPU hardware owned by the broader
>> SoC that may not need the GPU core clock to be up" and GX powers
>> the "GPU hardware owned strictly by the GPU that needs at least some
>> GPU clocks to be enabled"
>>
>> Maybe 8974 simply has a bug in the driver that would do the reverse?
>> Could you (and perhaps Dmitry on his shiny new 13yo board) test that
>> theory, preferably on both SoCs?
>>
>> --- a/drivers/clk/qcom/mmcc-msm8974.c
>> +++ b/drivers/clk/qcom/mmcc-msm8974.c
>> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = {
>>          .pd = {
>>                  .name = "oxili",
>>          },
>> +       .parent = &oxili_gdsc.pd,
>>          .pwrsts = PWRSTS_OFF_ON,
>>   };
> 
> Are you declaring oxili_gdsc to be a parent of itself?
lol.. nice catch of course this line should have been 

+       .parent = &oxilicx_gdsc.pd,

and the definitions would need to be swapped

Konrad
> 
>>   @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = {
>>          .pd = {
>>                  .name = "oxilicx",
>>          },
>> -       .parent = &oxili_gdsc.pd,
>>          .pwrsts = PWRSTS_OFF_ON,
>>   };
>>
>> Konrad
>>>
>>> Signed-off-by: Luca Weiss <luca@...tu.xyz>
>>> ---
>>>   drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c
>>> index 4273fce9a4a4..39ee3953567c 100644
>>> --- a/drivers/clk/qcom/mmcc-msm8974.c
>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c
>>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = {
>>>       .pwrsts = PWRSTS_OFF_ON,
>>>   };
>>>   +static struct gdsc oxilicx_gdsc_msm8226 = {
>>> +    .gdscr = 0x4034,
>>> +    .cxcs = (unsigned int []){ 0x4028 },
>>> +    .cxc_count = 1,
>>> +    .pd = {
>>> +        .name = "oxilicx",
>>> +    },
>>> +    .pwrsts = PWRSTS_OFF_ON,
>>> +};
>>> +
>>>   static struct clk_regmap *mmcc_msm8226_clocks[] = {
>>>       [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr,
>>>       [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr,
>>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = {
>>>       [MDSS_GDSC] = &mdss_gdsc,
>>>       [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc,
>>>       [CAMSS_VFE_GDSC] = &camss_vfe_gdsc,
>>> +    [OXILICX_GDSC] = &oxilicx_gdsc_msm8226,
>>>   };
>>>     static const struct regmap_config mmcc_msm8226_regmap_config = {
>>>
>>> ---
>>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889
>>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d
>>>
>>> Best regards,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ