Skip to content

Commit 6516270

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 <[email protected]>
1 parent 38602af commit 6516270

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
};
@@ -992,6 +993,8 @@ static int apple_dart_of_xlate(struct device *dev,
992993
return -ENOMEM;
993994
/* Will be ANDed with DART capabilities */
994995
cfg->supports_bypass = true;
996+
/* Will be ORed with DART capabilities*/
997+
cfg->locked = false;
995998
}
996999
dev_iommu_priv_set(dev, cfg);
9971000

@@ -1002,6 +1005,7 @@ static int apple_dart_of_xlate(struct device *dev,
10021005
}
10031006

10041007
cfg->supports_bypass &= dart->supports_bypass;
1008+
cfg->locked |= dart->locked;
10051009

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

0 commit comments

Comments
 (0)