Skip to content

Commit 6543c34

Browse files
committed
iommu: apple-dart: Support combinations of locked and unlocked DARTs
This is required for the display sub-system. m1n1 locks the DART of the boot framebuffer to minimize the blackout for the transition from boot framebuffer to the full display driver. The display blacks out when the bootloader setup mapping of the framebuffer vanishes during dart_reset(). Under certain circumstances this results in an unrecoverable crash of display coprocessor. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 70d77da commit 6543c34

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/iommu/apple-dart.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ struct apple_dart_domain {
294294
struct apple_dart_master_cfg {
295295
/* Intersection of DART capabilitles */
296296
u32 supports_bypass : 1;
297+
u32 locked : 1;
297298

298299
struct apple_dart_stream_map stream_maps[MAX_DARTS_PER_DEVICE];
299300
};
@@ -999,6 +1000,8 @@ static int apple_dart_of_xlate(struct device *dev,
9991000
return -ENOMEM;
10001001
/* Will be ANDed with DART capabilities */
10011002
cfg->supports_bypass = true;
1003+
/* Will be ORed with DART capabilities*/
1004+
cfg->locked = false;
10021005
}
10031006
dev_iommu_priv_set(dev, cfg);
10041007

@@ -1011,6 +1014,7 @@ static int apple_dart_of_xlate(struct device *dev,
10111014
}
10121015

10131016
cfg->supports_bypass &= dart->supports_bypass;
1017+
cfg->locked |= dart->locked;
10141018

10151019
for (i = 0; i < MAX_DARTS_PER_DEVICE; ++i) {
10161020
if (cfg->stream_maps[i].dart == dart) {

0 commit comments

Comments
 (0)