Skip to content

Commit 5c33afc

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 1dc9606 commit 5c33afc

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
};
@@ -994,6 +995,8 @@ static int apple_dart_of_xlate(struct device *dev,
994995
return -ENOMEM;
995996
/* Will be ANDed with DART capabilities */
996997
cfg->supports_bypass = true;
998+
/* Will be ORed with DART capabilities*/
999+
cfg->locked = false;
9971000
}
9981001
dev_iommu_priv_set(dev, cfg);
9991002

@@ -1006,6 +1009,7 @@ static int apple_dart_of_xlate(struct device *dev,
10061009
}
10071010

10081011
cfg->supports_bypass &= dart->supports_bypass;
1012+
cfg->locked |= dart->locked;
10091013

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

0 commit comments

Comments
 (0)