diff options
author | Matthew Auld <matthew.auld@intel.com> | 2023-01-27 16:03:21 +0000 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2023-02-24 11:37:57 +0000 |
commit | 957565a473a630a3d01932c7173860b33e7acdbd (patch) | |
tree | 92b3c945f2bc733d56bc2a31dcd31f6755d853d1 /drivers | |
parent | 65c08339db1ada87afd6cfe7db8e60bb4851d919 (diff) | |
download | linux-stable-957565a473a630a3d01932c7173860b33e7acdbd.tar.gz linux-stable-957565a473a630a3d01932c7173860b33e7acdbd.tar.bz2 linux-stable-957565a473a630a3d01932c7173860b33e7acdbd.zip |
drm/i915: probe lmem before the stolen portion
At the very least, we have some tests that force the BAR size for
testing purposes, which would result in different BAR size with
stolen-lmem vs normal lmem, since the BAR is only resized as part of the
normal lmem probing.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230127160321.374350-1-matthew.auld@intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_driver.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index c1e427ba57ae..19983b77118d 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -624,13 +624,17 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv) if (ret) goto err_ggtt; - ret = intel_memory_regions_hw_probe(dev_priv); + /* + * Make sure we probe lmem before we probe stolen-lmem. The BAR size + * might be different due to bar resizing. + */ + ret = intel_gt_tiles_init(dev_priv); if (ret) goto err_ggtt; - ret = intel_gt_tiles_init(dev_priv); + ret = intel_memory_regions_hw_probe(dev_priv); if (ret) - goto err_mem_regions; + goto err_ggtt; ret = i915_ggtt_enable_hw(dev_priv); if (ret) { |