[Intel-gfx] [PATCH] drm/i915: Introduce concept of a sub-platform

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Mar 15 16:05:05 UTC 2019


On 15/03/2019 15:55, Ville Syrjälä wrote:
> On Fri, Mar 15, 2019 at 02:21:57PM +0000, Tvrtko Ursulin wrote:

[snip]

>>>> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
>>>> index 047d10bdd455..b03fbd2e451a 100644
>>>> --- a/drivers/gpu/drm/i915/intel_device_info.h
>>>> +++ b/drivers/gpu/drm/i915/intel_device_info.h
>>>> @@ -44,7 +44,7 @@ enum intel_platform {
>>>>    	INTEL_I915G,
>>>>    	INTEL_I915GM,
>>>>    	INTEL_I945G,
>>>> -	INTEL_I945GM,
>>>> +	INTEL_I945GM = 8,
>>>>    	INTEL_G33,
>>>>    	INTEL_PINEVIEW,
>>>>    	/* gen4 */
>>>> @@ -55,7 +55,7 @@ enum intel_platform {
>>>>    	/* gen5 */
>>>>    	INTEL_IRONLAKE,
>>>>    	/* gen6 */
>>>> -	INTEL_SANDYBRIDGE,
>>>> +	INTEL_SANDYBRIDGE = 16,
>>>>    	/* gen7 */
>>>>    	INTEL_IVYBRIDGE,
>>>>    	INTEL_VALLEYVIEW,
>>>> @@ -66,7 +66,7 @@ enum intel_platform {
>>>>    	/* gen9 */
>>>>    	INTEL_SKYLAKE,
>>>>    	INTEL_BROXTON,
>>>> -	INTEL_KABYLAKE,
>>>> +	INTEL_KABYLAKE = 24,
>>>
>>> Too much magic. Looks rather fragile.
>>
>> Imagine these hunks gone. This is not required for this patch at all, or
>> for anything for that matter. What do you think is magic and fragile?
> 
> Who is going to remeber to keep adding those magic numbers
> in the future.

They serve no purpose. :) I'll remove them from the next respin. It was 
just me counting to see how many fit into one u32 of mask bits if I 
reserve N low bits for the subplatform mask.

Regards,

Tvrtko


More information about the Intel-gfx mailing list