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)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:06 +0000 (16:04 +0000)
commitea42c0f9d60cfa4c792507d15ec59274c17ef56d
tree844819740842d2ebdf865ac6eff93009f2e259ba
parent57a9fcbb98adb5445b4074d3cf2ef7b750b15b57
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