Thread (51 messages) 51 messages, 8 authors, 2022-09-22

Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2022-09-21 12:37:42
Also in: dri-devel, linux-fbdev

Hi

Am 05.08.22 um 02:22 schrieb Benjamin Herrenschmidt:
On Tue, 2022-07-26 at 16:40 +0200, Michal Suchánek wrote:
quoted
Hello,

On Tue, Jul 26, 2022 at 03:38:37PM +0200, Javier Martinez Canillas wrote:
quoted
On 7/20/22 16:27, Thomas Zimmermann wrote:
quoted
Add a per-model device-function structure in preparation of adding
color-management support. Detection of the individual models has been
taken from fbdev's offb.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

[...]
quoted
+static bool is_avivo(__be32 vendor, __be32 device)
+{
+	/* This will match most R5xx */
+	return (vendor == 0x1002) &&
+	       ((device >= 0x7100 && device < 0x7800) || (device >= 0x9400));
+}
Maybe add some constant macros to not have these magic numbers ?
This is based on the existing fbdev implementation's magic numbers:

drivers/video/fbdev/offb.c:                 ((*did >= 0x7100 && *did < 0x7800) ||

Of course, it would be great if somebody knowledgeable could clarify
those.
I don't think anybody remembers :-) Vendor 0x1002 is PCI_VENDOR_ID_ATI,
I do :)
but the rest is basically ranges of PCI IDs for which we don't have
symbolic constants.
Should we add them to the official list in pci_ids.h?  I cannot find 
0x7800. The others are R520 and R600.

Best regards
Thomas
Cheers,
Ben.
-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help