]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/panfrost: Ensure GPU quirks are always initialised
authorSteven Price <steven.price@arm.com>
Wed, 9 Sep 2020 12:29:57 +0000 (13:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:36 +0000 (10:07 +0100)
[ Upstream commit 8c3c818c23a5bbce6ff180dd2ee04415241df77c ]

The GPU 'CONFIG' registers used to work around hardware issues are
cleared on reset so need to be programmed every time the GPU is reset.
However panfrost_device_reset() failed to do this.

To avoid this in future instead move the call to
panfrost_gpu_init_quirks() to panfrost_gpu_power_on() so that the
regsiters are always programmed just before the cores are powered.

Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200909122957.51667-1-steven.price@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panfrost/panfrost_gpu.c

index f2c1ddc41a9bf275960c1806e7bc1d547db3610a..689b92893e0e195fdc43b582cbbfc2213b3cd5e6 100644 (file)
@@ -304,6 +304,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
        int ret;
        u32 val;
 
+       panfrost_gpu_init_quirks(pfdev);
+
        /* Just turn on everything for now */
        gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present);
        ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
@@ -355,7 +357,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
                return err;
        }
 
-       panfrost_gpu_init_quirks(pfdev);
        panfrost_gpu_power_on(pfdev);
 
        return 0;