Skip to content

Commit 91e8909

Browse files
superna9999stevenprice-arm
authored andcommitted
drm/panfrost: add support for vendor quirk
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
1 parent a7d3943 commit 91e8909

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
@@ -70,6 +70,9 @@ struct panfrost_compatible {
7070
int num_pm_domains;
7171
/* Only required if num_pm_domains > 1. */
7272
const char * const *pm_domain_names;
73+
74+
/* Vendor implementation quirks callback */
75+
void (*vendor_quirk)(struct panfrost_device *pfdev);
7376
};
7477

7578
struct panfrost_device {

drivers/gpu/drm/panfrost/panfrost_gpu.c

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

137137
if (quirks)
138138
gpu_write(pfdev, GPU_JM_CONFIG, quirks);
139+
140+
/* Here goes platform specific quirks */
141+
if (pfdev->comp->vendor_quirk)
142+
pfdev->comp->vendor_quirk(pfdev);
139143
}
140144

141145
#define MAX_HW_REVS 6

0 commit comments

Comments
 (0)