From f3c326e3a15df2b1d8e0387ab634ec29dafd7707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Fri, 22 Feb 2013 12:13:28 +0200 Subject: gralloc: change copy api and fix copy function for intel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch extends current copy api, renames it blit and introduces src+dst coordinates to be able to implement partial blits and blits with offsets. Implementation must take care of hw specific restrictions with blits. Patch also fixes issues with the current intel_blit function. Current implementation does not select ring buffer and ends up queuing blit commands to the render ring. Patch starts to use drm_intel_bo_mrb_exec to be able to select blit ring and fixes the checks inside copy function. Change-Id: I05905e0b9c48fc2a55230212b676bfb8813a2b55 Signed-off-by: Tapani Pälli --- gralloc_drm_kms.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gralloc_drm_kms.c') diff --git a/gralloc_drm_kms.c b/gralloc_drm_kms.c index 91e7e63..7c7a903 100644 --- a/gralloc_drm_kms.c +++ b/gralloc_drm_kms.c @@ -309,7 +309,10 @@ int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo) dst = (drm->next_front) ? drm->next_front : drm->current_front; - drm->drv->copy(drm->drv, dst, bo, 0, 0, + drm->drv->blit(drm->drv, dst, bo, 0, 0, + bo->handle->width, + bo->handle->height, + 0, 0, bo->handle->width, bo->handle->height); bo = dst; @@ -349,9 +352,12 @@ int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo) break; case DRM_SWAP_COPY: drm_kms_wait_for_post(drm, 0); - drm->drv->copy(drm->drv, drm->current_front, + drm->drv->blit(drm->drv, drm->current_front, bo, 0, 0, bo->handle->width, + bo->handle->height, + 0, 0, + bo->handle->width, bo->handle->height); if (drm->mode_quirk_vmwgfx) ret = drmModeDirtyFB(drm->fd, drm->current_front->fb_id, &drm->clip, 1); -- cgit v1.1