On Thu Jul 23 14:19:03 2026 +0300, Laurent Pinchart wrote:
> The MC API was introduced in the CAL driver more than five years ago in
> commit 38e89e790fe2 ("media: ti-vpe: cal: Implement media controller
> centric API") as a disabled by default option. Five years later, it's
> time to give users another nudge to move to the MC API. Deprecate non-MC
> API usage by printing a warning at probe time, and defaulting to the MC
> API. The legacy API can still be selected through the mc_api module
> parameter.
> 
> Signed-off-by: Laurent Pinchart <[email protected]>
> Reviewed-by: Tomi Valkeinen <[email protected]>
> Reviewed-by: Yemike Abhilash Chandra <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/platform/ti/Kconfig   | 11 -----------
 drivers/media/platform/ti/cal/cal.c | 10 +++-------
 2 files changed, 3 insertions(+), 18 deletions(-)

---

diff --git a/drivers/media/platform/ti/Kconfig 
b/drivers/media/platform/ti/Kconfig
index 1a020b2bbb4f..03df5617e99d 100644
--- a/drivers/media/platform/ti/Kconfig
+++ b/drivers/media/platform/ti/Kconfig
@@ -30,17 +30,6 @@ config VIDEO_TI_CAL
          In TI Technical Reference Manual this module is referred as
          Camera Interface Subsystem (CAMSS).
 
-config VIDEO_TI_CAL_MC
-       bool "Media Controller centric mode by default"
-       depends on VIDEO_TI_CAL
-       default n
-       help
-         Enables Media Controller centric mode by default.
-
-         If set, CAL driver will start in Media Controller mode by
-         default. Note that this behavior can be overridden via
-         module parameter 'mc_api'.
-
 config VIDEO_TI_VIP
         tristate "TI Video Input Port"
         depends on VIDEO_DEV
diff --git a/drivers/media/platform/ti/cal/cal.c 
b/drivers/media/platform/ti/cal/cal.c
index b7e77b6b8950..5c82378d1eee 100644
--- a/drivers/media/platform/ti/cal/cal.c
+++ b/drivers/media/platform/ti/cal/cal.c
@@ -43,13 +43,7 @@ unsigned int cal_debug;
 module_param_named(debug, cal_debug, uint, 0644);
 MODULE_PARM_DESC(debug, "activates debug info");
 
-#ifdef CONFIG_VIDEO_TI_CAL_MC
-#define CAL_MC_API_DEFAULT 1
-#else
-#define CAL_MC_API_DEFAULT 0
-#endif
-
-bool cal_mc_api = CAL_MC_API_DEFAULT;
+bool cal_mc_api = 1;
 module_param_named(mc_api, cal_mc_api, bool, 0444);
 MODULE_PARM_DESC(mc_api, "activates the MC API");
 
@@ -1228,6 +1222,8 @@ static int cal_probe(struct platform_device *pdev)
 
        /* Create contexts. */
        if (!cal_mc_api) {
+               dev_warn(cal->dev, "The legacy non-MC API is deprecated\n");
+
                for (i = 0; i < cal->data->num_csi2_phy; ++i) {
                        struct cal_ctx *ctx;
 
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to