From patchwork Thu Jul 25 17:19:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11059365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 458BA746 for ; Thu, 25 Jul 2019 17:19:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2858E28A14 for ; Thu, 25 Jul 2019 17:19:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19FE628A16; Thu, 25 Jul 2019 17:19:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0639128A14 for ; Thu, 25 Jul 2019 17:19:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EFCF6E7BD; Thu, 25 Jul 2019 17:19:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0365C6E7BD for ; Thu, 25 Jul 2019 17:19:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 62B29AFDB; Thu, 25 Jul 2019 17:19:35 +0000 (UTC) From: Thomas Zimmermann To: daniel@ffwll.ch, kraxel@redhat.com, sam@ravnborg.org, airlied@redhat.com, yc_chen@aspeedtech.com, Christian.Koenig@amd.com Subject: [PATCH v2 0/3] Provide vmap/vunmap for VRAM helpers Date: Thu, 25 Jul 2019 19:19:29 +0200 Message-Id: <20190725171932.31189-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The vmap operation is pin+kmap, as already implemented for PRIME support. The vunmap operation is the inverse. This patch set makes both available for drivers that use VRAM helpers, and replaces the respective code in ast and mgag200. v2: * fix documentation * add cross references to function documentation * document (the lack of) ref-counting for GEM VRAM BO mappings Thomas Zimmermann (3): drm/vram: Provide vmap and vunmap operations for GEM VRAM objects drm/ast: Use drm_gem_vram_{vmap,vunmap}() to map cursor source BO drm/mgag200: Use drm_gem_vram_{vmap,vunmap}() to map cursor source BO drivers/gpu/drm/ast/ast_mode.c | 21 +++----- drivers/gpu/drm/drm_gem_vram_helper.c | 63 ++++++++++++++++++++---- drivers/gpu/drm/mgag200/mgag200_cursor.c | 22 +++------ include/drm/drm_gem_vram_helper.h | 13 +++++ 4 files changed, 80 insertions(+), 39 deletions(-) --- 2.22.0