X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0729-media-bcm2835-unicam-Add-support-for-luma-greyscale-.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0729-media-bcm2835-unicam-Add-support-for-luma-greyscale-.patch;h=61a817ab6bf73cb2ff9f801d0b313c429b8c6bae;hb=84d555aa74434392b682fd9eb0fa701c89a046d6;hp=0000000000000000000000000000000000000000;hpb=953973c2991e8640549a55df7a0574a1abac8644;p=openwrt%2Fstaging%2Fchunkeey.git diff --git a/target/linux/brcm2708/patches-4.19/950-0729-media-bcm2835-unicam-Add-support-for-luma-greyscale-.patch b/target/linux/brcm2708/patches-4.19/950-0729-media-bcm2835-unicam-Add-support-for-luma-greyscale-.patch new file mode 100644 index 0000000000..61a817ab6b --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0729-media-bcm2835-unicam-Add-support-for-luma-greyscale-.patch @@ -0,0 +1,50 @@ +From 253dd469e6403b6c2afd25d4f8338a0c1588583f Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Thu, 3 Oct 2019 13:45:51 +0100 +Subject: [PATCH] media: bcm2835-unicam: Add support for luma/greyscale + formats + +Add support for V4L2_PIX_FMT_GREY, V4L2_PIX_FMT_Y10P, +V4L2_PIX_FMT_Y10, and V4L2_PIX_FMT_Y12 image formats from the +appropriate mediabus formats advertised by sensors. + +Signed-off-by: Dave Stevenson +--- + .../media/platform/bcm2835/bcm2835-unicam.c | 21 ++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -307,12 +307,31 @@ static const struct unicam_fmt formats[] + .code = MEDIA_BUS_FMT_SRGGB14_1X14, + .depth = 14, + .csi_dt = 0x2d, +- }, ++ }, { + /* + * 16 bit Bayer formats could be supported, but there is no CSI2 + * data_type defined for raw 16, and no sensors that produce it at + * present. + */ ++ ++ /* Greyscale formats */ ++ .fourcc = V4L2_PIX_FMT_GREY, ++ .code = MEDIA_BUS_FMT_Y8_1X8, ++ .depth = 8, ++ .csi_dt = 0x2a, ++ }, { ++ .fourcc = V4L2_PIX_FMT_Y10P, ++ .repacked_fourcc = V4L2_PIX_FMT_Y10, ++ .code = MEDIA_BUS_FMT_Y10_1X10, ++ .depth = 10, ++ .csi_dt = 0x2b, ++ }, { ++ /* NB There is no packed V4L2 fourcc for this format. */ ++ .repacked_fourcc = V4L2_PIX_FMT_Y12, ++ .code = MEDIA_BUS_FMT_Y12_1X12, ++ .depth = 12, ++ .csi_dt = 0x2c, ++ }, + }; + + struct unicam_dmaqueue {