Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp424054ybm; Wed, 22 May 2019 05:40:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVkW6evr8JTe5/jkdK0chTNa8GlwmjRkC6yjxehxqCl7YEEKBJycO7ECRyqpJL9urHsKIR X-Received: by 2002:a17:902:70c7:: with SMTP id l7mr3037857plt.47.1558528833251; Wed, 22 May 2019 05:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558528833; cv=none; d=google.com; s=arc-20160816; b=f99LWvOvEo0x6ZYuQkUMhhAYNRug6nhDjALJPSFcuNh2fcquUB5j/GgeOrHHOFY1Wg /tPv/goy/I+NHyQe6VWkVKWoU3DE4sSPWmf8ppncHN2LyucRZ3O9W09KWKQMQP4N8Ivx FDG3wrTCPRfdL8ZlV9II1fvJC/G22Hb9h4MXB+XkpUwO+3a233GWDhLMjvwfg/eC0JvE UA09nEvq/7M2YReOm0FE+U/A2RnFYGnqfbPWXYJLC0tDKQyFpqisZIxnPmRalRxkVLce +i+758/vtiAj10qJdEhmfg7BmpkDJzYnuHGHnwUzvpnqdbRJBon1R+MsNA+yICJrfWZe P6dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PSO0sMqqGoHCZ+bzHo5HB6Xom2F00pOIbjeZaZ4SeRY=; b=f12h0DuzycjPfrzL2FQzm2m09i8LmmQJNDfqPzMZBeRfU8mUxzu4yMJOnXipOy8b8t Nx2yXmZkaEmsNq+ZoUCEDHtlJwCsJ5ifDxnV/uefxvRvc2ki8xK31H2X7KZlr/e6PyWg +nTW3PGRtJAGba1B5q/sRpQXMwmVkn34C8jq052se9nuOArifN5DRLQChAt3ULti3+hB cdCN9pbpW6C+aZcEHysEwhYhNg00Nbgu9swNEhU31RxAA8bU1ggdugiMkL9mt69biYlv +tcZzWsjOfjCxfz6VtrU+VKwz8fW9c9LnrX7Ayw395yhzLFIp5/o4qgsntGY9iprnikk jQpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t189si847094pgc.530.2019.05.22.05.40.18; Wed, 22 May 2019 05:40:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729171AbfEVMjI (ORCPT + 99 others); Wed, 22 May 2019 08:39:08 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:49734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728438AbfEVMjI (ORCPT ); Wed, 22 May 2019 08:39:08 -0400 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 83A4780D; Wed, 22 May 2019 05:39:07 -0700 (PDT) Received: from [10.1.196.69] (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B9483F575; Wed, 22 May 2019 05:39:05 -0700 (PDT) Subject: Re: [PATCH v3 2/2] drm/panfrost: Use drm_gem_shmem_map_offset() To: Chris Wilson , Rob Herring Cc: Tomeu Vizoso , David Airlie , Seung-Woo Kim , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski , Maxime Ripard , Kyungmin Park , Kukjin Kim , dri-devel , Sean Paul , Alyssa Rosenzweig References: <20190520092306.27633-1-steven.price@arm.com> <20190520092306.27633-3-steven.price@arm.com> <155846303227.23981.8007374203089408422@skylake-alporthouse-com> From: Steven Price Message-ID: Date: Wed, 22 May 2019 13:39:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <155846303227.23981.8007374203089408422@skylake-alporthouse-com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/2019 19:23, Chris Wilson wrote: > Quoting Rob Herring (2019-05-21 16:24:27) >> On Mon, May 20, 2019 at 4:23 AM Steven Price wrote: >>> >> >> You forgot to update the subject. I can fixup when applying, but I'd >> like an ack from Chris on patch 1. Sorry about that - I'll try to be more careful in the future. > I still think it is incorrect as the limitation is purely an issue with > the shmem backend and not a generic GEM limitation. It matters if you Do you prefer the previous version of this series[1] with the shmem helper? [1] https://lore.kernel.org/lkml/20190516141447.46839-1-steven.price@arm.com/ Although this isn't a generic GEM limitation it's currently the same limitation that applies to the 'dumb' drivers as well as shmem backend, so I'd prefer not implementing two identical functions purely because this limitation could be removed in the future. > have a history of passing names and want a consistent api across objects > when the apps themselves no longer can tell the difference, and > certainly do not have access to the dmabuf fd. i915 provides an indirect > mmap interface that uses the dma mapping regardless of source. I don't understand the i915 driver, but from a quick look at the source of i915_gem_mmap_ioctl(): /* prime objects have no backing filp to GEM mmap * pages from. */ if (!obj->base.filp) { addr = -ENXIO; goto err; } it looks to me that an attempt to map an imported dmabuf from user space using the ioctl will fail. Am I missing something? exynos_drm_gem_mmap() is the only (mainline[2]) instance I can see where a transparent mapping of a dma_buf is supported. [2] mali_kbase does this too - but I'm not convinced it was a good idea. I could instead add support in shmem/panfrost for transparently passing the request to the exporter (i.e. call dma_buf_mmap()) - but I'm not sure we want to implement this if there isn't going to be a user of the support. Steve