Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: qcom: camss: Use a macro to specify the initial buffer count

Replace the hardcoded buffer count value with a macro to enable
operating on these buffers elsewhere in the CAMSS driver based on this
count. Some of the hardware architectures require deferring the AUP and
REG update until after the CSID configuration and this macro is expected
to be useful in such scenarios.

Signed-off-by: Hangxiang Ma <hangxiang.ma@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Hangxiang Ma and committed by
Hans Verkuil
d5479f00 c38d1d70

+2 -1
+1 -1
drivers/media/platform/qcom/camss/camss-vfe.c
··· 541 541 542 542 ops->vfe_wm_start(vfe, output->wm_idx[0], line); 543 543 544 - for (i = 0; i < 2; i++) { 544 + for (i = 0; i < CAMSS_INIT_BUF_COUNT; i++) { 545 545 output->buf[i] = vfe_buf_get_pending(output); 546 546 if (!output->buf[i]) 547 547 break;
+1
drivers/media/platform/qcom/camss/camss.h
··· 41 41 (to_camss_index(ptr_module, index)->dev) 42 42 43 43 #define CAMSS_RES_MAX 17 44 + #define CAMSS_INIT_BUF_COUNT 2 44 45 45 46 struct camss_subdev_resources { 46 47 char *regulators[CAMSS_RES_MAX];