From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krishna Manikandan <quic_mkrishn@quicinc.com>,
Jonathan Marek <jonathan@marek.ca>,
Kuogee Hsieh <quic_khsieh@quicinc.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Srini Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [PATCH RFC 08/11] drm/msm/dsi: Add support for SM8750
Date: Thu, 23 Jan 2025 12:34:28 +0100 [thread overview]
Message-ID: <4adeffe7-ca07-4441-86fe-10a4891b7b4b@linaro.org> (raw)
In-Reply-To: <5irzvm4socrdjx3zqdxnogpai3bmfb52f63ddr3pisn5aa4jgf@mbc42kb3gyqd>
On 13/01/2025 13:13, Dmitry Baryshkov wrote:
> On Mon, Jan 13, 2025 at 12:02:54PM +0100, Krzysztof Kozlowski wrote:
>> On 13/01/2025 09:29, Dmitry Baryshkov wrote:
>>> On Fri, Jan 10, 2025 at 01:43:28PM +0100, Krzysztof Kozlowski wrote:
>>>> On 10/01/2025 10:17, Dmitry Baryshkov wrote:
>>>>> On Fri, Jan 10, 2025 at 09:59:26AM +0100, Krzysztof Kozlowski wrote:
>>>>>> On 10/01/2025 00:18, Dmitry Baryshkov wrote:
>>>>>>> On Thu, Jan 09, 2025 at 02:08:35PM +0100, Krzysztof Kozlowski wrote:
>>>>>>>> Add support for DSI PHY v7.0 on Qualcomm SM8750 SoC which comes with two
>>>>>>>> differences worth noting:
>>>>>>>>
>>>>>>>> 1. ICODE_ACCUM_STATUS_LOW and ALOG_OBSV_BUS_STATUS_1 registers - their
>>>>>>>> offsets were just switched. Currently these registers are not used
>>>>>>>> in the driver, so the easiest is to document both but keep them
>>>>>>>> commented out to avoid conflict.
>>>>>>>>
>>>>>>>> 2. DSI PHY PLLs, the parents of pixel and byte clocks, cannot be used as
>>>>>>>> parents before they are prepared and initial rate is set. Therefore
>>>>>>>> assigned-clock-parents are not working here and driver is responsible
>>>>>>>> for reparenting clocks with proper procedure: see dsi_clk_init_6g_v2_9().
>>>>>>>
>>>>>>> Isn't it a description of CLK_SET_PARENT_GATE and/or
>>>>>>
>>>>>> No - must be gated accross reparent - so opposite.
>>>>>>
>>>>>>> CLK_OPS_PARENT_ENABLE ?
>>>>>>
>>>>>> Yes, but does not work. Probably enabling parent, before
>>>>>> assigned-clocks-parents, happens still too early:
>>>>>>
>>>>>> [ 1.623554] DSI PLL(0) lock failed, status=0x00000000
>>>>>> [ 1.623556] PLL(0) lock failed
>>>>>> [ 1.624650] ------------[ cut here ]------------
>>>>>> [ 1.624651] disp_cc_mdss_byte0_clk_src: rcg didn't update its
>>>>>> configuration.
>>>>>>
>>>>>> Or maybe something is missing in the DSI PHY PLL driver?
>>>>>
>>>>> Do you have the no-zero-freq workaround?
>>>>
>>>> Yes, it is necessary also for my variant. I did not include it here, but
>>>> I should mention it in the cover letter.
>>>
>>> Could you please possibly backtrace the corresponding enable() calls?
>>
>>
>> It's the same backtrace I shared some time ago in internal discussions:
>> https://pastebin.com/kxUFgzD9
>> Unless you ask for some other backtrace?
>>
>>> I'd let Stephen and/or Bjorn or Konrad to correct me, but I think that
>>> such requirement should be handled by the framework instead of having
>>> the drivers to manually reparent the clocks.
>>
>> I don't know how exactly you would like to solve it. The clocks can be
>> reparented only after some other device specific enable sequence. It's
>> the third device here, but not reflected in the clocks hierarchy. Maybe
>> it's the result how entire Display device nodes were designed in the
>> first place?
>>
>> Assigned clocks are between DSI PHY and DISP cc, but they are a property
>> of DSI controller. This looks exactly too specific for core to handle
>> and drivers, not framework, should manually reparent such clocks.
>> Otherwise we need
>> "clk_pre_prepare_callback_if_we_are_called_when_phy_is_disabled" sort of
>> callback.
>
> What kind of PHY programming is required? Is enabling the PLL enough or
> does it need anything else? Are the PLL supplies properly enabled at
> this point?
>
I don't know exactly and checking is tricky. I tried to use
CLK_OPS_PARENT_ENABLE - with equivalent code, setting proper parents but
without enabling the DSI PHY PLL manually just with
CLK_OPS_PARENT_ENABLE - but then you have multiple:
dsi0_pll_bit_clk: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set
So how do you supposed to test it? Any assigned-clocks-xxx will be way
too early. Moving code around? Well, if I move preparing the DSI PLL
clocks out of dsi_link_clk_set_rate_6g, then dsi_link_clk_set_rate_6g()
will fail. Always and CLK_OPS_PARENT_ENABLE does not help because of above.
If you have specific code in mind, I can try it, but I don't see easy
methods to see what has to be enabled exactly because of how everything
is entangled together.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-01-23 11:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 13:08 [RFC PATCH 00/11] drm/msm: Add support for SM8750 Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 01/11] dt-bindings: display/msm: dsi-controller-main: Combine if:then: entries Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 02/11] dt-bindings: display/msm: dsi-controller-main: Add missing minItems Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 03/11] dt-bindings: display/msm: dsi-phy-7nm: Add SM8750 Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 04/11] dt-bindings: display/msm: dsi-controller-main: " Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 05/11] dt-bindings: display/msm: dp-controller: " Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 06/11] dt-bindings: display/msm: qcom,sm8650-dpu: " Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 07/11] dt-bindings: display/msm: qcom,sm8750-mdss: " Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 08/11] drm/msm/dsi: Add support for SM8750 Krzysztof Kozlowski
2025-01-09 23:18 ` Dmitry Baryshkov
2025-01-10 8:59 ` Krzysztof Kozlowski
2025-01-10 9:17 ` Dmitry Baryshkov
2025-01-10 12:43 ` Krzysztof Kozlowski
2025-01-13 8:29 ` Dmitry Baryshkov
2025-01-13 11:02 ` Krzysztof Kozlowski
2025-01-13 12:13 ` Dmitry Baryshkov
2025-01-23 11:34 ` Krzysztof Kozlowski [this message]
2025-01-23 11:42 ` Dmitry Baryshkov
2025-01-23 12:00 ` Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 09/11] drm/msm/dpu: " Krzysztof Kozlowski
2025-01-09 22:18 ` Dmitry Baryshkov
2025-01-10 13:07 ` Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC 10/11] drm/msm/mdss: " Krzysztof Kozlowski
2025-01-09 22:39 ` Dmitry Baryshkov
2025-01-10 7:48 ` Krzysztof Kozlowski
2025-01-09 13:08 ` [PATCH RFC / WIP 11/11] drm/msm/dpu: WIP: CTL_LAYER_EXT is gone Krzysztof Kozlowski
2025-01-09 23:03 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4adeffe7-ca07-4441-86fe-10a4891b7b4b@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_khsieh@quicinc.com \
--cc=quic_mkrishn@quicinc.com \
--cc=robdclark@gmail.com \
--cc=robh@kernel.org \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=srinivas.kandagatla@linaro.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox