Re: [PATCH 4/5] drm/xe/xe_ras: Add structures and commands for get counter

Tauro, Riana
2026-04-07T07:58:32Z

On 4/7/2026 1:15 PM, Raag Jadav wrote:
> On Mon, Apr 06, 2026 at 10:53:13AM +0530, Tauro, Riana wrote:
>> On 4/1/2026 1:28 PM, Raag Jadav wrote:
>>> On Fri, Mar 20, 2026 at 03:55:59PM +0530, Riana Tauro wrote:
> ...
>
>>>> + /** @flags: Info queue control flags */
>>>> + u32 flags:8;
>>> Why not u8?
>> flags, compression type and reserved are part of u32.
>>
>> It's in-line with the firmware definition.
>>
>> Also it is not recommended to mix the types if the bit fields belong to the
>> same type.
> By who? I thought it was just matter of readability since we already have
> __packed in place? Anyway, I'll leave it upto you.
C specification

"An implementation may allocate any addressable storage unit large
enough to hold a bit-field. If enough space remains, a bit-field that
immediately follows another bit-field in a structure shall be packed
into adjacent bits of the same unit.
If insufficient space remains, whether a bit-field that does not fit is
put into the next unit or overlaps adjacent units is implementation-defined"

It says it is upto the compiler and is implementation defined.

Retaining this unless there is an issue.

Thanks
Riana
>
> Raag
>
>>>> + /** @compression_type: Compression type used for this chunk */
>>>> + u32 compression_type:4;
>>> Ditto.
>>>
>>>> + /** @reserved: Reserved for future use */
>>>> + u32 reserved:20;
>>>> + /** @checksum: Checksum of the chunk data */
>>>> + u32 checksum;
>>>> +} __packed;