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/overlay: Track current frontbuffer_bits

Store the current frontbuffer_bits in the overlay data. The
main benefit here is that we get rid of the 'crtc->pipe'
usage from intel_overlay_flip_prepare() which will have to
move to the i915 side of the parent vs. display driver split.

And since the goal is to get rid of the crtc stuff, move those
out from intel_overlay_off_tail() into intel_overlay_switch_off()
since the i915 side doesn't use those anymore, and the display
side doesn't need those anymore after that anyway.
intel_overlay_off_tail() will itself move to the i915 side of
the fence once the driver split is done.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-3-ville.syrjala@linux.intel.com

+12 -7
+12 -7
drivers/gpu/drm/i915/display/intel_overlay.c
··· 205 205 struct drm_i915_gem_object *reg_bo; 206 206 struct overlay_registers __iomem *regs; 207 207 u32 flip_addr; 208 + u32 frontbuffer_bits; 208 209 /* flip handling */ 209 210 struct i915_active last_flip; 210 211 void (*flip_complete)(struct intel_overlay *ovl); ··· 256 255 } 257 256 258 257 /* overlay needs to be disable in OCMD reg */ 259 - static int intel_overlay_on(struct intel_overlay *overlay) 258 + static int intel_overlay_on(struct intel_overlay *overlay, 259 + u32 frontbuffer_bits) 260 260 { 261 261 struct intel_display *display = overlay->display; 262 262 struct i915_request *rq; ··· 276 274 } 277 275 278 276 overlay->active = true; 277 + overlay->frontbuffer_bits = frontbuffer_bits; 279 278 280 279 if (display->platform.i830) 281 280 i830_overlay_clock_gating(display, false); ··· 296 293 struct i915_vma *vma) 297 294 { 298 295 struct intel_display *display = overlay->display; 299 - enum pipe pipe = overlay->crtc->pipe; 300 296 struct intel_frontbuffer *frontbuffer = NULL; 301 297 302 298 drm_WARN_ON(display->drm, overlay->old_vma); ··· 304 302 frontbuffer = intel_frontbuffer_get(intel_bo_to_drm_bo(vma->obj)); 305 303 306 304 intel_frontbuffer_track(overlay->frontbuffer, frontbuffer, 307 - INTEL_FRONTBUFFER_OVERLAY(pipe)); 305 + overlay->frontbuffer_bits); 308 306 309 307 if (overlay->frontbuffer) 310 308 intel_frontbuffer_put(overlay->frontbuffer); ··· 366 364 if (drm_WARN_ON(display->drm, !vma)) 367 365 return; 368 366 369 - intel_frontbuffer_flip(display, INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe)); 367 + intel_frontbuffer_flip(display, overlay->frontbuffer_bits); 370 368 371 369 i915_vma_unpin(vma); 372 370 i915_vma_put(vma); ··· 384 382 385 383 intel_overlay_release_old_vma(overlay); 386 384 387 - overlay->crtc->overlay = NULL; 388 - overlay->crtc = NULL; 389 385 overlay->active = false; 386 + overlay->frontbuffer_bits = 0; 390 387 391 388 if (display->platform.i830) 392 389 i830_overlay_clock_gating(display, true); ··· 507 506 overlay->old_yscale = 0; 508 507 overlay->crtc = NULL; 509 508 overlay->active = false; 509 + overlay->frontbuffer_bits = 0; 510 510 } 511 511 512 512 static int packed_depth_bytes(u32 format) ··· 838 836 OCONF_PIPE_A : OCONF_PIPE_B; 839 837 iowrite32(oconfig, &regs->OCONFIG); 840 838 841 - ret = intel_overlay_on(overlay); 839 + ret = intel_overlay_on(overlay, INTEL_FRONTBUFFER_OVERLAY(pipe)); 842 840 if (ret != 0) 843 841 goto out_unpin; 844 842 } ··· 925 923 return ret; 926 924 927 925 iowrite32(0, &overlay->regs->OCMD); 926 + 927 + overlay->crtc->overlay = NULL; 928 + overlay->crtc = NULL; 928 929 929 930 return intel_overlay_off(overlay); 930 931 }