Commit 8c3c818c authored by Steven Price's avatar Steven Price

drm/panfrost: Ensure GPU quirks are always initialised

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: f3ba9122 ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200909122957.51667-1-steven.price@arm.com
parent ac5037af
...@@ -305,6 +305,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev) ...@@ -305,6 +305,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
int ret; int ret;
u32 val; u32 val;
panfrost_gpu_init_quirks(pfdev);
/* Just turn on everything for now */ /* Just turn on everything for now */
gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present); gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present);
ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO, ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
...@@ -357,7 +359,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev) ...@@ -357,7 +359,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
return err; return err;
} }
panfrost_gpu_init_quirks(pfdev);
panfrost_gpu_power_on(pfdev); panfrost_gpu_power_on(pfdev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment