* We don't currently expect this to ever be placed in the
* stolen portion.
*/
- if (phys_base >= resource_size(&mem->region)) {
+ if (phys_base < mem->region.start || phys_base > mem->region.end) {
drm_err(&i915->drm,
- "Initial plane programming using invalid range, phys_base=%pa\n",
- &phys_base);
+ "Initial plane programming using invalid range, phys_base=%pa (%s [%pa-%pa])\n",
+ &phys_base, 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);
+
+ phys_base -= mem->region.start;
} else {
phys_base = base;
mem = i915->mm.stolen_region;