From 76ffe87d75e6d4f7c71a25478e6b6bebc7e6f871 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 6 Sep 2019 15:13:06 +0100 Subject: [PATCH 0177/1085] staging: bcm2835-camera: Add greyworld AWB mode This is mainly used for the NoIR camera which has no IR filter and can completely confuse normal AWB presets. Signed-off-by: Dave Stevenson --- drivers/staging/vc04_services/bcm2835-camera/controls.c | 4 ++++ drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h | 1 + 2 files changed, 5 insertions(+) --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -468,6 +468,10 @@ static int ctrl_set_awb_mode(struct bcm2 case V4L2_WHITE_BALANCE_SHADE: u32_value = MMAL_PARAM_AWBMODE_SHADE; break; + + case V4L2_WHITE_BALANCE_GREYWORLD: + u32_value = MMAL_PARAM_AWBMODE_GREYWORLD; + break; } return vchiq_mmal_port_parameter_set(dev->instance, control, --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h @@ -310,6 +310,7 @@ enum mmal_parameter_awbmode { MMAL_PARAM_AWBMODE_INCANDESCENT, MMAL_PARAM_AWBMODE_FLASH, MMAL_PARAM_AWBMODE_HORIZON, + MMAL_PARAM_AWBMODE_GREYWORLD, }; enum mmal_parameter_imagefx {