mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 06:10:13 +01:00
intel/dev: Handle BSW naming issues
Braswell, a particular Cherryview variant, is especially strange. We can't even get the chip name from the PCI ID and instead have to look at fusing information to decide if it's a 400 or a 405. Pull that into the common code as well. This fixes BSW naming on ANV and crocus. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11861>
This commit is contained in:
parent
56d70ba686
commit
915e5a8cc3
4 changed files with 18 additions and 26 deletions
|
|
@ -1433,6 +1433,24 @@ fixup_chv_device_info(struct intel_device_info *devinfo)
|
|||
assert(max_cs_threads >= devinfo->max_cs_threads);
|
||||
if (max_cs_threads > devinfo->max_cs_threads)
|
||||
devinfo->max_cs_threads = max_cs_threads;
|
||||
|
||||
/* Braswell is even more annoying. Its marketing name isn't determinable
|
||||
* from the PCI ID and is also dependent on fusing.
|
||||
*/
|
||||
if (devinfo->chipset_id != 0x22B1)
|
||||
return;
|
||||
|
||||
char *bsw_model;
|
||||
switch (eu_total) {
|
||||
case 16: bsw_model = "405"; break;
|
||||
case 12: bsw_model = "400"; break;
|
||||
default: bsw_model = " "; break;
|
||||
}
|
||||
|
||||
char *needle = strstr(devinfo->name, "XXX");
|
||||
assert(needle);
|
||||
if (needle)
|
||||
memcpy(needle, bsw_model, 3);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -89,19 +89,6 @@
|
|||
|
||||
const char *const brw_vendor_string = "Intel Open Source Technology Center";
|
||||
|
||||
static const char *
|
||||
get_bsw_model(const struct brw_screen *screen)
|
||||
{
|
||||
switch (screen->eu_total) {
|
||||
case 16:
|
||||
return "405";
|
||||
case 12:
|
||||
return "400";
|
||||
default:
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
brw_get_renderer_string(const struct brw_screen *screen)
|
||||
{
|
||||
|
|
@ -113,13 +100,6 @@ brw_get_renderer_string(const struct brw_screen *screen)
|
|||
|
||||
snprintf(buf, sizeof(buf), "Mesa DRI %s", name);
|
||||
|
||||
/* Braswell branding is funny, so we have to fix it up here */
|
||||
if (screen->deviceID == 0x22B1) {
|
||||
char *needle = strstr(buf, "XXX");
|
||||
if (needle)
|
||||
memcpy(needle, get_bsw_model(screen), 3);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2618,7 +2618,6 @@ __DRIconfig **brw_init_screen(__DRIscreen *dri_screen)
|
|||
|
||||
/* GENs prior to 8 do not support EU/Subslice info */
|
||||
screen->subslice_total = intel_device_info_subslice_total(devinfo);
|
||||
screen->eu_total = intel_device_info_eu_total(devinfo);
|
||||
|
||||
/* Gfx7-7.5 kernel requirements / command parser saga:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -113,11 +113,6 @@ struct brw_screen
|
|||
*/
|
||||
int subslice_total;
|
||||
|
||||
/**
|
||||
* Number of EUs reported by the I915_PARAM_EU_TOTAL parameter
|
||||
*/
|
||||
int eu_total;
|
||||
|
||||
bool mesa_format_supports_texture[MESA_FORMAT_COUNT];
|
||||
bool mesa_format_supports_render[MESA_FORMAT_COUNT];
|
||||
enum isl_format mesa_to_isl_render_format[MESA_FORMAT_COUNT];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue