]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pmdomain: rockchip: fix rockchip_pd_power error handling
authorPeter Geis <pgwipeout@gmail.com>
Thu, 20 Feb 2025 18:58:08 +0000 (19:58 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 28 Feb 2025 12:07:04 +0000 (13:07 +0100)
commit6b2690df3f032d91546841dcca44d5acdb7ace1e
treef86fbd1890cc7925412a493c9715df0b6fe65a76
parentedcef667070f7dbddca403e6331c86940407dae0
pmdomain: rockchip: fix rockchip_pd_power error handling

The calls rockchip_pd_power makes to rockchip_pmu_set_idle_request lack
any return error handling, causing device drivers to incorrectly believe
the hardware idle requests succeed when they may have failed. This leads
to software possibly accessing hardware that is powered off and the
subsequent SError panic that follows.

Add error checking and return errors to the calling function to prevent
such crashes.

gst-launch-1.0 videotestsrc num-buffers=2000 ! v4l2jpegenc ! fakesink
Setting pipeline to PAUSED ...er-x64
Pipeline is PREROLLING ...
Redistribute latency...
rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'hevc', val=0x98260
SError Interrupt on CPU2, code 0x00000000bf000002 -- SError

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20241214215802.23989-1-pgwipeout@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-5-a4f9c24e5b81@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/rockchip/pm-domains.c