Skip to content

Commit cdd894a

Browse files
naushirpelwell
authored andcommitted
drivers: media: rpi: cfe: Avoid unpack operation for 16-bit formats
The unpack operation is redundant for 16-bit sensor formats, don't set the hardware to do it in these cases. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent a1606f7 commit cdd894a

File tree

1 file changed

+3
-1
lines changed
  • drivers/media/platform/raspberrypi/rp1_cfe

1 file changed

+3
-1
lines changed

drivers/media/platform/raspberrypi/rp1_cfe/cfe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,9 @@ static void cfe_start_channel(struct cfe_node *node)
884884
width = source_fmt->width;
885885
height = source_fmt->height;
886886

887-
if (node->vid_fmt.fmt.pix.pixelformat ==
887+
/* We don't need to repack in the case of 16-bit output. */
888+
if (fmt->depth != 16 &&
889+
node->vid_fmt.fmt.pix.pixelformat ==
888890
fmt->remap[CFE_REMAP_16BIT])
889891
mode = CSI2_MODE_REMAP;
890892
else if (node->vid_fmt.fmt.pix.pixelformat ==

0 commit comments

Comments
 (0)