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:14 +0000 (16:34 +0100)
commitc8d6d6faa005e8e9001b7dbd9f0cccd472326e89
tree4675230e087d098074d1964b119eb6cdc2f9f97a
parent15e8cbd830c4a72978a9e28cdd8658c562a34b25
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