Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp743837ima; Fri, 15 Mar 2019 13:08:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqydjjk4hvYrsqfiGVwNAfOgYcLvYhglR2mmh+CtSOG3d7GHG9jzX0QiHbXLr8tg6qXsHVtf X-Received: by 2002:a63:535c:: with SMTP id t28mr5268638pgl.128.1552680527655; Fri, 15 Mar 2019 13:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552680527; cv=none; d=google.com; s=arc-20160816; b=hpcz7VzLkoV3LXTy6kYvKUc/2gJp9c/24rxtFtfoZHJah7VJLVDGS0KflHR/R0KvoJ 6WaQll4hC6QUUTK0kbyC3R29VLof+/oVFsfchQByYcHSGr8VUN0vll/j1+LJvs8eIfpc zPom2vmXlExQAGL2j0qSjNOTlQ3zQycnS92ocTADN0+7a4ks4gJzPi8ulK+9DQvshjbn bOyG2k8VlVOcyaxNDQWn0ZAyF245tNDr+HkYHwfbuLbKXuv3zn80vpj93rIAZLLuBd82 UbKLe9CcJkc6Y65tT45K3jUGC5/yiEu5A8IrCB1BnWRhzAGp0kCC3RhbjZ+Iy9HAHSOU j82w== 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=aS+n8Rk+4bF8hSk8QDwRcNzlyMpahiBZ9HYF+1hPykM=; b=yu2a+vCEf6U+llnlguvcgfn8N3CgfBWYH3PKntsmbtdSPmXMrwTvxfOe+Q2hfS+ckN ZrsVT1v9oWFJcNJvhjLScMzLP0ZGjjJ2fPXgseCXe85mEOwuorBfg14fcWXkkirXBe56 mO80/WYfhG80q5BX9DMndXWHeFnr2gpxrOsNGMeqBEOgOSGgucGvANLrxHF9+RkoJ5y/ 7d6VQWIq84v7WJcxqR05aRRSqMZePrCzuEywze0stBRsg1Fs39gdlKJpauokaLVEawvZ sOIgbRhXE4RsHQAgV2c21u3Q5tFTxlahC4BP7Ujza/ydai+2YXhpfKCow/9yVD4nUc/M g9rw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24si2727551pfo.11.2019.03.15.13.08.32; Fri, 15 Mar 2019 13:08:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726951AbfCOUHg (ORCPT + 99 others); Fri, 15 Mar 2019 16:07:36 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:40976 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbfCOUHe (ORCPT ); Fri, 15 Mar 2019 16:07:34 -0400 Received: by mail-qk1-f195.google.com with SMTP id o129so6278042qke.8 for ; Fri, 15 Mar 2019 13:07:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aS+n8Rk+4bF8hSk8QDwRcNzlyMpahiBZ9HYF+1hPykM=; b=etqJSVGiq/Vp49yUS8Rf+gaUQ1jxYccIMWQ+Nqxxi+P34GwWt/wcfi22DqBajnh9iX mBMx1NTfgw3U58PWV46dOcYpUonbFFPYw/4xlQBjkB83t2hvuCC8O+ZYxrQ714YMJjA0 oUapxM2YA6KF//FWOa70Xbh1kWAoEkNtfYA+6Hc7cOi23BLaJDuIqccw8GlqN1iDHt5C UnV3z0/49KDqsOfLhnWIYf5OU2AKOPFRbFlBbntrQuks4cySmeor1UffOgO6+Xuamp6l WTpQyLlmDiec+r1cx4UPH3Ztihvo+IvUa9hM/UiQ6fBHQdDzgeSUYIwrJqv9tXCjumYY q4cg== X-Gm-Message-State: APjAAAVd1dDKjaKi4lL8rBpBQc0dzubMvgqnPODr1LZu9TC2czMe3Zl8 LcrSpZoTeWrockb6xfOnLw6lyg== X-Received: by 2002:a37:a650:: with SMTP id p77mr4305800qke.256.1552680453360; Fri, 15 Mar 2019 13:07:33 -0700 (PDT) Received: from ?IPv6:2601:602:9800:dae6::362? ([2601:602:9800:dae6::362]) by smtp.gmail.com with ESMTPSA id x15sm1889862qts.21.2019.03.15.13.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 13:07:32 -0700 (PDT) Subject: Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test To: John Stultz , Benjamin Gaignard Cc: lkml , Greg KH , Sumit Semwal , Liam Mark , Brian Starkey , "Andrew F . Davis" , Chenbo Feng , Alistair Strachan , ML dri-devel References: <1551819273-640-1-git-send-email-john.stultz@linaro.org> <1551819273-640-6-git-send-email-john.stultz@linaro.org> From: Laura Abbott Message-ID: <232410de-f20c-cde8-fdbb-48ca8ec1223b@redhat.com> Date: Fri, 15 Mar 2019 13:07:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/19 9:01 AM, John Stultz wrote: > On Wed, Mar 6, 2019 at 8:14 AM Benjamin Gaignard > wrote: >> Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : >>> + >>> + printf("Allocating 1 MEG\n"); >>> + ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0, &dmabuf_fd); >>> + if (ret) >>> + goto out; >>> + >>> + /* DO SOMETHING WITH THE DMABUF HERE? */ >> >> You can do a call to mmap and write a pattern in the buffer. > > Yea. I can also do some invalid allocations to make sure things fail properly. > > But I was talking a bit w/ Sumit about the lack of any general dmabuf > tests, and am curious if we need to have a importer device driver that > can validate its a real dmabuf and exercise more of the dmabuf ops. > > thanks > -john > There's the vgem driver in drm. I did some work to clean that up so it could take an import af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces") . I mostly used it for private tests and never ended up upstreaming any of the tests. Thanks, Laura