From: Krzysztof Kozlowski <krzk@kernel.org>
To: Michael Walle <mwalle@kernel.org>,
Frank Binns <frank.binns@imgtec.com>,
Matt Coster <matt.coster@imgtec.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Stephan Gerhold <stephan.gerhold@linaro.org>,
Abel Vesa <abel.vesa@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Stephen Boyd <sboyd@kernel.org>
Subject: Re: [RFC PATCH 2/3] drm/imagination: fix clock control on the J722S
Date: Wed, 13 Aug 2025 20:19:57 +0200 [thread overview]
Message-ID: <faafcc6f-d5f5-449b-bb43-81bf496bdbb0@kernel.org> (raw)
In-Reply-To: <20250716134717.4085567-3-mwalle@kernel.org>
On 16/07/2025 15:47, Michael Walle wrote:
> The J722S won't let you set the clock frequency if there is no device
> using it. Thus, the assigned-clocks property won't work per se.
>
> As a workaround, set the clock again during the probing of the driver.
>
> Signed-off-by: Michael Walle <mwalle@kernel.org>
> ---
> drivers/gpu/drm/imagination/pvr_device.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c
> index 8b9ba4983c4c..e7a7cc1bdf93 100644
> --- a/drivers/gpu/drm/imagination/pvr_device.c
> +++ b/drivers/gpu/drm/imagination/pvr_device.c
> @@ -16,6 +16,7 @@
>
> #include <linux/bitfield.h>
> #include <linux/clk.h>
> +#include <linux/clk/clk-conf.h>
> #include <linux/compiler_attributes.h>
> #include <linux/compiler_types.h>
> #include <linux/dma-mapping.h>
> @@ -641,6 +642,14 @@ pvr_device_init(struct pvr_device *pvr_dev)
> if (err)
> return err;
>
> + /* Set any 'assigned-clocks' properties again. This is a workaround for
> + * the clock handling on k3 platforms. There, one cannot set the clock
> + * frequency until there is at least one (enabled) user if it.
> + */
> + err = of_clk_set_defaults(drm_dev->dev->of_node, true);
> + if (err)
> + return err;
+Cc Abel, Bjorn, Konrad, Stephan G. and Stephen B.,
Interesting stuff. This touches a bit similar problems we have (and had)
for Qualcomm Display PHYs, where assigned-clock-parents were called too
early - before the block (PHY) is being enabled.
The workaround we implemented so far was - last patch hook in:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80dd5911cbfdc2f6ae904341d41a7a8bd8cc546c
I know Stephan G. is working on something better, so probably he will Cc
you once this is ready.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-13 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 13:47 [RFC PATCH 0/3] drm/imagination: add AM62P/AM67A/J722S support Michael Walle
2025-07-16 13:47 ` [RFC PATCH 1/3] dt-bindings: gpu: img: Add AM62P SoC specific compatible Michael Walle
2025-07-16 16:17 ` Andrew Davis
2025-07-17 6:56 ` Michael Walle
2025-07-16 13:47 ` [RFC PATCH 2/3] drm/imagination: fix clock control on the J722S Michael Walle
2025-08-13 18:19 ` Krzysztof Kozlowski [this message]
2025-07-16 13:47 ` [RFC PATCH 3/3] arm64: dts: ti: add GPU node Michael Walle
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=faafcc6f-d5f5-449b-bb43-81bf496bdbb0@kernel.org \
--to=krzk@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=konradybcio@kernel.org \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matt.coster@imgtec.com \
--cc=mripard@kernel.org \
--cc=mwalle@kernel.org \
--cc=nm@ti.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=simona@ffwll.ch \
--cc=stephan.gerhold@linaro.org \
--cc=tzimmermann@suse.de \
--cc=vigneshr@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).