Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: Move the intel_dpt_offset() check into intel_plane_pin_fb()

Now that we handle all the other vma offset stuff in
intel_plane_pin_fb() it seems more proper to do the
dpt_vma offset check there as well.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250717171353.23090-4-ville.syrjala@linux.intel.com

+7 -6
+7
drivers/gpu/drm/i915/display/intel_fb_pin.c
··· 261 261 int intel_plane_pin_fb(struct intel_plane_state *plane_state, 262 262 const struct intel_plane_state *old_plane_state) 263 263 { 264 + struct intel_display *display = to_intel_display(plane_state); 264 265 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); 265 266 const struct intel_framebuffer *fb = 266 267 to_intel_framebuffer(plane_state->hw.fb); ··· 300 299 plane_state->dpt_vma = vma; 301 300 302 301 WARN_ON(plane_state->ggtt_vma == plane_state->dpt_vma); 302 + 303 + /* 304 + * The DPT object contains only one vma, so 305 + * the VMA's offset within the DPT is always 0. 306 + */ 307 + drm_WARN_ON(display->drm, intel_dpt_offset(plane_state->dpt_vma)); 303 308 } 304 309 305 310 /*
-6
drivers/gpu/drm/i915/display/skl_universal_plane.c
··· 1271 1271 u32 offset = plane_state->view.color_plane[color_plane].offset; 1272 1272 1273 1273 if (intel_fb_uses_dpt(fb)) { 1274 - /* 1275 - * The DPT object contains only one vma, so the VMA's offset 1276 - * within the DPT is always 0. 1277 - */ 1278 - drm_WARN_ON(display->drm, plane_state->dpt_vma && 1279 - intel_dpt_offset(plane_state->dpt_vma)); 1280 1274 drm_WARN_ON(display->drm, offset & 0x1fffff); 1281 1275 return offset >> 9; 1282 1276 } else {