summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-08-13 00:16:21 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-08-13 00:16:21 +0000
commitdf8a9411eabc174c6f93246b315ddf5ccfbc9692 (patch)
tree0d022e89d53d920b0fc657f3ffa20ef6382bd011 /sys
parentbe9640b0e2660141d7b4ee5eadffdb3503d06b52 (diff)
drm/i915: s/phys_base/dma_addr/
From Ville Syrjala 27fbcaf7ca2470dbc112a5ea2759ad6408581c79 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/display/intel_plane_initial.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_plane_initial.c b/sys/dev/pci/drm/i915/display/intel_plane_initial.c
index dd35ae176e6..07ae3e0d5a8 100644
--- a/sys/dev/pci/drm/i915/display/intel_plane_initial.c
+++ b/sys/dev/pci/drm/i915/display/intel_plane_initial.c
@@ -60,6 +60,7 @@ initial_plane_vma(struct drm_i915_private *i915,
base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915)) {
gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
+ dma_addr_t dma_addr;
gen8_pte_t pte;
gte += base / I915_GTT_PAGE_SIZE;
@@ -71,7 +72,7 @@ initial_plane_vma(struct drm_i915_private *i915,
return NULL;
}
- phys_base = pte & GEN12_GGTT_PTE_ADDR_MASK;
+ dma_addr = pte & GEN12_GGTT_PTE_ADDR_MASK;
if (IS_DGFX(i915))
mem = i915->mm.regions[INTEL_REGION_LMEM_0];
@@ -87,18 +88,18 @@ initial_plane_vma(struct drm_i915_private *i915,
* On lmem we don't currently expect this to
* ever be placed in the stolen portion.
*/
- if (phys_base < mem->region.start || phys_base > mem->region.end) {
+ if (dma_addr < mem->region.start || dma_addr > mem->region.end) {
drm_err(&i915->drm,
- "Initial plane programming using invalid range, phys_base=%pa (%s [%pa-%pa])\n",
- &phys_base, mem->region.name, &mem->region.start, &mem->region.end);
+ "Initial plane programming using invalid range, dma_addr=%pa (%s [%pa-%pa])\n",
+ &dma_addr, mem->region.name, &mem->region.start, &mem->region.end);
return NULL;
}
drm_dbg(&i915->drm,
- "Using phys_base=%pa, based on initial plane programming\n",
- &phys_base);
+ "Using dma_addr=%pa, based on initial plane programming\n",
+ &dma_addr);
- phys_base -= mem->region.start;
+ phys_base = dma_addr - mem->region.start;
} else {
phys_base = base;
mem = i915->mm.stolen_region;