diff --git a/adreno-gpulist.h b/adreno-gpulist.h index d6a9884c6e..8465548a92 100644 --- a/adreno-gpulist.h +++ b/adreno-gpulist.h @@ -2633,7 +2633,7 @@ static const struct adreno_gen7_core adreno_gpu_core_gen7_17_0 = { .uche_gmem_alignment = SZ_16M, .gmem_size = SZ_1M, .bus_width = 32, - .snapshot_size = SZ_4M, + .snapshot_size = SZ_2M, }, .sqefw_name = "gen70e00_sqe.fw", .gmufw_name = "gen71700_gmu.bin", diff --git a/adreno.c b/adreno.c index 9bd4eff391..dad1b12704 100644 --- a/adreno.c +++ b/adreno.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include diff --git a/adreno.h b/adreno.h index bcba168e96..61bbb1de62 100644 --- a/adreno.h +++ b/adreno.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2008-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef __ADRENO_H #define __ADRENO_H diff --git a/adreno_gen8_snapshot.c b/adreno_gen8_snapshot.c index 521a6f542d..1c7ac63400 100644 --- a/adreno_gen8_snapshot.c +++ b/adreno_gen8_snapshot.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025, Qualcomm Innovation Center, Inc. All rights reserved. */ #include "adreno.h" @@ -247,7 +247,7 @@ size_t gen8_legacy_snapshot_registers(struct kgsl_device *device, header->location_id = UINT_MAX; header->sp_id = UINT_MAX; header->usptp_id = UINT_MAX; - header->slice_id = info->slice_id; + header->slice_id = info->regs->slice_region ? info->slice_id : UINT_MAX; if (info->regs->sel) kgsl_regwrite(device, info->regs->sel->host_reg, info->regs->sel->val); @@ -298,7 +298,7 @@ static size_t gen8_snapshot_registers(struct kgsl_device *device, u8 *buf, header->location_id = UINT_MAX; header->sp_id = UINT_MAX; header->usptp_id = UINT_MAX; - header->slice_id = info->slice_id; + header->slice_id = info->regs->slice_region ? info->slice_id : UINT_MAX; src = gen8_crashdump_registers->hostptr + info->offset; @@ -336,7 +336,7 @@ static size_t gen8_legacy_snapshot_shader(struct kgsl_device *device, } header->type = block->statetype; - header->slice_id = info->slice_id; + header->slice_id = block->slice_region ? info->slice_id : UINT_MAX; header->sp_index = info->sp_id; header->usptp = info->usptp; header->pipe_id = block->pipeid; @@ -376,7 +376,7 @@ static size_t gen8_snapshot_shader_memory(struct kgsl_device *device, } header->type = block->statetype; - header->slice_id = info->slice_id; + header->slice_id = block->slice_region ? info->slice_id : UINT_MAX; header->sp_index = info->sp_id; header->usptp = info->usptp; header->pipe_id = block->pipeid; @@ -820,7 +820,7 @@ static size_t gen8_legacy_snapshot_cluster_dbgahb(struct kgsl_device *device, header->location_id = info->location_id; header->sp_id = info->sp_id; header->usptp_id = info->usptp_id; - header->slice_id = info->slice_id; + header->slice_id = info->cluster->slice_region ? info->slice_id : UINT_MAX; read_sel = GEN8_SP_READ_SEL_VAL(info->slice_id, info->location_id, info->pipe_id, info->statetype_id, info->usptp_id, info->sp_id); @@ -872,7 +872,7 @@ static size_t gen8_snapshot_cluster_dbgahb(struct kgsl_device *device, u8 *buf, header->location_id = info->location_id; header->sp_id = info->sp_id; header->usptp_id = info->usptp_id; - header->slice_id = info->slice_id; + header->slice_id = info->cluster->slice_region ? info->slice_id : UINT_MAX; src = gen8_crashdump_registers->hostptr + info->offset; @@ -1009,7 +1009,7 @@ static size_t gen8_legacy_snapshot_mvc(struct kgsl_device *device, u8 *buf, header->location_id = UINT_MAX; header->sp_id = UINT_MAX; header->usptp_id = UINT_MAX; - header->slice_id = info->slice_id; + header->slice_id = info->cluster->slice_region ? info->slice_id : UINT_MAX; /* * Set the AHB control for the Host to read from the @@ -1064,7 +1064,7 @@ static size_t gen8_snapshot_mvc(struct kgsl_device *device, u8 *buf, header->location_id = UINT_MAX; header->sp_id = UINT_MAX; header->usptp_id = UINT_MAX; - header->slice_id = info->slice_id; + header->slice_id = info->cluster->slice_region ? info->slice_id : UINT_MAX; src = gen8_crashdump_registers->hostptr + info->offset; diff --git a/adreno_sysfs.c b/adreno_sysfs.c index 0c1024aae6..342c4c701b 100644 --- a/adreno_sysfs.c +++ b/adreno_sysfs.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include diff --git a/adreno_trace.h b/adreno_trace.h index 71e98c575f..890a8990a5 100644 --- a/adreno_trace.h +++ b/adreno_trace.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #if !defined(_ADRENO_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) diff --git a/governor_msm_adreno_tz.c b/governor_msm_adreno_tz.c index c9cd1db943..5cbb5e6be4 100644 --- a/governor_msm_adreno_tz.c +++ b/governor_msm_adreno_tz.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2010-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025, Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include diff --git a/kgsl.c b/kgsl.c index 7679e719d9..13d4c6887c 100644 --- a/kgsl.c +++ b/kgsl.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2008-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025, Qualcomm Innovation Center, Inc. All rights reserved. */ #include diff --git a/kgsl_sharedmem.c b/kgsl_sharedmem.c index e7f55670c4..24bb1f120f 100644 --- a/kgsl_sharedmem.c +++ b/kgsl_sharedmem.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -256,19 +256,19 @@ imported_mem_show(struct kgsl_process_private *priv, m = &entry->memdesc; if (kgsl_memdesc_usermem_type(m) == KGSL_MEM_ENTRY_ION) { + u64 size = m->size; + int total_egl_count; + kgsl_get_egl_counts(entry, &egl_surface_count, &egl_image_count); + total_egl_count = egl_surface_count + egl_image_count; - if ((kgsl_memdesc_get_memtype(m) == KGSL_MEMTYPE_EGL_SURFACE) || - (kgsl_memdesc_get_memtype(m) == KGSL_MEMTYPE_SURFACE)) - imported_mem += m->size; - else if (egl_surface_count == 0) { - uint64_t size = m->size; - - do_div(size, (egl_image_count ? - egl_image_count : 1)); - imported_mem += size; - } + /* + * Divide the total buffer size uniformly across all the + * processes that imported the buffer. + */ + do_div(size, (total_egl_count ? total_egl_count : 1)); + imported_mem += size; } kgsl_mem_entry_put(entry);