From patchwork Thu May 16 14:14:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10947457 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 77B911398 for ; Fri, 17 May 2019 07:55:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AB53201CB for ; Fri, 17 May 2019 07:55:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E70E2237D; Fri, 17 May 2019 07:55:10 +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 1A190201CB for ; Fri, 17 May 2019 07:55:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADDD9898BC; Fri, 17 May 2019 07:54:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by gabe.freedesktop.org (Postfix) with ESMTP id C060A894C0 for ; Thu, 16 May 2019 14:14:58 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D5D51715; Thu, 16 May 2019 07:14:58 -0700 (PDT) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 86ED53F71E; Thu, 16 May 2019 07:14:55 -0700 (PDT) From: Steven Price To: Daniel Vetter , Rob Herring , Tomeu Vizoso Subject: [PATCH v2 0/3] drm/panfrost: drm_gem_map_offset() helper Date: Thu, 16 May 2019 15:14:44 +0100 Message-Id: <20190516141447.46839-1-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 17 May 2019 07:54:52 +0000 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: David Airlie , Seung-Woo Kim , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Maxime Ripard , Kyungmin Park , Kukjin Kim , dri-devel@lists.freedesktop.org, Steven Price , Sean Paul , Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Panfrost has a re-implementation of drm_gem_dumb_map_offset() with an extra bug regarding the handling of imported buffers. However we don't really want Panfrost calling _dumb functions because it's not a KMS driver. This series renames drm_gem_dumb_map_offset() to drop the '_dumb' and introduces a shmem helper to wrap it. This means that the shmem implementation can be kept in sync with the semantics the drm_gem_shmem_mmap() callback provides. v1: https://lore.kernel.org/lkml/20190513143244.16478-1-steven.price@arm.com/ Changes since v1: * Rename drm_gem_dumb_map_offset to drop _dumb * Add a shmem helper Steven Price (3): drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset() drm: shmem: Add drm_gem_shmem_map_offset() wrapper drm/panfrost: Use drm_gem_shmem_map_offset() drivers/gpu/drm/drm_dumb_buffers.c | 4 ++-- drivers/gpu/drm/drm_gem.c | 6 +++--- drivers/gpu/drm/drm_gem_shmem_helper.c | 20 ++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 +-- drivers/gpu/drm/panfrost/panfrost_drv.c | 16 ++-------------- include/drm/drm_gem.h | 4 ++-- include/drm/drm_gem_shmem_helper.h | 2 ++ 7 files changed, 32 insertions(+), 23 deletions(-)