Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug" failed to apply to 6.12-stable tree

PATCH New [email protected] 2 participants 2 messages Sep 9 – Sep 12

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 958f35cbb8955ca3fa439cd9f2092cb42414aa8c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090959-implicate-skintight-5af9@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 958f35cbb8955ca3fa439cd9f2092cb42414aa8c Mon Sep 17 00:00:00 2001
From: Shixiong Ou <[email protected]>
Date: Fri, 31 Jul 2026 19:17:29 +0800
Subject: [PATCH] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug

The is_avivo() function has a logic error where it compares a constant to another constant instead of checking the device parameter:

(PCI_VENDOR_ID_ATI_R600 >= 0x9400)

Fixes f496834e1674 ("drm/ofdrm: Add per-model device function")
Cc <[email protected]> # v6.2+
drivers/gpu/drm/sysfb/ofdrm.c +1 -1
index a6dc34b9ec0f..9d60db45139c 100644
@@ -239,7 +239,7 @@ static bool is_avivo(u32 vendor, u32 device)
 	/* This will match most R5xx */
 	return (vendor == PCI_VENDOR_ID_ATI) &&
 	       ((device >= PCI_VENDOR_ID_ATI_R520 && device < 0x7800) ||
-		(PCI_VENDOR_ID_ATI_R600 >= 0x9400));
+		(device >= PCI_VENDOR_ID_ATI_R600));
 }
 
 static enum ofdrm_model display_get_model_of(struct drm_device *dev, struct device_node *of_node)
maintainer
#1 lore raw

PATCH 1/1 drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug

From: Shixiong Ou <[email protected]>

[ Upstream commit 958f35cbb8955ca3fa439cd9f2092cb42414aa8c ]

The is_avivo() function has a logic error where it compares a constant to another constant instead of checking the device parameter:

(PCI_VENDOR_ID_ATI_R600 >= 0x9400)

---
 drivers/gpu/drm/tiny/ofdrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tiny/ofdrm.c +1 -1
index cc90e0035d034..32857514fe369 100644
@@ -231,7 +231,7 @@ static bool is_avivo(u32 vendor, u32 device)
 	/* This will match most R5xx */
 	return (vendor == PCI_VENDOR_ID_ATI) &&
 	       ((device >= PCI_VENDOR_ID_ATI_R520 && device < 0x7800) ||
-		(PCI_VENDOR_ID_ATI_R600 >= 0x9400));
+		(device >= PCI_VENDOR_ID_ATI_R600));
 }
 
 static enum ofdrm_model display_get_model_of(struct drm_device *dev, struct device_node *of_node)
Signature · 1 line
2.53.0