All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>
Cc: airlied@linux.ie, daniel@ffwll.ch, deller@gmx.de,
	maxime@cerno.tech, sam@ravnborg.org, mpe@ellerman.id.au,
	paulus@samba.org, geert@linux-m68k.org,
	mark.cave-ayland@ilande.co.uk, linux-fbdev@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function
Date: Wed, 21 Sep 2022 14:37:33 +0200	[thread overview]
Message-ID: <39e692cd-717a-a1f2-d330-7ff14cb9d1eb@suse.de> (raw)
In-Reply-To: <a9822ef5fba5599ddcee5daa4dbd17d8aaca8390.camel@kernel.crashing.org>


[-- Attachment #1.1: Type: text/plain, Size: 1710 bytes --]

Hi

Am 05.08.22 um 02:22 schrieb Benjamin Herrenschmidt:
> On Tue, 2022-07-26 at 16:40 +0200, Michal Suchánek wrote:
>> Hello,
>>
>> On Tue, Jul 26, 2022 at 03:38:37PM +0200, Javier Martinez Canillas wrote:
>>> On 7/20/22 16:27, Thomas Zimmermann wrote:
>>>> 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>
>>>
>>> [...]
>>>
>>>> +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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>
Cc: linux-fbdev@vger.kernel.org, airlied@linux.ie, deller@gmx.de,
	mark.cave-ayland@ilande.co.uk, linuxppc-dev@lists.ozlabs.org,
	dri-devel@lists.freedesktop.org, paulus@samba.org,
	maxime@cerno.tech, daniel@ffwll.ch, geert@linux-m68k.org,
	sam@ravnborg.org
Subject: Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function
Date: Wed, 21 Sep 2022 14:37:33 +0200	[thread overview]
Message-ID: <39e692cd-717a-a1f2-d330-7ff14cb9d1eb@suse.de> (raw)
In-Reply-To: <a9822ef5fba5599ddcee5daa4dbd17d8aaca8390.camel@kernel.crashing.org>


[-- Attachment #1.1: Type: text/plain, Size: 1710 bytes --]

Hi

Am 05.08.22 um 02:22 schrieb Benjamin Herrenschmidt:
> On Tue, 2022-07-26 at 16:40 +0200, Michal Suchánek wrote:
>> Hello,
>>
>> On Tue, Jul 26, 2022 at 03:38:37PM +0200, Javier Martinez Canillas wrote:
>>> On 7/20/22 16:27, Thomas Zimmermann wrote:
>>>> 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>
>>>
>>> [...]
>>>
>>>> +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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>
Cc: linux-fbdev@vger.kernel.org, airlied@linux.ie,
	mpe@ellerman.id.au, deller@gmx.de, mark.cave-ayland@ilande.co.uk,
	linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org,
	paulus@samba.org, maxime@cerno.tech, geert@linux-m68k.org,
	sam@ravnborg.org
Subject: Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function
Date: Wed, 21 Sep 2022 14:37:33 +0200	[thread overview]
Message-ID: <39e692cd-717a-a1f2-d330-7ff14cb9d1eb@suse.de> (raw)
In-Reply-To: <a9822ef5fba5599ddcee5daa4dbd17d8aaca8390.camel@kernel.crashing.org>


[-- Attachment #1.1: Type: text/plain, Size: 1710 bytes --]

Hi

Am 05.08.22 um 02:22 schrieb Benjamin Herrenschmidt:
> On Tue, 2022-07-26 at 16:40 +0200, Michal Suchánek wrote:
>> Hello,
>>
>> On Tue, Jul 26, 2022 at 03:38:37PM +0200, Javier Martinez Canillas wrote:
>>> On 7/20/22 16:27, Thomas Zimmermann wrote:
>>>> 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>
>>>
>>> [...]
>>>
>>>> +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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-09-21 12:37 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 14:27 [PATCH v2 00/10] drm: Add driver for PowerPC OF displays Thomas Zimmermann
2022-07-20 14:27 ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 01/10] drm/simpledrm: Remove mem field from device structure Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-25 14:48   ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 02/10] drm/simpledrm: Inline device-init helpers Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-25 15:01   ` Javier Martinez Canillas
2022-07-27  7:50     ` Thomas Zimmermann
2022-07-27  9:30       ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 03/10] drm/simpledrm: Remove pdev field from device structure Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-25 15:02   ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 04/10] drm/simpledrm: Compute framebuffer stride if not set Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-21 14:46   ` Geert Uytterhoeven
2022-07-21 14:46     ` Geert Uytterhoeven
2022-07-21 14:46     ` Geert Uytterhoeven
2022-07-25 15:13     ` Javier Martinez Canillas
2022-07-25 15:13       ` Javier Martinez Canillas
2022-07-25 15:13       ` Javier Martinez Canillas
2022-07-27  7:53       ` Thomas Zimmermann
2022-07-27  7:53         ` Thomas Zimmermann
2022-07-27  7:53         ` Thomas Zimmermann
2022-08-11 17:23         ` Daniel Vetter
2022-08-11 17:23           ` Daniel Vetter
2022-08-11 17:23           ` Daniel Vetter
2022-08-11 18:26           ` Thomas Zimmermann
2022-08-11 18:26             ` Thomas Zimmermann
2022-08-11 18:26             ` Thomas Zimmermann
2022-08-11 18:27             ` Thomas Zimmermann
2022-08-11 18:27               ` Thomas Zimmermann
2022-08-11 18:27               ` Thomas Zimmermann
2022-09-06 19:16               ` Daniel Vetter
2022-09-06 19:16                 ` Daniel Vetter
2022-09-06 19:16                 ` Daniel Vetter
2022-07-20 14:27 ` [PATCH v2 05/10] drm/simpledrm: Convert to atomic helpers Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-25 15:46   ` Javier Martinez Canillas
2022-07-27  7:58     ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 06/10] drm/simpledrm: Move some functionality into fwfb helper library Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-25 16:23   ` Javier Martinez Canillas
2022-07-27  8:24     ` Thomas Zimmermann
2022-07-27  9:39       ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 07/10] drm/ofdrm: Add ofdrm for Open Firmware framebuffers Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-26 13:17   ` Javier Martinez Canillas
2022-09-21 11:41     ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 08/10] drm/ofdrm: Add CRTC state Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-26 13:36   ` Javier Martinez Canillas
2022-09-21 11:45     ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 09/10] drm/ofdrm: Add per-model device function Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-26 13:38   ` Javier Martinez Canillas
2022-07-26 14:40     ` Michal Suchánek
2022-07-26 14:40       ` Michal Suchánek
2022-07-26 14:40       ` Michal Suchánek
2022-07-26 19:22       ` Javier Martinez Canillas
2022-07-26 19:22         ` Javier Martinez Canillas
2022-07-26 19:22         ` Javier Martinez Canillas
2022-07-27  8:33         ` Thomas Zimmermann
2022-07-27  8:33           ` Thomas Zimmermann
2022-07-27  8:33           ` Thomas Zimmermann
2022-08-05  0:22       ` Benjamin Herrenschmidt
2022-08-05  0:22         ` Benjamin Herrenschmidt
2022-08-05  0:22         ` Benjamin Herrenschmidt
2022-09-21 12:37         ` Thomas Zimmermann [this message]
2022-09-21 12:37           ` Thomas Zimmermann
2022-09-21 12:37           ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 10/10] drm/ofdrm: Support color management Thomas Zimmermann
2022-07-20 14:27   ` Thomas Zimmermann
2022-07-26 13:49   ` Javier Martinez Canillas
2022-07-27  8:41     ` Thomas Zimmermann
2022-07-27  9:45       ` Javier Martinez Canillas
2022-08-05  0:29       ` Benjamin Herrenschmidt
2022-08-05  0:19   ` Benjamin Herrenschmidt
2022-09-21 12:55     ` Thomas Zimmermann
2022-09-21 16:48       ` Geert Uytterhoeven
2022-09-21 16:48         ` Geert Uytterhoeven
2022-09-21 16:48         ` Geert Uytterhoeven
2022-09-22  6:42         ` Thomas Zimmermann
2022-09-22  6:42           ` Thomas Zimmermann
2022-09-22  6:42           ` Thomas Zimmermann
2022-09-22  7:28           ` Maxime Ripard
2022-09-22  7:28             ` Maxime Ripard
2022-09-22  7:28             ` Maxime Ripard
2022-09-22  8:06             ` Thomas Zimmermann
2022-09-22  8:06               ` Thomas Zimmermann
2022-09-22  8:06               ` Thomas Zimmermann
2022-07-28 11:13 ` [PATCH v2 00/10] drm: Add driver for PowerPC OF displays Michael Ellerman
2022-07-28 11:13   ` Michael Ellerman
2022-07-28 11:31   ` Michal Suchánek
2022-07-28 11:31     ` Michal Suchánek
2022-07-28 11:31     ` Michal Suchánek
2022-07-28 11:42   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39e692cd-717a-a1f2-d330-7ff14cb9d1eb@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=benh@kernel.crashing.org \
    --cc=daniel@ffwll.ch \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=maxime@cerno.tech \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    --cc=paulus@samba.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.