ZHDA076A March   2026  – March 2026 AM68A , AM69 , AM69A , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1

 

  1.   1
  2.   摘要
  3.   商标
  4. 1TDA4VH 内的数据移动
    1. 1.1 通用总线架构子系统 (CBASS)
    2. 1.2 导航器子系统 (NAVSS)
      1. 1.2.1 NAVSS 北桥 (NB)
    3. 1.3 多核共享内存控制器 (MSMC)
  5. 2服务质量 (QoS)
    1. 2.1 NAVSS0
      1. 2.1.1 NAVSS0 北桥
        1. 2.1.1.1 正常流量与实时流量的区别
    2. 2.2 多核共享内存控制器 (MSMC)
    3. 2.3 DDR 子系统 (DDRSS)
      1. 2.3.1 MSMC2DDR 桥接器
      2. 2.3.2 服务等级 (CoS)
    4. 2.4 QoS 摘要
  6. 3案例研究:显示同步丢失问题
    1. 3.1 问题说明
    2. 3.2 设置和重新创建
      1. 3.2.1 要求
        1. 3.2.1.1 RTOS 补丁
          1. 3.2.1.1.1 0001-vision_apps-Remove-the-DSS-application-from-MCU2_0.patch
          2. 3.2.1.1.2 0002-vision_apps-Remove-display-use-from-the-AVP-demo.patch
        2. 3.2.1.2 Linux 补丁
          1. 3.2.1.2.1 0001-arm64-dts-ti-k3-j784s4-vision-apps-Re-enable-DSS-for.patch
      2. 3.2.2 主机设置
      3. 3.2.3 目标设置
      4. 3.2.4 重新创建
    3. 3.3 调试 QoS
      1. 3.3.1 CPTracer
        1. 3.3.1.1  设置
        2. 3.3.1.2  分析吞吐量
        3. 3.3.1.3  分析延迟
        4. 3.3.1.4  分析事务
        5. 3.3.1.5  分析相关路由
        6. 3.3.1.6  分析 DSS 吞吐量
          1. 3.3.1.6.1 理论 DSS 吞吐量
          2. 3.3.1.6.2 正常 DSS 吞吐量
          3. 3.3.1.6.3 AVP 演示运行时的 DSS 吞吐量
        7. 3.3.1.7  分析 DSS 延迟
        8. 3.3.1.8  分析 C7x 吞吐量
        9. 3.3.1.9  分析 C7x 吞吐量与 DSS 延迟
        10. 3.3.1.10 分析 C7x_4 内核事务
      2. 3.3.2 编辑 QoS 设置
        1. 3.3.2.1 编辑顺序 ID
          1. 3.3.2.1.1 DSS 顺序 ID
          2. 3.3.2.1.2 C7x 顺序 ID
        2. 3.3.2.2 NRT 和 RT 路由
          1. 3.3.2.2.1 U-Boot 中的 NRT 和 RT 路由
        3. 3.3.2.3 编辑优先级
          1. 3.3.2.3.1 DSS 优先级
          2. 3.3.2.3.2 C7x 优先级
      3. 3.3.3 编辑 CoS 映射
        1. 3.3.3.1 CoS 映射寄存器
        2. 3.3.3.2 检查 CoS 映射
    4. 3.4 修复 DSS 同步丢失问题
      1. 3.4.1 重新映射 C7x_4 内核事务
        1. 3.4.1.1 ti-u-boot-2023.04
        2. 3.4.1.2 ti-u-boot-2025.01
      2. 3.4.2 遵守所有优先级
        1. 3.4.2.1 ti-u-boot-2023.04
        2. 3.4.2.2 ti-u-boot-2025.01
  7. 4总结
  8. 5参考资料
  9. 6修订历史记录
0002-vision_apps-Remove-display-use-from-the-AVP-demo.patch
From c8059ede6e8a5cb38933f01b6c275a84539cd267 Mon Sep 17 00:00:00 2001
From: Jared McArthur <j-mcarthur@ti.com>
Date: Tue, 28 Jan 2025 11:29:07 -0600
Subject: [PATCH 2/2] vision_apps: Remove display use from the AVP demo

Remove display calls from the auto valey parking (AVP) demo. The demo
traditionally outputs to a display; remove this functionality so Linux
can own the display driver.

Disabling the display within the AVP demo allows for testing Linux's
display driver while the C7x cores are loaded.

Signed-off-by: Jared McArthur <j-mcarthur@ti.com>
---
 .../app_tidl_avp/avp_img_mosaic_module.c      |  73 ++++++++++-
 apps/dl_demos/app_tidl_avp/concerto.mak       |   2 +-
 apps/dl_demos/app_tidl_avp/main.c             | 119 ++++--------------
 3 files changed, 97 insertions(+), 97 deletions(-)

diff --git a/apps/dl_demos/app_tidl_avp/avp_img_mosaic_module.c b/apps/dl_demos/app_tidl_avp/avp_img_mosaic_module.c
index 21ace33..d43f7ad 100644
--- a/apps/dl_demos/app_tidl_avp/avp_img_mosaic_module.c
+++ b/apps/dl_demos/app_tidl_avp/avp_img_mosaic_module.c
@@ -61,7 +61,14 @@
  */
 
 #include "avp_img_mosaic_module.h"
-
+#include <fcntl.h>
+#include <linux/fb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <unistd.h>
 
 vx_status app_init_img_mosaic(vx_context context, ImgMosaicObj *imgMosaicObj, vx_int32 bufq_depth)
 {
@@ -143,7 +150,68 @@ void app_create_graph_img_mosaic(vx_graph graph, ImgMosaicObj *imgMosaicObj, vx_
 
     return;
 }
+/*
+#include <fcntl.h>
+#include <linux/fb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+int main(int argc, char *argv[]) {
+int fb_fd = open("/dev/fb0", O_RDWR);
+if (fb_fd == -1) {
+perror("Error: cannot open framebuffer device");
+return 1;
+}
+
+struct fb_var_screeninfo vinfo;
+struct fb_fix_screeninfo finfo;
+
+// Get fixed screen information
+if (ioctl(fb_fd, FBIOGET_FSCREENINFO, &finfo)) {
+perror("Error reading fixed information");
+return 2;
+}
+
+// Get variable screen information
+if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &vinfo)) {
+perror("Error reading variable information");
+return 3;
+}
 
+int screensize = vinfo.yres_virtual * finfo.line_length;
+
+// Map framebuffer to user memory
+char *fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fb_fd, 0);
+if ((intptr_t)fbp == -1) {
+perror("Error: failed to map framebuffer device to memory");
+return 4;
+}
+
+// Open the image file (raw RGB data)
+FILE *img = fopen("image.rgb", "rb");
+if (!img) {
+perror("Error: cannot open image file");
+munmap(fbp, screensize);
+close(fb_fd);
+return 5;
+}
+
+// Read image data into framebuffer memory
+fread(fbp, 1, screensize, img);
+
+// Cleanup
+fclose(img);
+munmap(fbp, screensize);
+close(fb_fd);
+
+return 0;
+
+} 
+*/
 vx_status writeMosaicOutput(char* file_name, vx_image out_img)
 {
     vx_status status;
@@ -194,6 +262,8 @@ vx_status writeMosaicOutput(char* file_name, vx_image out_img)
                 data_ptr += image_addr.stride_y;
             }
 
+
+
             if(num_bytes != (img_width*img_height))
             {
                 printf("Luma bytes written = %d, expected = %d\n", num_bytes, img_width*img_height);
@@ -224,6 +294,7 @@ vx_status writeMosaicOutput(char* file_name, vx_image out_img)
                 printf("CbCr bytes written = %d, expected = %d\n", num_bytes, img_width*img_height/2);
             }
 
+
             vxUnmapImagePatch(out_img, map_id);
 
         }
diff --git a/apps/dl_demos/app_tidl_avp/concerto.mak b/apps/dl_demos/app_tidl_avp/concerto.mak
index fab60bc..b4b4677 100644
--- a/apps/dl_demos/app_tidl_avp/concerto.mak
+++ b/apps/dl_demos/app_tidl_avp/concerto.mak
@@ -3,7 +3,7 @@ ifeq ($(TARGET_CPU),$(filter $(TARGET_CPU), x86_64 A72 A53))
 include $(PRELUDE)
 
 TARGET      := vx_app_tidl_avp
-CSOURCES    := main.c avp_scaler_module.c avp_pre_proc_module.c avp_tidl_module.c avp_post_proc_module.c fisheye_angle_table.c avp_img_mosaic_module.c avp_draw_detections_module.c avp_display_module.c
+CSOURCES    := main.c avp_scaler_module.c avp_pre_proc_module.c avp_tidl_module.c avp_post_proc_module.c fisheye_angle_table.c avp_img_mosaic_module.c avp_draw_detections_module.c 
 
 ifeq ($(HOST_COMPILER),GCC_LINUX)
 CFLAGS += -Wno-unused-function
diff --git a/apps/dl_demos/app_tidl_avp/main.c b/apps/dl_demos/app_tidl_avp/main.c
index 9d23faf..5b0a673 100644
--- a/apps/dl_demos/app_tidl_avp/main.c
+++ b/apps/dl_demos/app_tidl_avp/main.c
@@ -78,7 +78,6 @@
 #include "avp_post_proc_module.h"
 #include "avp_draw_detections_module.h"
 #include "avp_img_mosaic_module.h"
-#include "avp_display_module.h"
 #include "avp_test.h"
 
 #ifndef x86_64
@@ -108,8 +107,6 @@ typedef struct {
 
     ImgMosaicObj imgMosaicObj;
 
-    DisplayObj displayObj;
-
     vx_char input_file_path[APP_MAX_FILE_PATH];
     vx_char output_file_path[APP_MAX_FILE_PATH];
     vx_char input_file_list[APP_MAX_FILE_PATH];
@@ -188,9 +185,7 @@ static void app_update_param_set(AppObj *obj);
 static void add_graph_parameter_by_node_index(vx_graph graph, vx_node node, vx_uint32 node_parameter_index);
 static void app_pipeline_params_defaults(AppObj *obj);
 static void app_find_object_array_index(vx_object_array object_array[], vx_reference ref, vx_int32 array_size, vx_int32 *array_idx);
-#ifndef x86_64
-static void app_draw_graphics(Draw2D_Handle *handle, Draw2D_BufInfo *draw2dBufInfo, uint32_t update_type);
-#endif
+
 #ifdef AVP_ENABLE_PIPELINE_FLOW
 static vx_status app_run_graph_for_one_frame_pipeline(AppObj *obj, vx_int32 frame_id);
 #else
@@ -228,7 +223,7 @@ static void app_run_task(void *app_var)
     AppObj *obj = (AppObj *)app_var;
     vx_status status = VX_SUCCESS;
 
-    while(!obj->stop_task && (status == VX_SUCCESS))
+    while((status == VX_SUCCESS))
     {
         status = app_run_graph(obj);
     }
@@ -626,15 +621,6 @@ static void app_parse_cfg_file(AppObj *obj, vx_char *cfg_file_name)
                 }
             }
             else
-            if(strcmp(token, "display_option")==0)
-            {
-                token = strtok(NULL, s);
-                if(token != NULL)
-                {
-                    obj->displayObj.display_option = atoi(token);
-                }
-            }
-            else
             if(strcmp(token, "delay_in_msecs")==0)
             {
                 token = strtok(NULL, s);
@@ -718,7 +704,6 @@ static void app_parse_cfg_file(AppObj *obj, vx_char *cfg_file_name)
 
     if (obj->test_mode == 1)
     {
-        obj->displayObj.display_option = 1;
         obj->is_interactive = 0;
         obj->num_iterations = 1;
         /* if testing, just run the number of frames that are found in the expected
@@ -770,7 +755,6 @@ static void app_parse_cmd_line_args(AppObj *obj, vx_int32 argc, vx_char *argv[])
     if (set_test_mode == vx_true_e)
     {
         obj->test_mode = 1;
-        obj->displayObj.display_option = 1;
         obj->is_interactive = 0;
         obj->num_iterations = 1;
         /* if testing, just run the number of frames that are found in the expected
@@ -780,7 +764,6 @@ static void app_parse_cmd_line_args(AppObj *obj, vx_int32 argc, vx_char *argv[])
     }
 
     #ifdef x86_64
-    obj->displayObj.display_option = 0;
     obj->is_interactive = 0;
     #endif
 
@@ -876,7 +859,6 @@ static void add_graph_parameter_by_node_index(vx_graph graph, vx_node node, vx_u
 static vx_status app_init(AppObj *obj)
 {
     vx_status status = VX_SUCCESS;
-    app_grpx_init_prms_t grpx_prms;
 
     /* Create OpenVx Context */
     obj->context = vxCreateContext();
@@ -994,21 +976,10 @@ static vx_status app_init(AppObj *obj)
     {
         status = app_init_img_mosaic(obj->context, &obj->imgMosaicObj, AVP_BUFFER_Q_DEPTH);
     }
-    if(status == VX_SUCCESS)
-    {
-        status = app_init_display(obj->context, &obj->displayObj, "display_obj");
-    }
+
     appPerfPointSetName(&obj->total_perf , "TOTAL");
     appPerfPointSetName(&obj->fileio_perf, "FILEIO");
 
-    #ifndef x86_64
-    if(obj->displayObj.display_option == 1)
-    {
-        appGrpxInitParamsInit(&grpx_prms, obj->context);
-        grpx_prms.draw_callback = app_draw_graphics;
-        appGrpxInit(&grpx_prms);
-    }
-    #endif
 
     return status;
 }
@@ -1041,14 +1012,6 @@ static void app_deinit(AppObj *obj)
 
     app_deinit_img_mosaic(&obj->imgMosaicObj, AVP_BUFFER_Q_DEPTH);
 
-    app_deinit_display(&obj->displayObj);
-
-    #ifndef x86_64
-    if(obj->displayObj.display_option == 1)
-    {
-        appGrpxDeInit();
-    }
-    #endif
 
     tivxTIDLUnLoadKernels(obj->context);
     tivxImgProcUnLoadKernels(obj->context);
@@ -1086,7 +1049,6 @@ static void app_delete_graph(AppObj *obj)
 
     app_delete_img_mosaic(&obj->imgMosaicObj);
 
-    app_delete_display(&obj->displayObj);
 
     vxReleaseGraph(&obj->graph);
 }
@@ -1180,10 +1142,6 @@ static vx_status app_create_graph(AppObj *obj)
 
     app_create_graph_img_mosaic(obj->graph, &obj->imgMosaicObj, NULL);
 
-    if(status == VX_SUCCESS)
-    {
-        status = app_create_graph_display(obj->graph, &obj->displayObj, obj->imgMosaicObj.output_image[0]);
-    }
 
 #ifdef AVP_ENABLE_PIPELINE_FLOW
     /* Scalar Node - input is in Index 0 */
@@ -1547,8 +1505,11 @@ static vx_status app_run_graph_for_one_frame_pipeline(AppObj *obj, vx_int32 fram
                 APP_PRINTF("App Writing Outputs Start...\n");
 
                 snprintf(output_file_name, APP_MAX_FILE_PATH, "%s/mosaic_output_%010d_1920x1080.yuv", obj->output_file_path, (frame_id - AVP_BUFFER_Q_DEPTH));
+                // printf("output_file_name=%s\n",output_file_name);
                 status = writeMosaicOutput(output_file_name, mosaic_output_image);
-
+                /*Kangjia get perception algorithm result*/
+                // printf("--------------------------------------\n");
+                
                 APP_PRINTF("App Writing Outputs Done!\n");
             }
             /* Enqueue output */
@@ -1629,10 +1590,10 @@ static vx_status app_run_graph(AppObj *obj)
             APP_PRINTF("app_avp: Frame ID %d of %d ... Done.\n", frame_id, obj->start_frame + obj->num_frames);
 
             /* user asked to stop processing */
-            if((obj->stop_task) || (status == VX_FAILURE))
-            {
-                break;
-            }
+            //if((obj->stop_task) || (status == VX_FAILURE))
+            //{
+            //    break;
+            //}
         }
         printf("app_avp: Iteration %d of %d ... Done.\n", x, obj->num_iterations);
         appPerfPointPrintFPS(&obj->total_perf);
@@ -1644,17 +1605,17 @@ static vx_status app_run_graph(AppObj *obj)
         }
 
         /* user asked to stop processing */
-        if((obj->stop_task) || (status == VX_FAILURE))
-        {
-          break;
-        }
+        //if((obj->stop_task) || (status == VX_FAILURE))
+        //{
+        //  break;
+        //}
     }
 
 #ifdef AVP_ENABLE_PIPELINE_FLOW
     vxWaitGraph(obj->graph);
 #endif
 
-    obj->stop_task = 1;
+    //obj->stop_task = 1;
 
     return status;
 }
@@ -1838,8 +1799,8 @@ static void set_img_mosaic_defaults(AppObj *obj, ImgMosaicObj *imgMosaicObj)
 {
     vx_int32 idx = 0;
     vx_int32 in = 0;
-    imgMosaicObj->out_width    = 1920;
-    imgMosaicObj->out_height   = 1080;
+    imgMosaicObj->out_width    = 800;
+    imgMosaicObj->out_height   = 600;
     imgMosaicObj->num_inputs   = obj->enable_psd + obj->enable_vd + obj->enable_sem_seg;
 
     tivxImgMosaicParamsSetDefaults(&imgMosaicObj->params);
@@ -1848,8 +1809,8 @@ static void set_img_mosaic_defaults(AppObj *obj, ImgMosaicObj *imgMosaicObj)
     /* Right camera - PSD output */
     if(obj->enable_psd == 1)
     {
-        imgMosaicObj->params.windows[idx].startX  = 840;
-        imgMosaicObj->params.windows[idx].startY  = 200;
+        imgMosaicObj->params.windows[idx].startX  = 100;
+        imgMosaicObj->params.windows[idx].startY  = 50;
         imgMosaicObj->params.windows[idx].width   = 512;
         imgMosaicObj->params.windows[idx].height  = 512;
         imgMosaicObj->params.windows[idx].input_select   = in++;
@@ -1860,8 +1821,8 @@ static void set_img_mosaic_defaults(AppObj *obj, ImgMosaicObj *imgMosaicObj)
     /* Right camera - PSD output */
     if(obj->enable_vd == 1)
     {
-        imgMosaicObj->params.windows[idx].startX  = 1380;
-        imgMosaicObj->params.windows[idx].startY  = 200;
+        imgMosaicObj->params.windows[idx].startX  = 100;
+        imgMosaicObj->params.windows[idx].startY  = 50;
         imgMosaicObj->params.windows[idx].width   = 512;
         imgMosaicObj->params.windows[idx].height  = 512;
         imgMosaicObj->params.windows[idx].input_select   = in++;
@@ -1872,8 +1833,8 @@ static void set_img_mosaic_defaults(AppObj *obj, ImgMosaicObj *imgMosaicObj)
     /* Front camera - semantic segmentation output */
     if(obj->enable_sem_seg == 1)
     {
-        imgMosaicObj->params.windows[idx].startX  = 40;
-        imgMosaicObj->params.windows[idx].startY  = 250;
+        imgMosaicObj->params.windows[idx].startX  =20;
+        imgMosaicObj->params.windows[idx].startY  = 100;
         imgMosaicObj->params.windows[idx].width   = 768;
         imgMosaicObj->params.windows[idx].height  = 384;
         imgMosaicObj->params.windows[idx].input_select   = in++;
@@ -1887,10 +1848,6 @@ static void set_img_mosaic_defaults(AppObj *obj, ImgMosaicObj *imgMosaicObj)
     imgMosaicObj->params.clear_count  = 4;
 }
 
-static void set_display_defaults(DisplayObj *displayObj)
-{
-    displayObj->display_option = 0;
-}
 
 static void app_pipeline_params_defaults(AppObj *obj)
 {
@@ -1918,7 +1875,6 @@ static void app_default_param_set(AppObj *obj)
     obj->vdDrawDetectionsObj.params.num_classes = 1;
     obj->vdDrawDetectionsObj.params.class_id[0] = 1;
 
-    set_display_defaults(&obj->displayObj);
 
     app_pipeline_params_defaults(obj);
 
@@ -1972,31 +1928,4 @@ static void app_find_object_array_index(vx_object_array object_array[], vx_refer
         vxReleaseImage(&img_ref);
     }
 }
-#ifndef x86_64
-static void app_draw_graphics(Draw2D_Handle *handle, Draw2D_BufInfo *draw2dBufInfo, uint32_t update_type)
-{
-    appGrpxDrawDefault(handle, draw2dBufInfo, update_type);
-
-    if(update_type == 0)
-    {
-        Draw2D_FontPrm sHeading;
-        Draw2D_FontPrm sAlgo1;
-        Draw2D_FontPrm sAlgo2;
-        Draw2D_FontPrm sAlgo3;
-
-        sHeading.fontIdx = 0;
-        Draw2D_drawString(handle, 560, 5, "Analytics for Auto Valet Parking", &sHeading);
-
-        sAlgo1.fontIdx = 2;
-        Draw2D_drawString(handle, 270, 640, "Semantic Segmentation", &sAlgo1);
 
-        sAlgo2.fontIdx = 2;
-        Draw2D_drawString(handle, 920, 720, "Parking Spot Detection", &sAlgo2);
-
-        sAlgo3.fontIdx = 2;
-        Draw2D_drawString(handle, 1490, 720, "Vehicle Detection", &sAlgo3);
-    }
-
-  return;
-}
-#endif
-- 
2.34.1