media: amlogic-c3: Add validations for ae and awb configAvoid invalid memory access if the zones_num is bigger thanzone_weight.This patch fixes the following smatch errors:drivers/media/platfor
media: amlogic-c3: Add validations for ae and awb configAvoid invalid memory access if the zones_num is bigger thanzone_weight.This patch fixes the following smatch errors:drivers/media/platform/amlogic/c3/isp/c3-isp-params.c:111 c3_isp_params_awb_wt() error: buffer overflow 'cfg->zone_weight' 768 <= u32maxdrivers/media/platform/amlogic/c3/isp/c3-isp-params.c:111 c3_isp_params_awb_wt() error: buffer overflow 'cfg->zone_weight' 768 <= u32maxdrivers/media/platform/amlogic/c3/isp/c3-isp-params.c:227 c3_isp_params_ae_wt() error: buffer overflow 'cfg->zone_weight' 255 <= u32maxdrivers/media/platform/amlogic/c3/isp/c3-isp-params.c:227 c3_isp_params_ae_wt() error: buffer overflow 'cfg->zone_weight' 255 <= u32maxCc: stable@vger.kernel.orgFixes: fb2e135208f3 ("media: platform: Add C3 ISP driver")Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>Reviewed-by: Keke Li <keke.li@amlogic.com>Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
media: v4l2-isp: Rename block_info to block_type_infoThe v4l2_isp_params_block_info structure contains validation informationthat apply to a block -type- and not only to a specific ISP blockimple
media: v4l2-isp: Rename block_info to block_type_infoThe v4l2_isp_params_block_info structure contains validation informationthat apply to a block -type- and not only to a specific ISP blockimplementation.Clarify this by renaming v4l2_isp_params_block_info inv4l2_isp_params_block_type_info and update the documentation and theusers of v4l2-isp accordingly.Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
media: amlogic-c3: Use v4l2-isp for validationConvert c3-isp-params.c to use the helpers defined in v4l2-isp.hto perform validation of a ISP parameters buffer.Reviewed-by: Keke Li <keke.li@amlog
media: amlogic-c3: Use v4l2-isp for validationConvert c3-isp-params.c to use the helpers defined in v4l2-isp.hto perform validation of a ISP parameters buffer.Reviewed-by: Keke Li <keke.li@amlogic.com>Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
media: platform: Add C3 ISP driverThe C3 ISP supports multi-camera and multi-exposure HDR, integratesadvanced imaging technologies for optimal quality, and drives thecore pipeline to transform ra
media: platform: Add C3 ISP driverThe C3 ISP supports multi-camera and multi-exposure HDR, integratesadvanced imaging technologies for optimal quality, and drives thecore pipeline to transform raw sensor data into high-fidelity imagesthrough demosaicing, color correction, and tone mapping operations.Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>Signed-off-by: Keke Li <keke.li@amlogic.com>Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>[hverkuil: drop unnecessary vb2_ops_wait_prepare/finish callbacks]