[PATCH 1/2] media: rppx1: handle the MAIN_POST white balance gains block
Linmao Li <[email protected]>
| Newsgroups | org.kernel.vger.linux-media,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST is defined in the uAPI, the MAIN_POST
white balance gains module is probed and started, and
RPPX1_PARAMS_MAX_SIZE already reserves room for all three white balance
gains blocks. However, the parameters type table has no entry for
AWBG_POST and rppx1_params() does not dispatch it, so userspace cannot
configure the module.
The missing type-table entry is zero-initialised. A zero-sized
AWBG_POST block can therefore make v4l2_isp_params_validate_buffer()
loop forever. A pending v4l2-isp patch rejects zero-sized blocks in the
common validator.
Add the missing type entry and dispatch AWBG_POST to rpp->post.awbg.
Fixes: 9ebf50010c68 ("media: rppx1: awbg: Add support for white balance gain settings")
Signed-off-by: Linmao Li <[email protected]>
---
drivers/media/platform/dreamchip/rppx1/rpp_params.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/dreamchip/rppx1/rpp_params.c b/drivers/media/platform/dreamchip/rppx1/rpp_params.c
index a75a27a8afd09..88162f0bdc115 100644
--- a/drivers/media/platform/dreamchip/rppx1/rpp_params.c
+++ b/drivers/media/platform/dreamchip/rppx1/rpp_params.c
@@ -25,6 +25,7 @@ rppx1_ext_params_blocks_info[] = {
RPPX1_PARAMS_BLOCK_INFO(LSC_PRE2, lsc),
RPPX1_PARAMS_BLOCK_INFO(AWBG_PRE1, awbg),
RPPX1_PARAMS_BLOCK_INFO(AWBG_PRE2, awbg),
+ RPPX1_PARAMS_BLOCK_INFO(AWBG_POST, awbg),
RPPX1_PARAMS_BLOCK_INFO(CCOR_POST, ccor),
RPPX1_PARAMS_BLOCK_INFO(HIST_PRE1, hist),
RPPX1_PARAMS_BLOCK_INFO(HIST_PRE2, hist),
@@ -79,6 +80,9 @@ int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb, size_t max_size,
case RPPX1_PARAMS_BLOCK_TYPE_AWBG_PRE1:
module = &rpp->pre1.awbg;
break;
+ case RPPX1_PARAMS_BLOCK_TYPE_AWBG_POST:
+ module = &rpp->post.awbg;
+ break;
case RPPX1_PARAMS_BLOCK_TYPE_CCOR_POST:
module = &rpp->post.ccor;
break;
--
2.25.1