mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
drm/i915/overlay: Relocate the underrun check
Move the underrun check out from intel_overlay_continue() so that the DOVSTA register access can stay on the display side of the parent vs. display driver split. 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-6-ville.syrjala@linux.intel.com
This commit is contained in:
parent
7e3517dfb6
commit
6daf9a495c
|
|
@ -331,18 +331,13 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
|
|||
struct intel_display *display = overlay->display;
|
||||
struct i915_request *rq;
|
||||
u32 flip_addr = overlay->flip_addr;
|
||||
u32 tmp, *cs;
|
||||
u32 *cs;
|
||||
|
||||
drm_WARN_ON(display->drm, !i915_overlay_is_active(display->drm));
|
||||
|
||||
if (load_polyphase_filter)
|
||||
flip_addr |= OFC_UPDATE;
|
||||
|
||||
/* check for underruns */
|
||||
tmp = intel_de_read(display, DOVSTA);
|
||||
if (tmp & (1 << 17))
|
||||
drm_dbg(display->drm, "overlay underrun, DOVSTA: %x\n", tmp);
|
||||
|
||||
rq = alloc_request(overlay, NULL);
|
||||
if (IS_ERR(rq))
|
||||
return PTR_ERR(rq);
|
||||
|
|
@ -810,6 +805,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
|
|||
bool scale_changed = false;
|
||||
struct i915_vma *vma;
|
||||
int ret, tmp_width;
|
||||
u32 tmp;
|
||||
|
||||
drm_WARN_ON(display->drm,
|
||||
!drm_modeset_is_locked(&display->drm->mode_config.connection_mutex));
|
||||
|
|
@ -895,6 +891,11 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
|
|||
|
||||
iowrite32(overlay_cmd_reg(params), ®s->OCMD);
|
||||
|
||||
/* check for underruns */
|
||||
tmp = intel_de_read(display, DOVSTA);
|
||||
if (tmp & (1 << 17))
|
||||
drm_dbg(display->drm, "overlay underrun, DOVSTA: %x\n", tmp);
|
||||
|
||||
ret = intel_overlay_continue(overlay, vma, scale_changed);
|
||||
if (ret)
|
||||
goto out_unpin;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user