From: Cunyuan Liu <cunyuan.liu@cixtech.com>
To: boris.brezillon@collabora.com, steven.price@arm.com,
liviu.dudau@arm.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, gary.yang@cixtech.com,
fugang.duan@cixtech.com, daniel.almeida@collabora.com,
aliceryhl@google.com, p.zabel@pengutronix.de,
daniel@fooishbar.org
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
cix-kernel-upstream@cixtech.com, robin.wang@cixtech.com,
cunyuan.liu@cixtech.com
Subject: [PATCH v3 1/7] drm/panthor: Add optional external reset support
Date: Thu, 19 Nov 2026 20:38:44 +0800 [thread overview]
Message-ID: <20261119123850.2994625-2-cunyuan.liu@cixtech.com> (raw)
In-Reply-To: <20261119123850.2994625-1-cunyuan.liu@cixtech.com>
The GPU on CIX Sky1 needs an external reset before the driver first
accesses the hardware. Without this reset, the GPU hardware cannot be
accessed correctly.
Acquire an optional exclusive reset for all platforms and apply it after
enabling the clocks during initial probe. Platforms without a reset keep
working through the reset framework NULL handling.
Signed-off-by: Cunyuan Liu <cunyuan.liu@cixtech.com>
---
drivers/gpu/drm/panthor/panthor_device.c | 13 +++++++++++++
drivers/gpu/drm/panthor/panthor_device.h | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 9687c59de350..a3a32abec5f7 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -229,6 +229,11 @@ int panthor_device_init(struct panthor_device *ptdev)
return ret;
}
+ ptdev->reset_control = devm_reset_control_get_optional_exclusive(ptdev->base.dev, NULL);
+ if (IS_ERR(ptdev->reset_control))
+ return dev_err_probe(ptdev->base.dev, PTR_ERR(ptdev->reset_control),
+ "Failed to get GPU reset\n");
+
ret = panthor_devfreq_init(ptdev);
if (ret)
return ret;
@@ -511,6 +516,12 @@ int panthor_device_resume(struct device *dev)
if (ret)
goto err_disable_stacks_clk;
+ if (!panthor_device_is_initialized(ptdev)) {
+ ret = reset_control_reset(ptdev->reset_control);
+ if (ret)
+ goto err_disable_coregroup_clk;
+ }
+
panthor_devfreq_resume(ptdev);
if (panthor_device_is_initialized(ptdev) &&
@@ -553,6 +564,8 @@ int panthor_device_resume(struct device *dev)
err_suspend_devfreq:
panthor_devfreq_suspend(ptdev);
+
+err_disable_coregroup_clk:
clk_disable_unprepare(ptdev->clks.coregroup);
err_disable_stacks_clk:
diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h
index b55a3f9edd41..adbc2e2f03be 100644
--- a/drivers/gpu/drm/panthor/panthor_device.h
+++ b/drivers/gpu/drm/panthor/panthor_device.h
@@ -19,6 +19,8 @@
#include <drm/gpu_scheduler.h>
#include <drm/panthor_drm.h>
+struct reset_control;
+
struct panthor_csf;
struct panthor_csf_ctx;
struct panthor_device;
@@ -138,6 +140,9 @@ struct panthor_device {
/** @soc_data: Optional SoC data. */
const struct panthor_soc_data *soc_data;
+ /** @reset_control: Optional external GPU reset. */
+ struct reset_control *reset_control;
+
/** @phys_addr: Physical address of the iomem region. */
phys_addr_t phys_addr;
--
2.53.0
next prev parent reply other threads:[~2026-11-19 12:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 12:38 [PATCH v3 0/7] Add initial GPU support for CIX Sky1 Cunyuan Liu
2026-11-19 12:38 ` Cunyuan Liu [this message]
2026-11-19 12:38 ` [PATCH v3 2/7] drm/panthor: Allow operation without an OPP table Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 3/7] dt-bindings: gpu: arm,mali-valhall-csf: Add system-cache policies Cunyuan Liu
2026-11-22 16:58 ` Krzysztof Kozlowski
2026-11-19 12:38 ` [PATCH v3 4/7] drm/panthor: Add system-cache allocation policy support Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 5/7] dt-bindings: gpu: Add CIX Sky1 Mali support Cunyuan Liu
2026-11-22 17:01 ` Krzysztof Kozlowski
2026-11-19 12:38 ` [PATCH v3 6/7] drm/panthor: Add CIX Sky1 compatible Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 7/7] arm64: dts: cix: Add GPU support for Sky1 Orion O6 Cunyuan Liu
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=20261119123850.2994625-2-cunyuan.liu@cixtech.com \
--to=cunyuan.liu@cixtech.com \
--cc=aliceryhl@google.com \
--cc=boris.brezillon@collabora.com \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=daniel@fooishbar.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=fugang.duan@cixtech.com \
--cc=gary.yang@cixtech.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=robin.wang@cixtech.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=steven.price@arm.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
all inboxes | Powered by JetHome®