From patchwork Mon Nov 8 10:28:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 12608213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3521C433EF for ; Mon, 8 Nov 2021 10:30:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72A156124D for ; Mon, 8 Nov 2021 10:30:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 72A156124D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NnRGE0sOa7+Ra7UgwqMM85CvbDVLRXe3ZioeNT6JLdM=; b=nDAMB0jW2vb9Dl tEXQ/VAbcrJ52E+g8nFtMIk4HLzTeBmIAFUJEA+/FXCHIs5CMHelIQreVA0CzW+Evj9uCCw3ZMjJ6 pkhBy8JOIiwRSVWIPLOylMXZhI6PVtDsTLJdHPv+ZTAOEgBbj2x1vrw20rI72XYy7zL5pGaCrvS71 nESIk4VS9nMzOMyIEYPveriWPT32R7te87Bt2caNLLpW1Z0wjI9UcOEikPGI0nEatEUexD0FL+e2X TZGEyJj7ecodIgp3fH0tzVUU21P774A4KIt0fRaVFik4NM3uU6uUFJQg2bH+uH9Fq2SPsGdqZaDSw SUUPkbzE6NF4I+Wa2G8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk1u0-00G3IP-9q; Mon, 08 Nov 2021 10:29:24 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk1tZ-00G36U-Q0 for linux-arm-kernel@lists.infradead.org; Mon, 08 Nov 2021 10:28:59 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7500A21B01; Mon, 8 Nov 2021 10:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1636367328; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/iioiyH4Q966bbevxkXK56U3XXUi7baEWWvNDv45N6I=; b=y2mnRHjthYiK1CtCkk4q71zzlkNuHVsebrPumY2Fu7DDVSrRnyO5GaTNtLwTi2xWYb/BSb Rn69kVxMfbCSXHyInCxS9JxJMQIiUWfoMW5FhckULdu7fjBZqCfQJ/lUzBzsWz9gwqMxp3 lTFCBh6nknNSMYVqqqvdqFAhESuSw4Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1636367328; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/iioiyH4Q966bbevxkXK56U3XXUi7baEWWvNDv45N6I=; b=EwpwY9IHQCBU7TChVkU3KtD5D8ovEskvbAZPMYTuu+tpo3oPg6W7WVj2uxGV29yONBwiA5 uYgsfCzhBUU0XvBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1D7FC13B37; Mon, 8 Nov 2021 10:28:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Y+crBuD7iGHPHQAAMHmgww (envelope-from ); Mon, 08 Nov 2021 10:28:48 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@linux.ie, maarten.lankhorst@linux.intel.com, mripard@kernel.org, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, krzysztof.kozlowski@canonical.com, oleksandr_andrushchenko@epam.com Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, xen-devel@lists.xenproject.org, Thomas Zimmermann Subject: [RESEND PATCH 0/3] drm/{exynos, xen}: Implement gem_prime_mmap with drm_gem_prime_mmap() Date: Mon, 8 Nov 2021 11:28:43 +0100 Message-Id: <20211108102846.309-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_022858_024577_DB7B353A X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org (Resending the patchset from [1]. Most drivers have already been updated and only two drivers are left.) Replace all remaining implementations of struct drm_driver.gem_prime_mmap with use drm_gem_prime_mmap(). For each affected driver, put the mmap code into struct drm_gem_object_funcs.mmap. With the latter change in place, create struct file_operations via DEFINE_DRM_GEM_FOPS(). As next steps, drivers can be converted to use drm_gem_prime_mmap() and drm_gem_mmap() (e.g., Tegra). The default mmap code in drm_gem_prime_mmap() can be pushed into affected drivers or a helper function. The gem_prime_mmap hook can probably be removed at some point. [1] https://lore.kernel.org/dri-devel/20210609112012.10019-1-tzimmermann@suse.de/ Thomas Zimmermann (3): drm/exynox: Implement mmap as GEM object function drm/xen: Implement mmap as GEM object function drm: Update documentation and TODO of gem_prime_mmap hook Documentation/gpu/todo.rst | 11 --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 13 +-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 20 +--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 43 ++------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 5 - drivers/gpu/drm/xen/xen_drm_front.c | 16 +--- drivers/gpu/drm/xen/xen_drm_front_gem.c | 108 +++++++++------------- drivers/gpu/drm/xen/xen_drm_front_gem.h | 7 -- include/drm/drm_drv.h | 11 ++- 9 files changed, 64 insertions(+), 170 deletions(-) base-commit: 215295e7b0a3deb2015c6d6b343b319e4f6d9a1d prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 --- 2.33.1