All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	lucas.demarchi@intel.com
Subject: Re: [PATCH 1/2] drm/i915/pciids: use designated initializers in INTEL_VGA_DEVICE()
Date: Thu, 05 Sep 2024 21:02:50 +0300	[thread overview]
Message-ID: <87cyliou5x.fsf@intel.com> (raw)
In-Reply-To: <ZtnnDNFjC2WTt5u4@intel.com>

On Thu, 05 Sep 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Wed, Sep 04, 2024 at 12:51:32PM +0300, Jani Nikula wrote:
>> With IGT no longer using INTEL_VGA_DEVICE(), we can make it kernel
>> specific and use designated initializers. Ditto for
>> INTEL_QUANTA_VGA_DEVICE(). Remove the superfluous comments while at it.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> ---
>> 
>> IGT INTEL_VGA_DEVICE removal:
>> 
>> https://lore.kernel.org/r/20240902134907.2186238-2-jani.nikula@intel.com
>
>
> I guess that if someone else is still using this directly like IGT was,
> then they will have to adjust when the sync with this header like this,
> so:

Yeah, but I recently did much more invasive changes by converting i915
pciids to the same style as xe, and nobody complained. (I fixed the IGT
parts, of course.)

>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks, both pushed to din.

BR,
Jani.


>
>
>> ---
>>  include/drm/intel/i915_pciids.h | 35 +++++++++++++--------------------
>>  1 file changed, 14 insertions(+), 21 deletions(-)
>> 
>> diff --git a/include/drm/intel/i915_pciids.h b/include/drm/intel/i915_pciids.h
>> index 2bf03ebfcf73..6a78df5687c5 100644
>> --- a/include/drm/intel/i915_pciids.h
>> +++ b/include/drm/intel/i915_pciids.h
>> @@ -25,27 +25,20 @@
>>  #ifndef _I915_PCIIDS_H
>>  #define _I915_PCIIDS_H
>>  
>> -/*
>> - * A pci_device_id struct {
>> - *	__u32 vendor, device;
>> - *      __u32 subvendor, subdevice;
>> - *	__u32 class, class_mask;
>> - *	kernel_ulong_t driver_data;
>> - * };
>> - * Don't use C99 here because "class" is reserved and we want to
>> - * give userspace flexibility.
>> - */
>> -#define INTEL_VGA_DEVICE(id, info) { \
>> -	0x8086,	id, \
>> -	~0, ~0, \
>> -	0x030000, 0xff0000, \
>> -	(unsigned long) info }
>> -
>> -#define INTEL_QUANTA_VGA_DEVICE(info) { \
>> -	0x8086,	0x16a, \
>> -	0x152d,	0x8990, \
>> -	0x030000, 0xff0000, \
>> -	(unsigned long) info }
>> +#ifdef __KERNEL__
>> +#define INTEL_VGA_DEVICE(_id, _info) { \
>> +	PCI_DEVICE(PCI_VENDOR_ID_INTEL, (_id)), \
>> +	.class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff << 16, \
>> +	.driver_data = (kernel_ulong_t)(_info), \
>> +}
>> +
>> +#define INTEL_QUANTA_VGA_DEVICE(_info) { \
>> +	.vendor = PCI_VENDOR_ID_INTEL, .device = 0x16a, \
>> +	.subvendor = 0x152d, .subdevice = 0x8990, \
>> +	.class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff << 16, \
>> +	.driver_data = (kernel_ulong_t)(_info), \
>> +}
>> +#endif
>>  
>>  #define INTEL_I810_IDS(MACRO__, ...) \
>>  	MACRO__(0x7121, ## __VA_ARGS__), /* I810 */ \
>> -- 
>> 2.39.2
>> 

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-09-05 18:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04  9:51 [PATCH 0/2] drm/i915/pciids: cleanups Jani Nikula
2024-09-04  9:51 ` [PATCH 1/2] drm/i915/pciids: use designated initializers in INTEL_VGA_DEVICE() Jani Nikula
2024-09-04 10:24   ` Jani Nikula
2024-09-05 17:14   ` Rodrigo Vivi
2024-09-05 18:02     ` Jani Nikula [this message]
2024-09-04  9:51 ` [PATCH 2/2] drm/i915/pciids: separate ARL and MTL PCI IDs Jani Nikula
2024-09-05 17:15   ` Rodrigo Vivi
2024-09-04 10:58 ` ✓ CI.Patch_applied: success for drm/i915/pciids: cleanups Patchwork
2024-09-04 10:58 ` ✓ CI.checkpatch: " Patchwork
2024-09-04 11:00 ` ✓ CI.KUnit: " Patchwork
2024-09-04 11:18 ` ✓ CI.Build: " Patchwork
2024-09-04 11:20 ` ✓ CI.Hooks: " Patchwork
2024-09-04 11:21 ` ✗ CI.checksparse: warning " Patchwork
2024-09-05 11:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-09-05 11:16 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-06 10:22 ` ✓ CI.FULL: " Patchwork

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=87cyliou5x.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /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.