* [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug
@ 2026-07-31 11:17 oushixiong1025
2026-08-25 11:20 ` Thomas Zimmermann
2026-08-26 6:57 ` Thomas Zimmermann
0 siblings, 2 replies; 3+ messages in thread
From: oushixiong1025 @ 2026-07-31 11:17 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Javier Martinez Canillas, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, dri-devel, linux-kernel,
Shixiong Ou
From: Shixiong Ou <oushixiong@kylinos.cn>
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)
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
---
drivers/gpu/drm/sysfb/ofdrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sysfb/ofdrm.c b/drivers/gpu/drm/sysfb/ofdrm.c
index 819aed466727..1d95df522ad5 100644
--- a/drivers/gpu/drm/sysfb/ofdrm.c
+++ b/drivers/gpu/drm/sysfb/ofdrm.c
@@ -238,7 +238,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)
--
2.25.1
No virus found
Checked by Hillstone Network AntiVirus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug
2026-07-31 11:17 [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug oushixiong1025
@ 2026-08-25 11:20 ` Thomas Zimmermann
2026-08-26 6:57 ` Thomas Zimmermann
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2026-08-25 11:20 UTC (permalink / raw)
To: oushixiong1025
Cc: Javier Martinez Canillas, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, dri-devel, linux-kernel,
Shixiong Ou
Am 31.07.26 um 13:17 schrieb oushixiong1025@163.com:
> From: Shixiong Ou <oushixiong@kylinos.cn>
>
> 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)
>
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: f496834e1674 ("drm/ofdrm: Add per-model device function")
Cc: <stable@vger.kernel.org> # v6.2+
> ---
> drivers/gpu/drm/sysfb/ofdrm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/sysfb/ofdrm.c b/drivers/gpu/drm/sysfb/ofdrm.c
> index 819aed466727..1d95df522ad5 100644
> --- a/drivers/gpu/drm/sysfb/ofdrm.c
> +++ b/drivers/gpu/drm/sysfb/ofdrm.c
> @@ -238,7 +238,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)
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug
2026-07-31 11:17 [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug oushixiong1025
2026-08-25 11:20 ` Thomas Zimmermann
@ 2026-08-26 6:57 ` Thomas Zimmermann
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2026-08-26 6:57 UTC (permalink / raw)
To: oushixiong1025
Cc: Javier Martinez Canillas, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, dri-devel, linux-kernel,
Shixiong Ou
Merged into drm-misc-fixes
Am 31.07.26 um 13:17 schrieb oushixiong1025@163.com:
> From: Shixiong Ou <oushixiong@kylinos.cn>
>
> 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)
>
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
> ---
> drivers/gpu/drm/sysfb/ofdrm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/sysfb/ofdrm.c b/drivers/gpu/drm/sysfb/ofdrm.c
> index 819aed466727..1d95df522ad5 100644
> --- a/drivers/gpu/drm/sysfb/ofdrm.c
> +++ b/drivers/gpu/drm/sysfb/ofdrm.c
> @@ -238,7 +238,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)
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-26 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 11:17 [PATCH v2] drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug oushixiong1025
2026-08-25 11:20 ` Thomas Zimmermann
2026-08-26 6:57 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®