Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion drivers/gpu/drm/apple/dcp-m4-frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ struct dcp_m4_frame {
u32 height;
u32 stride;
enum dcp_m4_frame_format format;
/* ARGB8888 blended pre-multiplied rather than by coverage */
bool premultiplied;
};

static inline int dcp_m4_frame_check(const struct dcp_m4_frame *frame)
Expand Down Expand Up @@ -97,7 +99,8 @@ static inline void dcp_m4_surface_encode(u8 *surface, const struct dcp_m4_frame
u32 size = frame->stride * frame->height;

memset(surface, 0, DCP_M4_SURFACE_SIZE);
surface[2] = frame->format == DCP_M4_XRGB8888;
/* is_premultiplied: an opaque XRGB8888 frame is blended as one too. */
surface[2] = frame->format == DCP_M4_XRGB8888 || frame->premultiplied;
put_unaligned_le32(1, surface + 3);
put_unaligned_le32(1, surface + 7);
put_unaligned_le32(0x42475241, surface + 0x0b);
Expand Down
Loading
Loading