mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
intel/isl: add INTEL_DEBUG=noccs-modifier to disable CCS modifiers
To help figure out whether a CCS related corruption is tied to modifier setup or internal driver state tracking. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38382>
This commit is contained in:
parent
6a5982cfe5
commit
ef5a0def76
3 changed files with 14 additions and 27 deletions
|
|
@ -88,6 +88,7 @@ static const struct debug_control_bitset debug_control[] = {
|
|||
OPT1("do32", DEBUG_DO32),
|
||||
OPT1("norbc", DEBUG_NO_CCS),
|
||||
OPT1("noccs", DEBUG_NO_CCS),
|
||||
OPT1("noccs-modifier", DEBUG_NO_CCS_MODIFIER),
|
||||
OPT1("nohiz", DEBUG_NO_HIZ),
|
||||
OPT1("color", DEBUG_COLOR),
|
||||
OPT1("reemit", DEBUG_REEMIT),
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ enum intel_debug_flag {
|
|||
DEBUG_L3,
|
||||
DEBUG_NO_CCS,
|
||||
DEBUG_NO_HIZ,
|
||||
DEBUG_NO_CCS_MODIFIER,
|
||||
DEBUG_COLOR,
|
||||
DEBUG_REEMIT,
|
||||
DEBUG_SOFT64,
|
||||
|
|
|
|||
|
|
@ -212,6 +212,18 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
|
|||
if (mod_str != NULL) {
|
||||
return modifier == strtoul(mod_str, NULL, 0);
|
||||
}
|
||||
|
||||
const struct isl_drm_modifier_info *mod_info =
|
||||
isl_drm_modifier_get_info(modifier);
|
||||
if (mod_info != NULL) {
|
||||
if (mod_info->supports_render_compression &&
|
||||
(INTEL_DEBUG(DEBUG_NO_CCS) || INTEL_DEBUG(DEBUG_NO_CCS_MODIFIER)))
|
||||
return 0;
|
||||
|
||||
if (mod_info->supports_clear_color && INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* FINISHME: Add gfx12 modifiers */
|
||||
switch (modifier) {
|
||||
default:
|
||||
|
|
@ -233,25 +245,16 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
|
|||
if (devinfo->ver <= 8 || devinfo->ver >= 12)
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
|
||||
if (devinfo->verx10 != 120)
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC:
|
||||
if (devinfo->verx10 != 120)
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS) || INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
|
||||
return 0;
|
||||
|
||||
return 5;
|
||||
case I915_FORMAT_MOD_4_TILED:
|
||||
/* Gfx12.5 introduces Tile4. */
|
||||
|
|
@ -263,49 +266,31 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
|
|||
if (!intel_device_info_is_dg2(devinfo))
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
|
||||
if (!intel_device_info_is_dg2(devinfo))
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS) || INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
|
||||
return 0;
|
||||
|
||||
return 5;
|
||||
case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
|
||||
if (!intel_device_info_is_mtl_or_arl(devinfo))
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC:
|
||||
if (!intel_device_info_is_mtl_or_arl(devinfo))
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS) || INTEL_DEBUG(DEBUG_NO_FAST_CLEAR))
|
||||
return 0;
|
||||
|
||||
return 5;
|
||||
case I915_FORMAT_MOD_4_TILED_LNL_CCS:
|
||||
if (devinfo->ver < 20 || devinfo->has_local_mem)
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
case I915_FORMAT_MOD_4_TILED_BMG_CCS:
|
||||
if (devinfo->ver < 20 || !devinfo->has_local_mem)
|
||||
return 0;
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_NO_CCS))
|
||||
return 0;
|
||||
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue