Subversion Repositories Kolibri OS

Rev

Rev 3480 | Rev 4389 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3480 Rev 4104
Line 361... Line 361...
361
	iounmap(intel_private.registers);
361
	iounmap(intel_private.registers);
Line 362... Line 362...
362
 
362
 
363
	intel_gtt_teardown_scratch_page();
363
	intel_gtt_teardown_scratch_page();
Line -... Line 364...
-
 
364
}
-
 
365
 
-
 
366
/* Certain Gen5 chipsets require require idling the GPU before
-
 
367
 * unmapping anything from the GTT when VT-d is enabled.
-
 
368
 */
-
 
369
static inline int needs_ilk_vtd_wa(void)
-
 
370
{
-
 
371
#ifdef CONFIG_INTEL_IOMMU
-
 
372
	const unsigned short gpu_devid = intel_private.pcidev->device;
-
 
373
 
-
 
374
	/* Query intel_iommu to see if we need the workaround. Presumably that
-
 
375
	 * was loaded first.
-
 
376
	 */
-
 
377
	if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB ||
-
 
378
	     gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
-
 
379
	     intel_iommu_gfx_mapped)
-
 
380
		return 1;
-
 
381
#endif
-
 
382
	return 0;
-
 
383
}
-
 
384
 
-
 
385
static bool intel_gtt_can_wc(void)
-
 
386
{
-
 
387
	if (INTEL_GTT_GEN <= 2)
-
 
388
		return false;
-
 
389
 
-
 
390
	if (INTEL_GTT_GEN >= 6)
-
 
391
		return false;
-
 
392
 
-
 
393
	/* Reports of major corruption with ILK vt'd enabled */
-
 
394
	if (needs_ilk_vtd_wa())
-
 
395
		return false;
-
 
396
 
-
 
397
	return true;
364
}
398
}
365
 
399
 
366
static int intel_gtt_init(void)
400
static int intel_gtt_init(void)
367
{
401
{
368
	u32 gma_addr;
402
	u32 gma_addr;