intel/dev: Replace intel_device_info::apply_hwconfig by a gfx version check
There is no plans to remove hwconfig from platforms 12.5 and newer so lets replace this bool by a ip version check. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27897>
This commit is contained in:

committed by
Marge Bot

parent
03a85edff7
commit
f9efedb1a1
@@ -1131,7 +1131,6 @@ static const struct intel_device_info intel_device_info_sg1 = {
|
||||
/* (Sub)slice info comes from the kernel topology info */ \
|
||||
XEHP_FEATURES(0, 1, 0), \
|
||||
.revision = 4, /* For offline compiler */ \
|
||||
.apply_hwconfig = true, \
|
||||
.has_coarse_pixel_primitive_and_cb = true, \
|
||||
.has_mesh_shading = true, \
|
||||
.has_ray_tracing = true, \
|
||||
@@ -1174,7 +1173,6 @@ static const struct intel_device_info intel_device_info_atsm_g11 = {
|
||||
XEHP_FEATURES(0, 1, 0), \
|
||||
.has_local_mem = false, \
|
||||
.has_aux_map = true, \
|
||||
.apply_hwconfig = true, \
|
||||
.has_64bit_float = true, \
|
||||
.has_64bit_float_via_math_pipe = true, \
|
||||
.has_integer_dword_mul = false, \
|
||||
@@ -1240,14 +1238,12 @@ static const struct intel_device_info intel_device_info_bmg = {
|
||||
XE2_FEATURES,
|
||||
.platform = INTEL_PLATFORM_BMG,
|
||||
.has_local_mem = true,
|
||||
.apply_hwconfig = true,
|
||||
};
|
||||
|
||||
static const struct intel_device_info intel_device_info_lnl = {
|
||||
XE2_FEATURES,
|
||||
.platform = INTEL_PLATFORM_LNL,
|
||||
.has_local_mem = false,
|
||||
.apply_hwconfig = true,
|
||||
};
|
||||
|
||||
void
|
||||
|
@@ -473,7 +473,6 @@ Struct("intel_device_info",
|
||||
Member("int", "simulator_id"),
|
||||
Member("char", "name", array="INTEL_DEVICE_MAX_NAME_SIZE"),
|
||||
Member("bool", "no_hw"),
|
||||
Member("bool", "apply_hwconfig"),
|
||||
Member("intel_device_info_mem_desc", "mem"),
|
||||
Member("intel_device_info_pat_desc", "pat"),
|
||||
Member("intel_cooperative_matrix_configuration",
|
||||
|
@@ -153,16 +153,24 @@ process_hwconfig_table(struct intel_device_info *devinfo,
|
||||
assert(current == end);
|
||||
}
|
||||
|
||||
/* If devinfo->apply_hwconfig is true, then we apply the hwconfig value.
|
||||
static inline bool
|
||||
apply_hwconfig(const struct intel_device_info *devinfo)
|
||||
{
|
||||
/* returns is true when the platform should apply hwconfig values */
|
||||
return devinfo->verx10 >= 125;
|
||||
}
|
||||
|
||||
/* If apply_hwconfig(devinfo) is true, then we apply the
|
||||
* hwconfig value.
|
||||
*
|
||||
* For debug builds, if devinfo->apply_hwconfig is false, we will compare the
|
||||
* For debug builds, if apply_hwconfig() is false, we will compare the
|
||||
* hwconfig value with the current value in the devinfo and log a warning
|
||||
* message if they differ. This should help to make sure the values in our
|
||||
* devinfo structures match what hwconfig is specified.
|
||||
*/
|
||||
#define DEVINFO_HWCONFIG(F, V) \
|
||||
do { \
|
||||
if (devinfo->apply_hwconfig) \
|
||||
if (apply_hwconfig(devinfo)) \
|
||||
devinfo->F = V; \
|
||||
else if (DEBUG_BUILD && devinfo->F != (V)) \
|
||||
mesa_logw("%s (%u) != devinfo->%s (%u)", \
|
||||
@@ -277,7 +285,7 @@ intel_hwconfig_process_table(struct intel_device_info *devinfo,
|
||||
{
|
||||
process_hwconfig_table(devinfo, data, len, apply_hwconfig_item);
|
||||
|
||||
return devinfo->apply_hwconfig;
|
||||
return apply_hwconfig(devinfo);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user