Re: [PATCH 3/3] drm/i915/fb: Fold modifier CCS type/tiling attribute to plane caps

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

 



On Wed, 27 Oct 2021, Imre Deak <imre.deak@xxxxxxxxx> wrote:
> On Tue, Oct 26, 2021 at 08:52:12PM +0300, Jani Nikula wrote:
>> AFAICT there are no intel_plane_caps references anywhere after this, and
>> it no longer looks like an enum, so perhaps it just shouldn't be an enum
>> anymore? Just make them macros?
>
> There are other instances of bitfield enums in the kernel, but yes in C
> there's no benefit of enums for this over the simpler macro approach.
> Will change this.

Semantically I think enums are good for enumerating and naming the bit
*positions*, but not so much the shifted bit values. See e.g. enum
drm_dp_quirk, where the values aren't important, but they're used with
BIT() in drm_dp_has_quirk().

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center



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

  Powered by Linux