diff --git a/drivers/media/platform/apple/isp/isp-cam.c b/drivers/media/platform/apple/isp/isp-cam.c index e9774b15ef6677..a96600ac21eb97 100644 --- a/drivers/media/platform/apple/isp/isp-cam.c +++ b/drivers/media/platform/apple/isp/isp-cam.c @@ -403,7 +403,7 @@ static int isp_ch_configure_capture(struct apple_isp *isp, u32 ch) if (err) return err; - err = isp_cmd_apple_ch_temporal_filter_start(isp, ch, isp->hw->temporal_filter); + err = isp_cmd_apple_ch_temporal_filter_start(isp, ch, isp->temporal_filter); if (err) return err; @@ -443,7 +443,7 @@ static int isp_ch_configure_capture(struct apple_isp *isp, u32 ch) if (err) return err; - err = isp_cmd_apple_ch_temporal_filter_start(isp, ch, isp->hw->temporal_filter); + err = isp_cmd_apple_ch_temporal_filter_start(isp, ch, isp->temporal_filter); if (err) return err; diff --git a/drivers/media/platform/apple/isp/isp-drv.c b/drivers/media/platform/apple/isp/isp-drv.c index 27e9012d8794cc..45597e0361fa8a 100644 --- a/drivers/media/platform/apple/isp/isp-drv.c +++ b/drivers/media/platform/apple/isp/isp-drv.c @@ -251,6 +251,11 @@ static int apple_isp_probe(struct platform_device *pdev) return err; } + err = of_property_read_u32(dev->of_node, "apple,temporal-filter", + &isp->temporal_filter); + if (err) + isp->temporal_filter = 0; + err = apple_isp_init_presets(isp); if (err) { dev_err(dev, "failed to initialize presets\n"); @@ -391,7 +396,6 @@ static const struct apple_isp_hw apple_isp_hw_t8103 = { .scl1 = false, .lpdp = false, - .temporal_filter = 0, .meta_size = ISP_META_SIZE_T8103, }; @@ -420,7 +424,6 @@ static const struct apple_isp_hw apple_isp_hw_t6000 = { .scl1 = false, .lpdp = false, - .temporal_filter = 0, .meta_size = ISP_META_SIZE_T8103, }; @@ -443,7 +446,6 @@ static const struct apple_isp_hw apple_isp_hw_t8112 = { .scl1 = false, .lpdp = false, - .temporal_filter = 1, .meta_size = ISP_META_SIZE_T8112, }; @@ -466,7 +468,6 @@ static const struct apple_isp_hw apple_isp_hw_t6020 = { .scl1 = true, .lpdp = true, - .temporal_filter = 0, .meta_size = ISP_META_SIZE_T8112, }; diff --git a/drivers/media/platform/apple/isp/isp-drv.h b/drivers/media/platform/apple/isp/isp-drv.h index 27d35292462936..847e0a90975fb5 100644 --- a/drivers/media/platform/apple/isp/isp-drv.h +++ b/drivers/media/platform/apple/isp/isp-drv.h @@ -114,7 +114,6 @@ struct apple_isp_hw { u32 meta_size; bool scl1; bool lpdp; - u32 temporal_filter; }; enum isp_sensor_id { @@ -182,6 +181,7 @@ struct apple_isp { struct device *dev; const struct apple_isp_hw *hw; u32 platform_id; + u32 temporal_filter; struct isp_preset *presets; int num_presets;