Skip to content

Commit e5f989a

Browse files
fixup!: do not check pitch with INTERCHANGE modifier
1 parent 5011f80 commit e5f989a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/gpu/drm/apple/plane.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,14 @@ static int apple_plane_atomic_check(struct drm_plane *plane,
128128
return -EINVAL;
129129
}
130130

131-
/*
132-
* Pitches have to be 64-byte aligned.
133-
*/
134-
for (u32 i = 0; i < new_plane_state->fb->format->num_planes; i++)
135-
if (new_plane_state->fb->pitches[i] & 63)
136-
return -EINVAL;
131+
if (new_plane_state->fb->modifier != DRM_FORMAT_MOD_APPLE_INTERCHANGE_COMPRESSED) {
132+
/*
133+
* Pitches have to be 64-byte aligned for non-tiled modifiers.
134+
*/
135+
for (u32 i = 0; i < new_plane_state->fb->format->num_planes; i++)
136+
if (new_plane_state->fb->pitches[i] & 63)
137+
return -EINVAL;
138+
}
137139

138140
/*
139141
* FIXME: dcp can currently only use multi-planar buffers using the same

0 commit comments

Comments
 (0)