[PATCH v3 03/15] drm/i915/display: use a macro to define platform enumerations

Jani Nikula jani.nikula at intel.com
Tue Oct 8 09:30:38 UTC 2024


On Mon, 07 Oct 2024, Michal Wajdeczko <michal.wajdeczko at intel.com> wrote:
> On 30.09.2024 14:31, Jani Nikula wrote:
>> We'll be needing a macro based list of platforms for more things in the
>> future. Start by defining the platform enumerations with it.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>> ---
>>  .../drm/i915/display/intel_display_device.h   | 115 ++++++++++--------
>>  1 file changed, 61 insertions(+), 54 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 5306bbd13e59..1cc1a2de9e6a 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -15,63 +15,70 @@ struct drm_i915_private;
>>  struct drm_printer;
>>  
>>  /* Keep in gen based order, and chronological order within a gen */
>> +#define INTEL_DISPLAY_PLATFORMS(func) \
>> +	func(PLATFORM_UNINITIALIZED) \
>
> maybe this one should be defined in the old-fashion way so the
> INTEL_DISPLAY_PLATFORMS macro will contain only valid IDs?

I don't understand.

BR,
Jani.

-- 
Jani Nikula, Intel


More information about the Intel-gfx mailing list