Skip to content

Commit 62c4333

Browse files
superna9999gregkh
authored andcommitted
drm/panfrost: add support for vendor quirk
[ Upstream commit 91e8909 ] The T820, G31 & G52 GPUs integrated by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers after each reset. This adds a callback in the device compatible struct of permit this. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [Steven: Fix typo in commit log] Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200916150147.25753-2-narmstrong@baylibre.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d7170b3 commit 62c4333

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/panfrost/panfrost_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ struct panfrost_compatible {
6969
int num_pm_domains;
7070
/* Only required if num_pm_domains > 1. */
7171
const char * const *pm_domain_names;
72+
73+
/* Vendor implementation quirks callback */
74+
void (*vendor_quirk)(struct panfrost_device *pfdev);
7275
};
7376

7477
struct panfrost_device {

drivers/gpu/drm/panfrost/panfrost_gpu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ static void panfrost_gpu_init_quirks(struct panfrost_device *pfdev)
146146

147147
if (quirks)
148148
gpu_write(pfdev, GPU_JM_CONFIG, quirks);
149+
150+
/* Here goes platform specific quirks */
151+
if (pfdev->comp->vendor_quirk)
152+
pfdev->comp->vendor_quirk(pfdev);
149153
}
150154

151155
#define MAX_HW_REVS 6

0 commit comments

Comments
 (0)