Re: [PATCH] drm/i915: Drop platform_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 15, 2019 at 08:19:58PM +0200, Ville Syrjälä wrote:
On Fri, Mar 15, 2019 at 07:13:49AM +0000, Tvrtko Ursulin wrote:

On 15/03/2019 06:56, Tvrtko Ursulin wrote:
>
> On 15/03/2019 00:52, Chris Wilson wrote:
>> Quoting José Roberto de Souza (2019-03-15 00:42:35)
>>> We don't have any platform that is composed by 2 or more platforms so
>>> we don't need a mask, lets drop it and remove the actual limit of 32
>>> platforms.
>
> Platform mask was a nifty trick to compile tests like IS_SKYLAKE ||
> IS_BROADWELL etc into a single conditional.
>
>> gcc doesn't entirely agree, this is a net loss here (i.e. code size
>> increases).
>
> Perhaps the size re-gain of dropping the platform mask could be checked
> against the size gain of making the mask 64 bit.

One possible alternative could be splitting the 64-bit platform mask
into two 32-bit dwords. Like:

   u32 platform_mask[2];

   #define IS_PLATFORM(p) (platform_mask[p / 32] & BIT(p % 32))

This is fast approaching nih bitmap.h territory.

I would be a little less opposed to this whole idea if it was in
bitmap.h indeed.

Lucas De Marchi


--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux