On 17/04/2020 20:14, Daniel Vetter wrote:
> On Fri, Apr 17, 2020 at 6:05 PM Neil Armstrong <narmstr...@baylibre.com> 
> wrote:
>>
>> On 17/04/2020 17:07, Daniel Vetter wrote:

[...]

> 
> Yup there's a number of parametried modifiers. As long as the stuff
> you get from a DRM_FORMAT_MOD_ ... macro is a full modifier with
> everything it should be all fine.

Would something like that be ok ?

#define __fourcc_mod_amlogic_layout_mask 0xf
#define __fourcc_mod_amlogic_options_shift 8
#define __fourcc_mod_amlogic_options_mask 0xf

#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
        fourcc_mod_code(AMLOGIC, \
                        ((__layout) & __fourcc_mod_amlogic_layout_mask) | \
                        ((options) & __fourcc_mod_amlogic_options_mask \
                         << __fourcc_mod_amlogic_options_shift))

/* Amlogic FBC Layouts */

/* bla */
#define AMLOGIC_FBC_LAYOUT_BASIC                (1ULL)

/* bla */
#define AMLOGIC_FBC_LAYOUT_SCATTER              (2ULL)

/* Amlogic FBC Layout Options Bit Mask */

/* bla */
#define AMLOGIC_FBC_OPTION_MEM_SAVING           (1ULL << 0)

Neil

> -Daniel
> 
>> Neil
>>
>>> -Daniel
>>>
>>>> +
>>>>  #if defined(__cplusplus)
>>>>  }
>>>>  #endif
>>>> --
>>>> 2.22.0
>>>>
>>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> 
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to