/* Sanity check against expected versions from device info */ if (IP_VER(ip->ver, ip->rel) < IP_VER(expected_ver, expected_rel))
drm_dbg(&i915->drm, "Hardware reports GMD IP version %u.%u (REG[0x%x] = 0x%08x) but minimum expected is %u.%u\n",
ip->ver, ip->rel, offset, val, expected_ver, expected_rel);
}
/* * Setup the graphics version for the current device. This must be done before * any code that performs checks on GRAPHICS_VER or DISPLAY_VER, so this * function should be called very early in the driver initialization sequence. * * Regular MMIO access is not yet setup at the point this function is called so * we peek at the appropriate MMIO offset directly. The GMD_ID register is * part of an 'always on' power well by design, so we don't need to worry about * forcewake while reading it.
*/ staticvoid intel_ipver_early_init(struct drm_i915_private *i915)
{ struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
if (!HAS_GMD_ID(i915)) {
drm_WARN_ON(&i915->drm, RUNTIME_INFO(i915)->graphics.ip.ver > 12); /* * On older platforms, graphics and media share the same ip * version and release.
*/
RUNTIME_INFO(i915)->media.ip =
RUNTIME_INFO(i915)->graphics.ip; return;
}
/** * intel_device_info_runtime_init_early - initialize early runtime info * @i915: the i915 device * * Determine early intel_device_info fields at runtime. This function needs * to be called before the MMIO has been setup.
*/ void intel_device_info_runtime_init_early(struct drm_i915_private *i915)
{
intel_ipver_early_init(i915);
intel_device_info_subplatform_init(i915);
}
/** * intel_device_info_runtime_init - initialize runtime info * @dev_priv: the i915 device * * Determine various intel_device_info fields at runtime. * * Use it when either: * - it's judged too laborious to fill n static structures with the limit * when a simple if statement does the job, * - run-time checks (eg read fuse/strap registers) are needed. * * This function needs to be called: * - after the MMIO has been setup as we are reading registers, * - after the PCH has been detected, * - before the first usage of the fields it can tweak.
*/ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
{ struct intel_runtime_info *runtime = RUNTIME_INFO(dev_priv);
if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
drm_info(&dev_priv->drm, "Disabling ppGTT for VT-d support\n");
runtime->ppgtt_type = INTEL_PPGTT_NONE;
}
}
/* * Set up device info and initial runtime info at driver create. * * Note: i915 is only an allocated blob of memory at this point.
*/ void intel_device_info_driver_create(struct drm_i915_private *i915,
u16 device_id, conststruct intel_device_info *match_info)
{ struct intel_runtime_info *runtime;
/* Initialize initial runtime info from static const data and pdev. */
runtime = RUNTIME_INFO(i915);
memcpy(runtime, &INTEL_INFO(i915)->__runtime, sizeof(*runtime));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.