From patchwork Wed Dec 9 14:25:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 340639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 191E5C4167B for ; Wed, 9 Dec 2020 14:26:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E79F122A99 for ; Wed, 9 Dec 2020 14:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732954AbgLIO02 (ORCPT ); Wed, 9 Dec 2020 09:26:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:39592 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732951AbgLIO0M (ORCPT ); Wed, 9 Dec 2020 09:26:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 31844AD5C; Wed, 9 Dec 2020 14:25:31 +0000 (UTC) From: Thomas Zimmermann To: daniel@ffwll.ch, christian.koenig@amd.com, airlied@linux.ie, sumit.semwal@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, kraxel@redhat.com, hdegoede@redhat.com, sean@poorly.run, eric@anholt.net, sam@ravnborg.org Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, virtualization@lists.linux-foundation.org, Thomas Zimmermann Subject: [PATCH v3 1/8] drm/ast: Don't pin cursor source BO explicitly during update Date: Wed, 9 Dec 2020 15:25:20 +0100 Message-Id: <20201209142527.26415-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201209142527.26415-1-tzimmermann@suse.de> References: <20201209142527.26415-1-tzimmermann@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Vmapping the cursor source BO contains an implicit pin operation, so there's no need to do this manually. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_cursor.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_cursor.c b/drivers/gpu/drm/ast/ast_cursor.c index 742d43a7edf4..68bf3d33f1ed 100644 --- a/drivers/gpu/drm/ast/ast_cursor.c +++ b/drivers/gpu/drm/ast/ast_cursor.c @@ -180,12 +180,9 @@ int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb) gbo = drm_gem_vram_of_gem(fb->obj[0]); - ret = drm_gem_vram_pin(gbo, 0); - if (ret) - return ret; ret = drm_gem_vram_vmap(gbo, &map); if (ret) - goto err_drm_gem_vram_unpin; + return ret; src = map.vaddr; /* TODO: Use mapping abstraction properly */ dst = ast->cursor.map[ast->cursor.next_index].vaddr_iomem; @@ -194,13 +191,8 @@ int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb) update_cursor_image(dst, src, fb->width, fb->height); drm_gem_vram_vunmap(gbo, &map); - drm_gem_vram_unpin(gbo); return 0; - -err_drm_gem_vram_unpin: - drm_gem_vram_unpin(gbo); - return ret; } static void ast_cursor_set_base(struct ast_private *ast, u64 address)