sys/dev/drm/i915/intel_overlay.c
/* overlay needs to be enabled in OCMD reg */
overlay needs to be enabled in OCMD reg
overlay needs to be enabled in OCMD reg
static int intel_overlay_continue(struct intel_overlay *overlay,
				  bool load_polyphase_filter)
{
	struct drm_i915_private *dev_priv = overlay->i915;
	struct intel_engine_cs *engine = &dev_priv->engine[RCS];
	struct drm_i915_gem_request *req;
	u32 flip_addr = overlay->flip_addr;
	u32 tmp;
	int ret;
	WARN_ON(!overlay->active);
	if (load_polyphase_filter)
		flip_addr |= OFC_UPDATE;
	tmp = I915_READ(DOVSTA);
	if (tmp & (1 << 17))
		DRM_DEBUG("overlay underrun, DOVSTA: %x\n", tmp);
	req = i915_gem_request_alloc(engine, NULL);
	if (IS_ERR(req))
		return PTR_ERR(req);
	ret = intel_ring_begin(req, 2);
	if (ret) {
		i915_add_request_no_flush(req);
		return ret;
	}
	intel_ring_emit(engine, MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE);
	intel_ring_emit(engine, flip_addr);
	intel_ring_advance(engine);
	WARN_ON(overlay->last_flip_req);
	i915_gem_request_assign(&overlay->last_flip_req, req);
	i915_add_request(req);
	return 0;
}
static int intel_overlay_continue ( struct intel_overlay * overlay , bool load_polyphase_filter ) { struct drm_i915_private * dev_priv = overlay -> i915 ; struct intel_engine_cs * engine = & dev_priv -> engine [ RCS ] ; struct drm_i915_gem_request * req ; u32 flip_addr = overlay -> flip_addr ; u32 tmp ; int ret ; WARN_ON ( ! overlay -> active ) ; if ( load_polyphase_filter ) flip_addr |= OFC_UPDATE ; tmp = I915_READ ( DOVSTA ) ; if ( tmp & ( 1 << 17 ) ) DRM_DEBUG ( " \n " , tmp ) ; req = i915_gem_request_alloc ( engine , NULL ) ; if ( IS_ERR ( req ) ) return PTR_ERR ( req ) ; ret = intel_ring_begin ( req , 2 ) ; if ( ret ) { i915_add_request_no_flush ( req ) ; return ret ; } intel_ring_emit ( engine , MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE ) ; intel_ring_emit ( engine , flip_addr ) ; intel_ring_advance ( engine ) ; WARN_ON ( overlay -> last_flip_req ) ; i915_gem_request_assign ( & overlay -> last_flip_req , req ) ; i915_add_request ( req ) ; return 0 ; }
overlay needs to be enabled in OCMD reg
overlay needs to be enabled in OCMD reg
/* check for underruns */