From mboxrd@z Thu Jan 1 00:00:00 1970 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 8B653C433F5 for ; Wed, 10 Nov 2021 10:48:21 +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 4F51761077 for ; Wed, 10 Nov 2021 10:48:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4F51761077 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0cr5dXi+QJ5Jh7CpXgpaX68/QPQR63qkp7BoczNUlGk=; b=oXHuu9Fyc0RBWs /hZpgJ5rPmDxAvKUWlFebhW1GpbCmyxh/+ZkXPfyK0SFuChecI7za3eRCXKWgMhgUmRH9QRfPfWYc rSekbxdTtHBrYdWUSxRWbXrWSiCOpeC3s6KfY6nnB+5AgpoaUq2kT7bAZQ0zrKMqTb6Q/W+pVU2EP Ii8cbVWHsxjH3szB3jboRHc6wac3EU4JMnwPvK910llA5nHa0csM+5zWS4SScSJKYlGEo7MJzwAvV ZJdFNVw4DCL/r/cUb940RiU87A9WGzTpBmAbL1r1zkK/Rb3kV/Dy/DLvShIyRIyvZoRffug9hMUaz OQUZT3knOeMPLhpgVmtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkl86-005B0A-Di; Wed, 10 Nov 2021 10:46:58 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkl81-005AxM-1o for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 10:46:54 +0000 Received: by mail-ed1-x52c.google.com with SMTP id z21so8758120edb.5 for ; Wed, 10 Nov 2021 02:46:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CJ8BKvr5XUSO/Vo4sS7QvREYUZiUN+4dM8bteUPX/YU=; b=a5PDaYRSHhLE0B/0FQ+MlW7rePX4lX8rMFt04k9jy714oeV6rCydngg+4chiEab4BB 0et1lR5054ugeHjiqzoRhGkDg1UoJWAzmwRFvIlBA+ugUkN39qs5cm5is5LIv5WH2xEf oEhqQbxoFXx4fNzwMrzHIsDeA0puwKDSYP3nc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CJ8BKvr5XUSO/Vo4sS7QvREYUZiUN+4dM8bteUPX/YU=; b=qfgeNuMkdIsG0DDmZR9e0RQlyuUSvzMx6wa+AUBnhPvO9TiUdZkzMB0SenXbV5ZBiL kIkzs+GKkVq86aUNj0InPj8s2qvlegF1g9D69Uh18tFwmgQ8HWubJZQbVSKX2UcHuULg lu3ob4wf/U9YsqsbmlxHRA68cgJuxTugnALGAjKp6wlHRhbNiVjCk+Da0g5zm7UV38Gb yus6DL5wQslGTk7/3vZ5Zo6V1fYjJzJgMFC+ypXzdHI0kXVietjC1GV+0MuQb6asDy0E /0NvX6oXKX5POI6P9ktRReKnWCmDyvx7h1emf3JW/QCLKttGHhzbjzZ+4Lp+qcCGxzSL KpPA== X-Gm-Message-State: AOAM531+30AGVWYWrzFZ09tKp1FuSWTkR6/IfUqsJHd98dG7NmVPACdy MErOz8GcwZoyEtFtKz1rD0m7ag== X-Google-Smtp-Source: ABdhPJzex3EJLJxKesbpcXVhuXhXz8mKsgkAvORtmUcskNu2IAPYg8LWXRVSpkQDC+igoNaKseVJbA== X-Received: by 2002:aa7:d546:: with SMTP id u6mr20545346edr.311.1636541210512; Wed, 10 Nov 2021 02:46:50 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z10sm14094307edd.12.2021.11.10.02.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 02:46:50 -0800 (PST) Date: Wed, 10 Nov 2021 11:46:48 +0100 From: Daniel Vetter To: Thomas Zimmermann Cc: 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, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH 3/3] drm: Update documentation and TODO of gem_prime_mmap hook Message-ID: References: <20211108102846.309-1-tzimmermann@suse.de> <20211108102846.309-4-tzimmermann@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211108102846.309-4-tzimmermann@suse.de> X-Operating-System: Linux phenom 5.10.0-8-amd64 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_024653_146658_13649E9C X-CRM114-Status: GOOD ( 22.74 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 08, 2021 at 11:28:46AM +0100, Thomas Zimmermann wrote: > The hook gem_prime_mmap in struct drm_driver is deprecated. Document > the new requirements. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter > --- > Documentation/gpu/todo.rst | 11 ----------- > include/drm/drm_drv.h | 11 +++++++---- > 2 files changed, 7 insertions(+), 15 deletions(-) > > diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst > index 60d1d7ee0719..6593c4c4006e 100644 > --- a/Documentation/gpu/todo.rst > +++ b/Documentation/gpu/todo.rst > @@ -268,17 +268,6 @@ Contact: Daniel Vetter > > Level: Intermediate > > -Clean up mmap forwarding > ------------------------- > - > -A lot of drivers forward gem mmap calls to dma-buf mmap for imported buffers. > -And also a lot of them forward dma-buf mmap to the gem mmap implementations. > -There's drm_gem_prime_mmap() for this now, but still needs to be rolled out. > - > -Contact: Daniel Vetter > - > -Level: Intermediate > - > Generic fbdev defio support > --------------------------- > > diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h > index 0cd95953cdf5..a84eb4028e5b 100644 > --- a/include/drm/drm_drv.h > +++ b/include/drm/drm_drv.h > @@ -345,11 +345,14 @@ struct drm_driver { > * mmap hook for GEM drivers, used to implement dma-buf mmap in the > * PRIME helpers. > * > - * FIXME: There's way too much duplication going on here, and also moved > - * to &drm_gem_object_funcs. > + * This hook only exists for historical reasons. Drivers must use > + * drm_gem_prime_mmap() to implement it. > + * > + * FIXME: Convert all drivers to implement mmap in struct > + * &drm_gem_object_funcs and inline drm_gem_prime_mmap() into > + * its callers. This hook should be removed afterwards. I think at least i915 has different semantics between dma-buf mmap and gem mmap in some cases, so this might be tricky to achieve. But I think everywhere else this should be solid. -Daniel > */ > - int (*gem_prime_mmap)(struct drm_gem_object *obj, > - struct vm_area_struct *vma); > + int (*gem_prime_mmap)(struct drm_gem_object *obj, struct vm_area_struct *vma); > > /** > * @dumb_create: > -- > 2.33.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel