diff --git a/helpers/DATA/linux/enable_blobless_activation_radeon.patch b/helpers/DATA/linux/enable_blobless_activation_radeon.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba0f09299f0c5789cdc6b80fa8aa6defa0bd09d3 --- /dev/null +++ b/helpers/DATA/linux/enable_blobless_activation_radeon.patch @@ -0,0 +1,227 @@ +Based on https://libreplanet.org/wiki/Group:Hardware/research/gpu/radeon + +diff -ru source.orig/drivers/gpu/drm/radeon/btc_dpm.c source/drivers/gpu/drm/radeon/btc_dpm.c +--- source.orig/drivers/gpu/drm/radeon/btc_dpm.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/btc_dpm.c 2023-02-13 15:50:41.218608376 -0500 +@@ -2437,7 +2437,6 @@ + ret = rv770_upload_firmware(rdev); + if (ret) { + DRM_ERROR("rv770_upload_firmware failed\n"); +- return ret; + } + ret = cypress_get_table_locations(rdev); + if (ret) { +diff -ru source.orig/drivers/gpu/drm/radeon/ci_dpm.c source/drivers/gpu/drm/radeon/ci_dpm.c +--- source.orig/drivers/gpu/drm/radeon/ci_dpm.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/ci_dpm.c 2023-02-13 15:53:38.591724496 -0500 +@@ -5157,7 +5157,6 @@ + ret = ci_upload_firmware(rdev); + if (ret) { + DRM_ERROR("ci_upload_firmware failed\n"); +- return ret; + } + ret = ci_process_firmware_header(rdev); + if (ret) { +diff -ru source.orig/drivers/gpu/drm/radeon/cik.c source/drivers/gpu/drm/radeon/cik.c +--- source.orig/drivers/gpu/drm/radeon/cik.c 2023-02-13 15:21:35.174999782 -0500 ++++ source/drivers/gpu/drm/radeon/cik.c 2023-02-13 15:47:37.149601121 -0500 +@@ -8285,7 +8285,6 @@ + r = ci_mc_load_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load MC firmware!\n"); +- return r; + } + } + +@@ -8591,7 +8590,6 @@ + r = cik_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } else { +@@ -8601,7 +8599,6 @@ + r = cik_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } +@@ -8668,7 +8665,6 @@ + */ + if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) { + DRM_ERROR("radeon: MC ucode required for NI+.\n"); +- return -EINVAL; + } + + return 0; +diff -ru source.orig/drivers/gpu/drm/radeon/cypress_dpm.c source/drivers/gpu/drm/radeon/cypress_dpm.c +--- source.orig/drivers/gpu/drm/radeon/cypress_dpm.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/cypress_dpm.c 2023-02-13 15:50:25.130869935 -0500 +@@ -1862,7 +1862,6 @@ + ret = rv770_upload_firmware(rdev); + if (ret) { + DRM_ERROR("rv770_upload_firmware failed\n"); +- return ret; + } + + ret = cypress_get_table_locations(rdev); +diff -ru source.orig/drivers/gpu/drm/radeon/evergreen.c source/drivers/gpu/drm/radeon/evergreen.c +--- source.orig/drivers/gpu/drm/radeon/evergreen.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/evergreen.c 2023-02-13 15:47:50.457384749 -0500 +@@ -5018,7 +5018,6 @@ + r = ni_mc_load_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load MC firmware!\n"); +- return r; + } + } + +@@ -5235,7 +5234,6 @@ + r = ni_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } else { +@@ -5243,7 +5241,6 @@ + r = r600_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } +@@ -5289,7 +5286,6 @@ + if (ASIC_IS_DCE5(rdev)) { + if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) { + DRM_ERROR("radeon: MC ucode required for NI+.\n"); +- return -EINVAL; + } + } + +diff -ru source.orig/drivers/gpu/drm/radeon/ni.c source/drivers/gpu/drm/radeon/ni.c +--- source.orig/drivers/gpu/drm/radeon/ni.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/ni.c 2023-02-13 15:46:45.402442454 -0500 +@@ -2163,7 +2163,6 @@ + r = ni_mc_load_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load MC firmware!\n"); +- return r; + } + } + +@@ -2390,7 +2389,6 @@ + r = ni_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } else { +@@ -2398,7 +2396,6 @@ + r = ni_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + } +@@ -2453,7 +2450,6 @@ + */ + if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) { + DRM_ERROR("radeon: MC ucode required for NI+.\n"); +- return -EINVAL; + } + + return 0; +diff -ru source.orig/drivers/gpu/drm/radeon/r100.c source/drivers/gpu/drm/radeon/r100.c +--- source.orig/drivers/gpu/drm/radeon/r100.c 2023-02-13 15:21:35.174999782 -0500 ++++ source/drivers/gpu/drm/radeon/r100.c 2023-02-13 15:49:15.548001277 -0500 +@@ -1134,7 +1134,6 @@ + r = r100_cp_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + +diff -ru source.orig/drivers/gpu/drm/radeon/r600.c source/drivers/gpu/drm/radeon/r600.c +--- source.orig/drivers/gpu/drm/radeon/r600.c 2023-02-13 15:21:35.174999782 -0500 ++++ source/drivers/gpu/drm/radeon/r600.c 2023-02-13 15:46:07.291062125 -0500 +@@ -3299,7 +3299,6 @@ + r = r600_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + +diff -ru source.orig/drivers/gpu/drm/radeon/rv770.c source/drivers/gpu/drm/radeon/rv770.c +--- source.orig/drivers/gpu/drm/radeon/rv770.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/rv770.c 2023-02-13 15:26:54.385808292 -0500 +@@ -1966,7 +1966,6 @@ + r = r600_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + +diff -ru source.orig/drivers/gpu/drm/radeon/rv770_dpm.c source/drivers/gpu/drm/radeon/rv770_dpm.c +--- source.orig/drivers/gpu/drm/radeon/rv770_dpm.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/rv770_dpm.c 2023-02-13 15:50:13.591057564 -0500 +@@ -1948,12 +1948,10 @@ + ret = rv770_upload_firmware(rdev); + if (ret) { + DRM_ERROR("rv770_upload_firmware failed\n"); +- return ret; + } + ret = rv770_init_smc_table(rdev, boot_ps); + if (ret) { + DRM_ERROR("rv770_init_smc_table failed\n"); +- return ret; + } + + rv770_program_response_times(rdev); +diff -ru source.orig/drivers/gpu/drm/radeon/si.c source/drivers/gpu/drm/radeon/si.c +--- source.orig/drivers/gpu/drm/radeon/si.c 2023-02-13 15:21:35.178999717 -0500 ++++ source/drivers/gpu/drm/radeon/si.c 2023-02-13 15:47:00.042204445 -0500 +@@ -6619,7 +6619,6 @@ + r = si_mc_load_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load MC firmware!\n"); +- return r; + } + } + +@@ -6867,7 +6866,6 @@ + r = si_init_microcode(rdev); + if (r) { + DRM_ERROR("Failed to load firmware!\n"); +- return r; + } + } + +@@ -6926,7 +6924,6 @@ + */ + if (!rdev->mc_fw) { + DRM_ERROR("radeon: MC ucode required for NI+.\n"); +- return -EINVAL; + } + + return 0; +diff -ru source.orig/drivers/gpu/drm/radeon/si_dpm.c source/drivers/gpu/drm/radeon/si_dpm.c +--- source.orig/drivers/gpu/drm/radeon/si_dpm.c 2021-10-31 16:53:10.000000000 -0400 ++++ source/drivers/gpu/drm/radeon/si_dpm.c 2023-02-13 15:53:00.844338238 -0500 +@@ -6366,7 +6366,6 @@ + ret = si_upload_firmware(rdev); + if (ret) { + DRM_ERROR("si_upload_firmware failed\n"); +- return ret; + } + ret = si_process_firmware_header(rdev); + if (ret) { diff --git a/helpers/make-linux b/helpers/make-linux index 941a4cad52b7e83de89168cd42041c9ce6f32976..ef80f97a4b21083eca86ec791ef99f49374dd1f7 100644 --- a/helpers/make-linux +++ b/helpers/make-linux @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright (C) 2023 Luis Guzman <ark@switnet.org> -# Copyright (C) 2008-2022 Ruben Rodriguez <ruben@trisquel.info> +# Copyright (C) 2008-2023 Ruben Rodriguez <ruben@trisquel.info> # Copyright (C) 2019 David Trudgian <dave@trudgian.net> # # This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=14 +VERSION=15 . ./config for PATCH in $DATA/*.patch ; do @@ -58,10 +58,7 @@ for DIR in $PRESERVEDIRS; do cp $DIR $TMPDIR --parents -a done -# Enable blobless activation - https://libreplanet.org/wiki/Group:Hardware/research/gpu/radeon -rm $TMPDIR/drivers/gpu/drm/radeon/ni.c - -sh $DATA/deblob-5.15 +sh $DATA/deblob-5.15 --force echo "Reverting deblobbing for files patched by silent-accept-firmware" cp $TMPDIR/* . -av