ascent12/drm_info

AMD GFX9+ format modifiers may be misunderstood by drm_info

emersion opened this issue · 1 comments

There is an upcoming AMD patch to add more modifiers: https://patchwork.freedesktop.org/patch/336183/?series=68104&rev=1

The thing that worries me is those:

#define DRM_FORMAT_MOD_AMD_GFX9_64K_STANDARD_id       0
#define DRM_FORMAT_MOD_AMD_GFX9_64K_DISPLAY_id        1
#define DRM_FORMAT_MOD_AMD_GFX9_64K_X_STANDARD_id     2
#define DRM_FORMAT_MOD_AMD_GFX9_64K_X_DISPLAY_id      3
#define DRM_FORMAT_MOD_AMD_GFX10_64K_X_RENDER_id      4
#define DRM_FORMAT_MOD_AMD_GFX9_64K_X_STANDARD_DCC_id 5
#define DRM_FORMAT_MOD_AMD_GFX10_64K_X_RENDER_DCC_id  6
#define DRM_FORMAT_MOD_AMD_GFX9_64K_X_DCN1_DCC_id     7

These are not modifiers, but are used in modifiers macros. We shouldn't parse them as modifiers.

Not sure what's the best way to handle them. Can't think of anything better than a blacklist of DRM_FORMAT_MOD_AMD_GFX*.

Can't think of anything better than a blacklist

Yeah, it'll probably be that. Maybe even a whitelist is justified, since trying to reliably parse everything now and in the future the same way may just be futile.