mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 14:00:16 +01:00
i965: Fix eu/subslice warning
Older gen platforms do not actually return a value for sublice and eu total (IMO, confusingly) they return -ENODEV. This patch defers the SSEU setup until we have the actual GPU generation to avoid useless warnings when running on older platforms with older kernels. Reported-by: Mark Janes <mark.a.janes@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
4213b00e30
commit
cc01b63d73
1 changed files with 23 additions and 11 deletions
|
|
@ -1081,13 +1081,21 @@ intelDestroyBuffer(__DRIdrawable * driDrawPriv)
|
|||
static void
|
||||
intel_detect_sseu(struct intel_screen *intelScreen)
|
||||
{
|
||||
assert(intelScreen->devinfo->gen >= 8);
|
||||
int ret;
|
||||
|
||||
intelScreen->subslice_total = -1;
|
||||
intelScreen->eu_total = -1;
|
||||
|
||||
intel_get_param(intelScreen->driScrnPriv, I915_PARAM_SUBSLICE_TOTAL,
|
||||
&intelScreen->subslice_total);
|
||||
intel_get_param(intelScreen->driScrnPriv,
|
||||
I915_PARAM_EU_TOTAL, &intelScreen->eu_total);
|
||||
ret = intel_get_param(intelScreen->driScrnPriv, I915_PARAM_SUBSLICE_TOTAL,
|
||||
&intelScreen->subslice_total);
|
||||
if (ret != -EINVAL)
|
||||
goto err_out;
|
||||
|
||||
ret = intel_get_param(intelScreen->driScrnPriv,
|
||||
I915_PARAM_EU_TOTAL, &intelScreen->eu_total);
|
||||
if (ret != -EINVAL)
|
||||
goto err_out;
|
||||
|
||||
/* Without this information, we cannot get the right Braswell brandstrings,
|
||||
* and we have to use conservative numbers for GPGPU on many platforms, but
|
||||
|
|
@ -1096,13 +1104,19 @@ intel_detect_sseu(struct intel_screen *intelScreen)
|
|||
if (intelScreen->subslice_total == -1 || intelScreen->eu_total == -1)
|
||||
_mesa_warning(NULL,
|
||||
"Kernel 4.1 required to properly query GPU properties.\n");
|
||||
|
||||
return;
|
||||
|
||||
err_out:
|
||||
intelScreen->subslice_total = -1;
|
||||
intelScreen->eu_total = -1;
|
||||
_mesa_warning(NULL, "Failed to query GPU properties.\n");
|
||||
}
|
||||
|
||||
static bool
|
||||
intel_init_bufmgr(struct intel_screen *intelScreen)
|
||||
{
|
||||
__DRIscreen *spriv = intelScreen->driScrnPriv;
|
||||
bool devid_override = getenv("INTEL_DEVID_OVERRIDE") != NULL;
|
||||
|
||||
intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL;
|
||||
|
||||
|
|
@ -1120,12 +1134,6 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Everything below this is for real hardware only */
|
||||
if (intelScreen->no_hw || devid_override)
|
||||
return true;
|
||||
|
||||
intel_detect_sseu(intelScreen);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1480,6 +1488,10 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
|
|||
intelScreen->hw_has_swizzling = intel_detect_swizzling(intelScreen);
|
||||
intelScreen->hw_has_timestamp = intel_detect_timestamp(intelScreen);
|
||||
|
||||
/* GENs prior to 8 do not support EU/Subslice info */
|
||||
if (intelScreen->devinfo->gen >= 8)
|
||||
intel_detect_sseu(intelScreen);
|
||||
|
||||
const char *force_msaa = getenv("INTEL_FORCE_MSAA");
|
||||
if (force_msaa) {
|
||||
intelScreen->winsys_msaa_samples_override =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue