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 @@ -1648,15 +1648,34 @@ create_scratch(struct i915_address_space *vm, int count)
1648
1648
return ERR_PTR (err );
1649
1649
}
1650
1650
1651
+ static const struct {
1652
+ u32 start ;
1653
+ u32 end ;
1654
+ } mcr_ranges_gen8 [] = {
1655
+ { .start = 0x5500 , .end = 0x55ff },
1656
+ { .start = 0x7000 , .end = 0x7fff },
1657
+ { .start = 0x9400 , .end = 0x97ff },
1658
+ { .start = 0xb000 , .end = 0xb3ff },
1659
+ { .start = 0xe000 , .end = 0xe7ff },
1660
+ {},
1661
+ };
1662
+
1651
1663
static bool mcr_range (struct drm_i915_private * i915 , u32 offset )
1652
1664
{
1665
+ int i ;
1666
+
1667
+ if (INTEL_GEN (i915 ) < 8 )
1668
+ return false;
1669
+
1653
1670
/*
1654
- * Registers in this range are affected by the MCR selector
1671
+ * Registers in these ranges are affected by the MCR selector
1655
1672
* which only controls CPU initiated MMIO. Routing does not
1656
1673
* work for CS access so we cannot verify them on this path.
1657
1674
*/
1658
- if (INTEL_GEN (i915 ) >= 8 && (offset >= 0xb000 && offset <= 0xb4ff ))
1659
- return true;
1675
+ for (i = 0 ; mcr_ranges_gen8 [i ].start ; i ++ )
1676
+ if (offset >= mcr_ranges_gen8 [i ].start &&
1677
+ offset <= mcr_ranges_gen8 [i ].end )
1678
+ return true;
1660
1679
1661
1680
return false;
1662
1681
}
You can’t perform that action at this time.
0 commit comments