Loading drivers/gpu/drm/msm/adreno/a5xx_snapshot.c +32 −0 Original line number Diff line number Diff line Loading @@ -733,6 +733,35 @@ static void a5xx_snapshot_indexed_registers(struct msm_gpu *gpu, } } static void a5xx_snapshot_preemption(struct msm_gpu *gpu, struct msm_snapshot *snapshot) { struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu); struct msm_snapshot_gpu_object header = { .type = SNAPSHOT_GPU_OBJECT_GLOBAL, .size = A5XX_PREEMPT_RECORD_SIZE >> 2, .pt_base = 0, }; int index; if (gpu->nr_rings <= 1) return; for (index = 0; index < gpu->nr_rings; index++) { header.gpuaddr = a5xx_gpu->preempt_iova[index]; if (!SNAPSHOT_HEADER(snapshot, header, SNAPSHOT_SECTION_GPU_OBJECT_V2, A5XX_PREEMPT_RECORD_SIZE >> 2)) return; SNAPSHOT_MEMCPY(snapshot, a5xx_gpu->preempt[index], A5XX_PREEMPT_RECORD_SIZE); } } int a5xx_snapshot(struct msm_gpu *gpu, struct msm_snapshot *snapshot) { struct crashdump crashdump = { 0 }; Loading Loading @@ -787,6 +816,9 @@ int a5xx_snapshot(struct msm_gpu *gpu, struct msm_snapshot *snapshot) /* CP MERCIU */ a5xx_snapshot_cp_merciu(gpu, snapshot); /* Preemption records*/ a5xx_snapshot_preemption(gpu, snapshot); crashdump_destroy(gpu, &crashdump); snapshot->priv = NULL; Loading drivers/gpu/drm/msm/msm_snapshot_api.h +13 −0 Original line number Diff line number Diff line Loading @@ -118,4 +118,17 @@ struct msm_snapshot_shader { __u32 size; } __packed; #define SNAPSHOT_GPU_OBJECT_SHADER 1 #define SNAPSHOT_GPU_OBJECT_IB 2 #define SNAPSHOT_GPU_OBJECT_GENERIC 3 #define SNAPSHOT_GPU_OBJECT_DRAW 4 #define SNAPSHOT_GPU_OBJECT_GLOBAL 5 struct msm_snapshot_gpu_object { struct msm_snapshot_section_header header; __u32 type; __u64 gpuaddr; __u64 pt_base; __u64 size; } __packed; #endif Loading
drivers/gpu/drm/msm/adreno/a5xx_snapshot.c +32 −0 Original line number Diff line number Diff line Loading @@ -733,6 +733,35 @@ static void a5xx_snapshot_indexed_registers(struct msm_gpu *gpu, } } static void a5xx_snapshot_preemption(struct msm_gpu *gpu, struct msm_snapshot *snapshot) { struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu); struct msm_snapshot_gpu_object header = { .type = SNAPSHOT_GPU_OBJECT_GLOBAL, .size = A5XX_PREEMPT_RECORD_SIZE >> 2, .pt_base = 0, }; int index; if (gpu->nr_rings <= 1) return; for (index = 0; index < gpu->nr_rings; index++) { header.gpuaddr = a5xx_gpu->preempt_iova[index]; if (!SNAPSHOT_HEADER(snapshot, header, SNAPSHOT_SECTION_GPU_OBJECT_V2, A5XX_PREEMPT_RECORD_SIZE >> 2)) return; SNAPSHOT_MEMCPY(snapshot, a5xx_gpu->preempt[index], A5XX_PREEMPT_RECORD_SIZE); } } int a5xx_snapshot(struct msm_gpu *gpu, struct msm_snapshot *snapshot) { struct crashdump crashdump = { 0 }; Loading Loading @@ -787,6 +816,9 @@ int a5xx_snapshot(struct msm_gpu *gpu, struct msm_snapshot *snapshot) /* CP MERCIU */ a5xx_snapshot_cp_merciu(gpu, snapshot); /* Preemption records*/ a5xx_snapshot_preemption(gpu, snapshot); crashdump_destroy(gpu, &crashdump); snapshot->priv = NULL; Loading
drivers/gpu/drm/msm/msm_snapshot_api.h +13 −0 Original line number Diff line number Diff line Loading @@ -118,4 +118,17 @@ struct msm_snapshot_shader { __u32 size; } __packed; #define SNAPSHOT_GPU_OBJECT_SHADER 1 #define SNAPSHOT_GPU_OBJECT_IB 2 #define SNAPSHOT_GPU_OBJECT_GENERIC 3 #define SNAPSHOT_GPU_OBJECT_DRAW 4 #define SNAPSHOT_GPU_OBJECT_GLOBAL 5 struct msm_snapshot_gpu_object { struct msm_snapshot_section_header header; __u32 type; __u64 gpuaddr; __u64 pt_base; __u64 size; } __packed; #endif