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 4D83EC433F5 for ; Wed, 10 Nov 2021 10:46:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 064A161168 for ; Wed, 10 Nov 2021 10:46:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 064A161168 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.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 62C406E943; Wed, 10 Nov 2021 10:46:53 +0000 (UTC) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09A3D6E928 for ; Wed, 10 Nov 2021 10:46:52 +0000 (UTC) Received: by mail-ed1-x535.google.com with SMTP id v11so8678838edc.9 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=lRYmh7z8Nh14rjAMwDost83XLAoIXRdPw5hupVzaHQoeKDmiL+hCF8RSkvoVQv3QLs gwKizZHYf9Nq2RI2MBTvBx67vl/mNI2QQkf79xA0/YJJiGkoZvgHd9Vm/8T7HZG9HTQM x3vvnqtoAxa7tz2Agd7hsaXIJfCACjymsHSi0fZ/Fe5W5NAPvnrISggHuc8xiVkyAvQd WcBEkhds5avjldYEl9YSodDzevK+viBq+HfawbDzPZNsnorEFQC4F6271vAiuX+XJHT2 iiMny2G5e3h5XauVuWJTBEAV0EBaAkXpqi5o8iRALG9JzUPPkUqsqCUKeb3oAcEUS9sf oWgg== X-Gm-Message-State: AOAM5325M2kR/WBYlPhiDCz/alxMZvYWBfv5n/aOeYiy2KLxSCFcLy0w cRk0TqbLEWHUU6YZFolzFmw6Eg== 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 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211108102846.309-4-tzimmermann@suse.de> X-Operating-System: Linux phenom 5.10.0-8-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, krzysztof.kozlowski@canonical.com, airlied@linux.ie, sw0312.kim@samsung.com, oleksandr_andrushchenko@epam.com, kyungmin.park@samsung.com, dri-devel@lists.freedesktop.org, xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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