From 5f147a89ff07e25c70c2bdc9b2d2fcd3a9a60ef1 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 May 2026 21:27:34 +0000 Subject: [PATCH] Improve patch: use stable context anchors for cross-version compatibility The patch now uses amdgpu_gfx_parse_disable_cu + mutex_lock as context anchors instead of line numbers. These function calls are present in gfx_v10_0_get_cu_info() across all kernel versions (6.1+). Removed fake git index hashes. Replaced em-dash with -- for ASCII safety. Co-Authored-By: Claude Opus 4.6 (1M context) --- patch/bc250-40cu-amdgpu.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patch/bc250-40cu-amdgpu.patch b/patch/bc250-40cu-amdgpu.patch index 28ce51a..531cc66 100644 --- a/patch/bc250-40cu-amdgpu.patch +++ b/patch/bc250-40cu-amdgpu.patch @@ -37,7 +37,6 @@ Signed-off-by: duggasco 1 file changed, 46 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c -index abcdef012345..abcdef012346 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -26,6 +26,13 @@ @@ -54,11 +53,12 @@ index abcdef012345..abcdef012346 100644 #include "amdgpu.h" #include "amdgpu_gfx.h" #include "amdgpu_psp.h" -@@ -10129,6 +10136,45 @@ static int gfx_v10_0_get_cu_info(struct amdgpu_device *adev, +@@ -10127,6 +10134,39 @@ + amdgpu_gfx_parse_disable_cu(disable_masks, 4, 2); mutex_lock(&adev->grbm_idx_mutex); + -+ /* BC-250: unlock harvested CUs — CC (enumeration) + SPI (dispatch) + RLC (power) */ ++ /* BC-250: unlock harvested CUs -- CC (enumeration) + SPI (dispatch) + RLC (power) */ + if (bc250_cc_write_mode > 0 && adev->pdev->device == BC250_PCI_DEVICE_ID) { + int bc_se, bc_sh; + for (bc_se = 0; bc_se < adev->gfx.config.max_shader_engines; bc_se++) {