From f286cd628f3602bee9a3902993c3ba03eca86c6e Mon Sep 17 00:00:00 2001
From: Gokul S <g-s@ti.com>
Date: Wed, 11 Jun 2025 11:03:32 +0530
Subject: [PATCH 2/2] commit to enable srv node

---
 applibs/srv_bowl_lut_gen_applib/concerto.mak           |  2 +-
 .../srv_bowl_lut_gen_applib/srv_bowl_lut_gen_applib.c  |  2 ++
 applibs/srv_calibration_applib/concerto.mak            |  2 +-
 .../srv_calibration_applib/srv_calibration_applib.c    |  2 ++
 applibs/test/concerto.mak                              |  2 +-
 apps/srv_demos/app_srv_calibration/concerto.mak        |  2 +-
 apps/srv_demos/app_srv_camera/concerto.mak             |  2 +-
 apps/srv_demos/app_srv_fileio/concerto.mak             |  2 +-
 kernels/srv/c66/concerto.mak                           | 10 +++++++---
 kernels/srv/c66/core_generate_gpulut.c                 |  2 +-
 kernels/srv/gpu/3dsrv/Tools/concerto.mak               |  2 +-
 kernels/srv/gpu/3dsrv/concerto.mak                     |  4 ++--
 kernels/srv/gpu/concerto.mak                           |  2 +-
 kernels/srv/host/concerto.mak                          |  2 +-
 modules/concerto.mak                                   |  2 +-
 platform/j722s/rtos/c7x_2/concerto_c7x_2_inc.mak       |  1 +
 platform/j722s/rtos/common/app_init.c                  |  2 +-
 17 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/applibs/srv_bowl_lut_gen_applib/concerto.mak b/applibs/srv_bowl_lut_gen_applib/concerto.mak
index 07b49e4..497bc3c 100644
--- a/applibs/srv_bowl_lut_gen_applib/concerto.mak
+++ b/applibs/srv_bowl_lut_gen_applib/concerto.mak
@@ -8,7 +8,7 @@ CSOURCES    := $(call all-c-files)
 IDIRS       += $(VISION_APPS_PATH)/kernels/srv/include
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/applibs/srv_bowl_lut_gen_applib/srv_bowl_lut_gen_applib.c b/applibs/srv_bowl_lut_gen_applib/srv_bowl_lut_gen_applib.c
index 7b059df..ad8ec5a 100644
--- a/applibs/srv_bowl_lut_gen_applib/srv_bowl_lut_gen_applib.c
+++ b/applibs/srv_bowl_lut_gen_applib/srv_bowl_lut_gen_applib.c
@@ -184,8 +184,10 @@ static void srv_bowl_lut_gen_createNodes(srv_bowl_lut_gen_handle handle)
     appCntxt = (srv_bowl_lut_gen_context *)handle;
 
     appCntxt->bowl_gen_node = tivxGenerate3DbowlNode(appCntxt->vxGraph, appCntxt->in_config, appCntxt->in_calmat, appCntxt->in_offset, appCntxt->lut3dxyz, appCntxt->calmat_scaled);
+    vxSetNodeTarget(appCntxt->bowl_gen_node, VX_TARGET_STRING, TIVX_TARGET_DSP2);
 
     appCntxt->gpu_lut_gen_node = tivxGenerateGpulutNode(appCntxt->vxGraph, appCntxt->in_config, appCntxt->in_ldclut, appCntxt->calmat_scaled, appCntxt->lut3dxyz, appCntxt->out_gpulut3d);
+    vxSetNodeTarget(appCntxt->gpu_lut_gen_node, VX_TARGET_STRING, TIVX_TARGET_DSP2);
 }
 
 static void srv_bowl_lut_gen_freeNodes(srv_bowl_lut_gen_handle handle)
diff --git a/applibs/srv_calibration_applib/concerto.mak b/applibs/srv_calibration_applib/concerto.mak
index 5ac297a..19a6d16 100644
--- a/applibs/srv_calibration_applib/concerto.mak
+++ b/applibs/srv_calibration_applib/concerto.mak
@@ -8,7 +8,7 @@ CSOURCES    := $(call all-c-files)
 IDIRS       += $(VISION_APPS_PATH)/kernels/srv/include
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/applibs/srv_calibration_applib/srv_calibration_applib.c b/applibs/srv_calibration_applib/srv_calibration_applib.c
index 7884ad5..f34725e 100644
--- a/applibs/srv_calibration_applib/srv_calibration_applib.c
+++ b/applibs/srv_calibration_applib/srv_calibration_applib.c
@@ -236,10 +236,12 @@ static void srv_calib_createNodes(srv_calib_handle handle)
     appCntxt->in_element = (vx_image)vxGetObjectArrayItem((vx_object_array)appCntxt->in_array, 0);
 
     appCntxt->point_detect_node = tivxPointDetectNode(appCntxt->vxGraph, appCntxt->point_detect_in_config_element, appCntxt->in_ldclut, appCntxt->in_element, appCntxt->out_configuration, appCntxt->buf_bwluma_frame_element);
+    vxSetNodeTarget(appCntxt->point_detect_node, VX_TARGET_STRING, TIVX_TARGET_DSP2);
 
     vxReplicateNode(appCntxt->vxGraph, appCntxt->point_detect_node, replicate, 5);
 
     appCntxt->pose_estimation_node = tivxPoseEstimationNode(appCntxt->vxGraph, appCntxt->pose_estimation_in_config, appCntxt->in_ldclut, appCntxt->in_corner_points, appCntxt->out_calmat);
+    vxSetNodeTarget(appCntxt->pose_estimation_node, VX_TARGET_STRING, TIVX_TARGET_DSP2);
 }
 
 static void srv_calib_freeNodes(srv_calib_handle handle)
diff --git a/applibs/test/concerto.mak b/applibs/test/concerto.mak
index cc6d2d2..d392eae 100644
--- a/applibs/test/concerto.mak
+++ b/applibs/test/concerto.mak
@@ -70,7 +70,7 @@ CFLAGS      += -DTARGET_X86_64
 endif
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/apps/srv_demos/app_srv_calibration/concerto.mak b/apps/srv_demos/app_srv_calibration/concerto.mak
index 16a9c0e..9d6ffc0 100755
--- a/apps/srv_demos/app_srv_calibration/concerto.mak
+++ b/apps/srv_demos/app_srv_calibration/concerto.mak
@@ -30,7 +30,7 @@ SYS_SHARED_LIBS += EGL
 SYS_SHARED_LIBS += GLESv2
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/apps/srv_demos/app_srv_camera/concerto.mak b/apps/srv_demos/app_srv_camera/concerto.mak
index 04c679c..6b7bdd3 100755
--- a/apps/srv_demos/app_srv_camera/concerto.mak
+++ b/apps/srv_demos/app_srv_camera/concerto.mak
@@ -29,7 +29,7 @@ SYS_SHARED_LIBS += EGL
 SYS_SHARED_LIBS += GLESv2
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/apps/srv_demos/app_srv_fileio/concerto.mak b/apps/srv_demos/app_srv_fileio/concerto.mak
index 55b1ab5..00e66f1 100755
--- a/apps/srv_demos/app_srv_fileio/concerto.mak
+++ b/apps/srv_demos/app_srv_fileio/concerto.mak
@@ -42,7 +42,7 @@ SYS_SHARED_LIBS += EGL
 SYS_SHARED_LIBS += GLESv2
 
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/kernels/srv/c66/concerto.mak b/kernels/srv/c66/concerto.mak
index 9ff3e64..a253905 100755
--- a/kernels/srv/c66/concerto.mak
+++ b/kernels/srv/c66/concerto.mak
@@ -25,9 +25,9 @@ include $(FINALE)
 
 endif
 
-ifeq ($(TARGET_PLATFORM), $(filter $(TARGET_PLATFORM), J721S2 J784S4 J742S2))
+ifeq ($(TARGET_PLATFORM), $(filter $(TARGET_PLATFORM), J721S2 J784S4 J742S2 J722S))
 
-ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), C7120))
+ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), C7524))
 
 include $(PRELUDE)
 TARGET      := vx_target_kernels_srv_c66
@@ -47,8 +47,12 @@ ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), C7120))
 DEFS += C6X_MIGRATION _TMS320C6600
 endif
 
+ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), C7524))
+DEFS += C6X_MIGRATION _TMS320C6600 __C7524__
+endif
+
 ifeq ($(SOC),j722s)
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/kernels/srv/c66/core_generate_gpulut.c b/kernels/srv/c66/core_generate_gpulut.c
index 030d013..8d7f758 100644
--- a/kernels/srv/c66/core_generate_gpulut.c
+++ b/kernels/srv/c66/core_generate_gpulut.c
@@ -71,7 +71,7 @@
 #ifdef HOST_EMULATION
 #include "C6xSimulator.h"
 #else
-#if defined (__C7100__) || defined (__C7120__)
+#if defined (__C7100__) || defined (__C7120__) || defined (__C7524__)
     #include <c7x.h>
     #if defined (C6X_MIGRATION)
         #include <c6x_migration.h>
diff --git a/kernels/srv/gpu/3dsrv/Tools/concerto.mak b/kernels/srv/gpu/3dsrv/Tools/concerto.mak
index 670e563..06b51e6 100755
--- a/kernels/srv/gpu/3dsrv/Tools/concerto.mak
+++ b/kernels/srv/gpu/3dsrv/Tools/concerto.mak
@@ -1,4 +1,4 @@
-ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM), J721E J721S2 J784S4 J742S2))
+ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM), J721E J721S2 J784S4 J742S2 J722S))
 ifeq ($(TARGET_OS),$(filter $(TARGET_OS), LINUX QNX))
 ifeq ($(TARGET_CPU),$(filter $(TARGET_CPU), A72 A53))
 
diff --git a/kernels/srv/gpu/3dsrv/concerto.mak b/kernels/srv/gpu/3dsrv/concerto.mak
index 2837158..a1f0bdd 100755
--- a/kernels/srv/gpu/3dsrv/concerto.mak
+++ b/kernels/srv/gpu/3dsrv/concerto.mak
@@ -25,7 +25,7 @@ CSOURCES    := $(call all-c-files)
 CPPSOURCES  := $(call all-cpp-files)
 
 ifeq ($(SOC),$(filter $(SOC), j722s am62a))
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
@@ -51,7 +51,7 @@ CSOURCES    := $(call all-c-files)
 CPPSOURCES  := $(call all-cpp-files)
 
 ifeq ($(SOC),$(filter $(SOC), j722s am62a))
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/kernels/srv/gpu/concerto.mak b/kernels/srv/gpu/concerto.mak
index ada12bc..09259d3 100644
--- a/kernels/srv/gpu/concerto.mak
+++ b/kernels/srv/gpu/concerto.mak
@@ -25,7 +25,7 @@ IDIRS       += $(QNX_TARGET)/usr/include
 endif
 
 ifeq ($(SOC),$(filter $(SOC), j722s am62a))
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/kernels/srv/host/concerto.mak b/kernels/srv/host/concerto.mak
index 8e12a32..577d6aa 100755
--- a/kernels/srv/host/concerto.mak
+++ b/kernels/srv/host/concerto.mak
@@ -34,7 +34,7 @@ IDIRS       += $(VXLIB_PATH)/packages
 IDIRS       += $(VISION_APPS_PATH)/kernels/srv/gpu/3dsrv
 
 ifeq ($(SOC),$(filter $(SOC), j722s am62a))
-SKIPBUILD=1
+SKIPBUILD=0
 endif
 
 include $(FINALE)
diff --git a/modules/concerto.mak b/modules/concerto.mak
index 8ccb033..0ac189a 100644
--- a/modules/concerto.mak
+++ b/modules/concerto.mak
@@ -24,7 +24,7 @@ ifeq ($(SOC), $(filter $(SOC), j721e j721s2 j784s4 j722s j742s2))
 STATIC_LIBS     += $(VISION_APPS_OPENGL_UTILS_LIBS)
 STATIC_LIBS     += $(VISION_APPS_SAMPLE_LIBS)
 STATIC_LIBS     += $(VISION_APPS_STEREO_LIBS)
-ifeq ($(SOC), $(filter $(SOC), j721e j721s2 j784s4 j742s2))
+ifeq ($(SOC), $(filter $(SOC), j721e j721s2 j784s4 j742s2 j722s))
 STATIC_LIBS     += $(VISION_APPS_SRV_LIBS)
 endif
 
diff --git a/platform/j722s/rtos/c7x_2/concerto_c7x_2_inc.mak b/platform/j722s/rtos/c7x_2/concerto_c7x_2_inc.mak
index 60f19ca..34d1c60 100755
--- a/platform/j722s/rtos/c7x_2/concerto_c7x_2_inc.mak
+++ b/platform/j722s/rtos/c7x_2/concerto_c7x_2_inc.mak
@@ -29,6 +29,7 @@ include $($(_MODULE)_SDIR)/../concerto_c7x_inc.mak
 # CPU instance specific libraries
 STATIC_LIBS += vx_target_kernels_img_proc_c66
 STATIC_LIBS += app_rtos_common_c7x_2
+STATIC_LIBS += vx_target_kernels_srv_c66
 
 ifeq ($(RTOS),FREERTOS)
 	STATIC_LIBS += app_rtos
diff --git a/platform/j722s/rtos/common/app_init.c b/platform/j722s/rtos/common/app_init.c
index cf4baa8..d77b29e 100755
--- a/platform/j722s/rtos/common/app_init.c
+++ b/platform/j722s/rtos/common/app_init.c
@@ -766,7 +766,7 @@ static void appRegisterOpenVXTargetKernels()
         #endif
 
         #ifdef CPU_c7x_2
-        /* tivxRegisterSrvTargetC66Kernels(); */
+        tivxRegisterSrvTargetC66Kernels();
         tivxRegisterHwaTargetArmKernels();
         /* tivxRegisterImgProcTargetC66Kernels(); */
         #endif
-- 
2.34.1

