File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -1529,15 +1529,34 @@ create_scratch(struct i915_address_space *vm, int count)
1529
1529
return ERR_PTR (err );
1530
1530
}
1531
1531
1532
+ static const struct {
1533
+ u32 start ;
1534
+ u32 end ;
1535
+ } mcr_ranges_gen8 [] = {
1536
+ { .start = 0x5500 , .end = 0x55ff },
1537
+ { .start = 0x7000 , .end = 0x7fff },
1538
+ { .start = 0x9400 , .end = 0x97ff },
1539
+ { .start = 0xb000 , .end = 0xb3ff },
1540
+ { .start = 0xe000 , .end = 0xe7ff },
1541
+ {},
1542
+ };
1543
+
1532
1544
static bool mcr_range (struct drm_i915_private * i915 , u32 offset )
1533
1545
{
1546
+ int i ;
1547
+
1548
+ if (INTEL_GEN (i915 ) < 8 )
1549
+ return false;
1550
+
1534
1551
/*
1535
- * Registers in this range are affected by the MCR selector
1552
+ * Registers in these ranges are affected by the MCR selector
1536
1553
* which only controls CPU initiated MMIO. Routing does not
1537
1554
* work for CS access so we cannot verify them on this path.
1538
1555
*/
1539
- if (INTEL_GEN (i915 ) >= 8 && (offset >= 0xb000 && offset <= 0xb4ff ))
1540
- return true;
1556
+ for (i = 0 ; mcr_ranges_gen8 [i ].start ; i ++ )
1557
+ if (offset >= mcr_ranges_gen8 [i ].start &&
1558
+ offset <= mcr_ranges_gen8 [i ].end )
1559
+ return true;
1541
1560
1542
1561
return false;
1543
1562
}
You can’t perform that action at this time.
0 commit comments