media: bcm2835-unicam: Retain packing information on G_FMT
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Tue, 19 May 2020 10:46:47 +0000 (11:46 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:05 +0000 (16:34 +0100)
commita1daabbeb660b9021084eeeaa3d5e020eb938607
tree88d5fc441f11545d5399ff23db5f1c4c69118522
parentb1f7d1493883b8e94756ef9a2f27d93882d01217
media: bcm2835-unicam: Retain packing information on G_FMT

The change to retrieve the pixel format always on g_fmt didn't
check whether the native or unpacked version of the format
had been requested, and always returned the packed one.
Correct this so that the packing setting is retained whereever
possible.

Fixes "9d59e89 media: bcm2835-unicam: Re-fetch mbus code from subdev
on a g_fmt call"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/platform/bcm2835/bcm2835-unicam.c