Skip to content

Commit

Permalink
drm/panfrost: Ensure GPU quirks are always initialised
Browse files Browse the repository at this point in the history
[ Upstream commit 8c3c818 ]

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: f3ba912 ("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>
  • Loading branch information
Steven Price authored and gregkh committed Oct 29, 2020
1 parent dc48ca1 commit 039ee8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/panfrost/panfrost_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 039ee8a

Please sign in to comment.