diff -pruN 2.4.127-1/debian/changelog 2.4.127-1ubuntu1/debian/changelog
--- 2.4.127-1/debian/changelog	2025-10-17 08:03:37.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/changelog	2025-10-23 14:33:16.000000000 +0000
@@ -1,3 +1,9 @@
+libdrm (2.4.127-1ubuntu1) resolute; urgency=medium
+
+  * patches: Identify APUs from hardware (LP: #2127944)
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 23 Oct 2025 17:33:16 +0300
+
 libdrm (2.4.127-1) unstable; urgency=medium
 
   [ Dylan Aïssi ]
diff -pruN 2.4.127-1/debian/patches/0001-amdgpu-Read-model-name-from-proc-cpuinfo-for-APUs.patch 2.4.127-1ubuntu1/debian/patches/0001-amdgpu-Read-model-name-from-proc-cpuinfo-for-APUs.patch
--- 2.4.127-1/debian/patches/0001-amdgpu-Read-model-name-from-proc-cpuinfo-for-APUs.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/patches/0001-amdgpu-Read-model-name-from-proc-cpuinfo-for-APUs.patch	2025-10-23 14:27:02.000000000 +0000
@@ -0,0 +1,81 @@
+From 978583576308fef455342da53fcce0e3ac36c27c Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Tue, 14 Oct 2025 11:54:41 -0500
+Subject: [PATCH 1/3] amdgpu: Read model name from /proc/cpuinfo for APUs
+
+The correct marketing name is encoded in the model name field
+that is read from the hardware on an APU.  Try to read from /proc/cpuinfo
+when an APU is found to identify such hardware.
+
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+(cherry picked from commit 2c1d39eff8b9c8296b57212bffd031029ce74491)
+---
+ amdgpu/amdgpu_asic_id.c | 45 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 45 insertions(+)
+
+diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
+index a5007ffc..7bdb2b67 100644
+--- a/amdgpu/amdgpu_asic_id.c
++++ b/amdgpu/amdgpu_asic_id.c
+@@ -104,6 +104,45 @@ out:
+ 	return r;
+ }
+ 
++static void amdgpu_parse_proc_cpuinfo(struct amdgpu_device *dev)
++{
++	const char *search_key = "model name";
++	char *line = NULL;
++	size_t len = 0;
++	FILE *fp;
++
++	fp = fopen("/proc/cpuinfo", "r");
++	if (fp == NULL) {
++		fprintf(stderr, "%s\n", strerror(errno));
++		return;
++	}
++
++	while (getline(&line, &len, fp) != -1) {
++		char *saveptr;
++		char *value;
++
++		if (strncmp(line, search_key, strlen(search_key)))
++			continue;
++
++		/* get content after colon and strip whitespace */
++		value = strtok_r(line, ":", &saveptr);
++		value = strtok_r(NULL, ":", &saveptr);
++		if (value == NULL)
++			continue;
++		while (*value == ' ' || *value == '\t')
++			value++;
++		saveptr = strchr(value, '\n');
++		if (saveptr)
++			*saveptr = '\0';
++
++		dev->marketing_name = strdup(value);
++		break;
++	}
++
++	free(line);
++	fclose(fp);
++}
++
+ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+ {
+ 	FILE *fp;
+@@ -113,6 +152,12 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+ 	int line_num = 1;
+ 	int r = 0;
+ 
++	if (dev->info.ids_flags & AMDGPU_IDS_FLAGS_FUSION) {
++		amdgpu_parse_proc_cpuinfo(dev);
++		if (dev->marketing_name != NULL)
++			return;
++	}
++
+ 	fp = fopen(AMDGPU_ASIC_ID_TABLE, "r");
+ 	if (!fp) {
+ 		fprintf(stderr, "%s: %s\n", AMDGPU_ASIC_ID_TABLE,
+-- 
+2.51.0
+
diff -pruN 2.4.127-1/debian/patches/0002-amdgpu-Slice-and-dice-the-string-for-APUs.patch 2.4.127-1ubuntu1/debian/patches/0002-amdgpu-Slice-and-dice-the-string-for-APUs.patch
--- 2.4.127-1/debian/patches/0002-amdgpu-Slice-and-dice-the-string-for-APUs.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/patches/0002-amdgpu-Slice-and-dice-the-string-for-APUs.patch	2025-10-23 14:27:02.000000000 +0000
@@ -0,0 +1,72 @@
+From 04b76923e2e19a04d05e52646b6eb122376340be Mon Sep 17 00:00:00 2001
+From: "Mario Limonciello (AMD)" <superm1@kernel.org>
+Date: Thu, 16 Oct 2025 10:01:42 -0500
+Subject: [PATCH 2/3] amdgpu: Slice and dice the string for APUs
+
+The string will generally have a CPU and GPU component, so if both
+are found split it up.  Make sure that it starts with AMD to be
+consistent.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
+(cherry picked from commit 90656fc8e4150fc175ddadb788912674b2c4a705)
+---
+ amdgpu/amdgpu_asic_id.c | 29 +++++++++++++++++++++++------
+ 1 file changed, 23 insertions(+), 6 deletions(-)
+
+diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
+index 7bdb2b67..2eeca0ec 100644
+--- a/amdgpu/amdgpu_asic_id.c
++++ b/amdgpu/amdgpu_asic_id.c
+@@ -107,6 +107,7 @@ out:
+ static void amdgpu_parse_proc_cpuinfo(struct amdgpu_device *dev)
+ {
+ 	const char *search_key = "model name";
++	const char *radeon_key = "Radeon";
+ 	char *line = NULL;
+ 	size_t len = 0;
+ 	FILE *fp;
+@@ -124,18 +125,34 @@ static void amdgpu_parse_proc_cpuinfo(struct amdgpu_device *dev)
+ 		if (strncmp(line, search_key, strlen(search_key)))
+ 			continue;
+ 
+-		/* get content after colon and strip whitespace */
+-		value = strtok_r(line, ":", &saveptr);
+-		value = strtok_r(NULL, ":", &saveptr);
+-		if (value == NULL)
+-			continue;
++		/* check for parts that have both CPU and GPU information */
++		value = strstr(line, radeon_key);
++
++		/* get content after the first colon */
++		if (value == NULL) {
++			value = strstr(line, ":");
++			if (value == NULL)
++				continue;
++			value++;
++		}
++
++		/* strip whitespace */
+ 		while (*value == ' ' || *value == '\t')
+ 			value++;
+ 		saveptr = strchr(value, '\n');
+ 		if (saveptr)
+ 			*saveptr = '\0';
+ 
+-		dev->marketing_name = strdup(value);
++		/* Add AMD to the new string if it's missing from slicing/dicing */
++		if (strncmp(value, "AMD", 3) != 0) {
++			char *tmp = malloc(strlen(value) + 5);
++
++			if (!tmp)
++				break;
++			sprintf(tmp, "AMD %s", value);
++			dev->marketing_name = tmp;
++		} else
++			dev->marketing_name = strdup(value);
+ 		break;
+ 	}
+ 
+-- 
+2.51.0
+
diff -pruN 2.4.127-1/debian/patches/0003-amdgpu-Only-read-proc-cpuinfo-as-a-fallback.patch 2.4.127-1ubuntu1/debian/patches/0003-amdgpu-Only-read-proc-cpuinfo-as-a-fallback.patch
--- 2.4.127-1/debian/patches/0003-amdgpu-Only-read-proc-cpuinfo-as-a-fallback.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/patches/0003-amdgpu-Only-read-proc-cpuinfo-as-a-fallback.patch	2025-10-23 14:27:02.000000000 +0000
@@ -0,0 +1,52 @@
+From 7fbc463593b018b5ebd8987ac2d1ac72f43eb88c Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Thu, 16 Oct 2025 10:53:01 -0500
+Subject: [PATCH 3/3] amdgpu: Only read /proc/cpuinfo as a fallback
+
+Some older Vega APUs don't provide a very useful string. If we have
+a string in amdgpu.ids use that, but fallback to /proc/cpuinfo.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+(cherry picked from commit 871e326ac799ae28ee4d98da9025028050c085cd)
+---
+ amdgpu/amdgpu_asic_id.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
+index 2eeca0ec..2e52666c 100644
+--- a/amdgpu/amdgpu_asic_id.c
++++ b/amdgpu/amdgpu_asic_id.c
+@@ -169,17 +169,11 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+ 	int line_num = 1;
+ 	int r = 0;
+ 
+-	if (dev->info.ids_flags & AMDGPU_IDS_FLAGS_FUSION) {
+-		amdgpu_parse_proc_cpuinfo(dev);
+-		if (dev->marketing_name != NULL)
+-			return;
+-	}
+-
+ 	fp = fopen(AMDGPU_ASIC_ID_TABLE, "r");
+ 	if (!fp) {
+ 		fprintf(stderr, "%s: %s\n", AMDGPU_ASIC_ID_TABLE,
+ 			strerror(errno));
+-		return;
++		goto get_cpu;
+ 	}
+ 
+ 	/* 1st valid line is file version */
+@@ -220,4 +214,10 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+ 
+ 	free(line);
+ 	fclose(fp);
++
++get_cpu:
++	if (dev->info.ids_flags & AMDGPU_IDS_FLAGS_FUSION &&
++	    dev->marketing_name == NULL) {
++		amdgpu_parse_proc_cpuinfo(dev);
++	}
+ }
+-- 
+2.51.0
+
diff -pruN 2.4.127-1/debian/patches/amdgpu-add-env-support-for-amdgpu-ids.patch 2.4.127-1ubuntu1/debian/patches/amdgpu-add-env-support-for-amdgpu-ids.patch
--- 2.4.127-1/debian/patches/amdgpu-add-env-support-for-amdgpu-ids.patch	2025-10-17 07:58:21.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/patches/amdgpu-add-env-support-for-amdgpu-ids.patch	2025-10-23 14:30:53.000000000 +0000
@@ -18,8 +18,6 @@ if it isn't located in the default, meso
  amdgpu/amdgpu_asic_id.c | 14 ++++++++++----
  2 files changed, 19 insertions(+), 4 deletions(-)
 
-diff --git a/README.rst b/README.rst
-index 746080319..6532c12ff 100644
 --- a/README.rst
 +++ b/README.rst
 @@ -49,3 +49,12 @@ Then use ninja to build and install:
@@ -35,11 +33,9 @@ index 746080319..6532c12ff 100644
 +during runtime by setting the `AMDGPU_ASIC_ID_TABLE_PATH` environment
 +variable with the full path (including the file name) of the alternative
 +file.
-diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
-index a5007ffc8..81a7cf7f4 100644
 --- a/amdgpu/amdgpu_asic_id.c
 +++ b/amdgpu/amdgpu_asic_id.c
-@@ -112,10 +112,16 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+@@ -168,10 +168,16 @@ void amdgpu_parse_asic_ids(struct amdgpu
  	ssize_t n;
  	int line_num = 1;
  	int r = 0;
@@ -56,9 +52,9 @@ index a5007ffc8..81a7cf7f4 100644
 -		fprintf(stderr, "%s: %s\n", AMDGPU_ASIC_ID_TABLE,
 +		fprintf(stderr, "%s: %s\n", amdgpu_asic_id_table_path,
  			strerror(errno));
- 		return;
+ 		goto get_cpu;
  	}
-@@ -132,7 +138,7 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+@@ -188,7 +194,7 @@ void amdgpu_parse_asic_ids(struct amdgpu
  			continue;
  		}
  
@@ -67,7 +63,7 @@ index a5007ffc8..81a7cf7f4 100644
  		break;
  	}
  
-@@ -150,7 +156,7 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
+@@ -206,7 +212,7 @@ void amdgpu_parse_asic_ids(struct amdgpu
  
  	if (r == -EINVAL) {
  		fprintf(stderr, "Invalid format: %s: line %d: %s\n",
@@ -76,6 +72,3 @@ index a5007ffc8..81a7cf7f4 100644
  	} else if (r && r != -EAGAIN) {
  		fprintf(stderr, "%s: Cannot parse ASIC IDs: %s\n",
  			__func__, strerror(-r));
--- 
-GitLab
-
diff -pruN 2.4.127-1/debian/patches/series 2.4.127-1ubuntu1/debian/patches/series
--- 2.4.127-1/debian/patches/series	2025-10-17 07:58:21.000000000 +0000
+++ 2.4.127-1ubuntu1/debian/patches/series	2025-10-23 14:30:45.000000000 +0000
@@ -1,2 +1,6 @@
+0001-amdgpu-Read-model-name-from-proc-cpuinfo-for-APUs.patch
+0002-amdgpu-Slice-and-dice-the-string-for-APUs.patch
+0003-amdgpu-Only-read-proc-cpuinfo-as-a-fallback.patch
+
 01_default_perms.diff
 amdgpu-add-env-support-for-amdgpu-ids.patch
