Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp748543ima; Fri, 15 Mar 2019 13:15:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwHPgL/juXssB9qvntAmzZJ3gxpqle0h2Lar2bmfx2TqUNlBILWyfY+d5NTK6nDLKu5+Eg X-Received: by 2002:a65:4686:: with SMTP id h6mr5038338pgr.227.1552680938555; Fri, 15 Mar 2019 13:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552680938; cv=none; d=google.com; s=arc-20160816; b=ddFyT4UhKToTeqYMR44yChXGY6CukYK3Gg1EDPT9mGEPxeaqsR3Nv2OgN0Y1snWATc zAClypqbYxatdWrVOQPjoGHdbZzTYZff6nXVwd1SklHJbdQGT9kxaylIOu/uml1nP81w oN+knyJDvR1xKyWYgnrnkkwEvPdadKEnUtq66aUjDFQpFo4F8ZfD2zhaFqRsJP2OU/CB 0v447yxQzhKhnquADQMmdPpX6w7X8ecjVYH9ywkvdfv4moVr2fy+++42E0ibFWMd/lyW 1Gyl0l4/DJcnNLG+hmvDLJCrFxMJq9FoKoaUZoNrls537wMFvXi+JC2LBUI15hin8KWo uoIw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UFMdBRsGAu44JgGIkSUfbrU9EwKu+fv2CxmBbUPq/5k=; b=n8U82EvwsBu2ei9M5Y4kO5ds71TWsA3MQ0V49ODKRMRniQO2QkiKlDyE++Zy87qm36 hIix0lE6wd03WB/401AlvsxDIYmWX6Tu7oWFqU5tbbovlgSaeFNTBwd9F2LnJOWp1XC7 bUjJ3vmABOxg2C9rxXQsrtZdsmIdUJIi/S411xYFfhqPkfgxCaugZ3iweMzTIjP+VUWU 6sokvJz0KQEvrSz4GcW1CQERNrasxfC0pxZR6dUzNRYQN+5iAPAT6fmDgZbbqb3cux8A Jh7cO/6FjbRKab1ZWG6JHHTVUtvPjHatmVzWX8h21303YBr/cfeYnGncWhS/OmQTCuq3 vR6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c6935lM6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si2756963pfd.115.2019.03.15.13.15.23; Fri, 15 Mar 2019 13:15:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=c6935lM6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfCOUNZ (ORCPT + 99 others); Fri, 15 Mar 2019 16:13:25 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51291 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfCOUNZ (ORCPT ); Fri, 15 Mar 2019 16:13:25 -0400 Received: by mail-wm1-f68.google.com with SMTP id n19so7704113wmi.1 for ; Fri, 15 Mar 2019 13:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UFMdBRsGAu44JgGIkSUfbrU9EwKu+fv2CxmBbUPq/5k=; b=c6935lM6XELJ+DVpw2Q5TZoexKSNVTnmA58DWVT40XM55BgdkKxexjMuw6xgbGC5jY OsdFpuJAZMgojhoH8/teTFX7BDmL6z9WmQJAhIJmU63UzdBoLeou+NAnLsBYezeoOQhk A6M68yE+pUo3oE9uaZ66d/MSwyhfa7qV2/JJ+NZtr4rJnuzWEP3faGJeIVnhx6BWeKWH lAQMKqNAula9/t6TdRlW837AqbcusZ4apMc7HdyE3YeckhtConR5EBBvKlvLoN9h5GS3 ss3j+xedrdwo+318q52MSPxjOGh+xvGe9mf8VsU5dq+WB3fxJ+kCJNqE0dbN3qdbnYKf 1YFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UFMdBRsGAu44JgGIkSUfbrU9EwKu+fv2CxmBbUPq/5k=; b=XqYPJLixbbZB0JHFumq5QIrLxwJk1bszkotCbtxupWVXx/yV325juUaG5GX6m7uh8i f7qcVUQvcTY06V4d3rF03XRkF74Q+1BpdRT2inN71b8+m+Ic3+5RY3V3sn1oB9BmCvyE Ql6VOc3CZWIV3609YfXAvWTeH/P8iGFKT/4dS2cCp0OvyDqQui5f5GBOQhHvoFqBY/US HWBhr+xAQfknYrrDBtBO3S/aCm+rF1RJEm9xtEsklvWVJNRdkDkduVs26bPFSvQi3Qts rHxvsLbhQZMFEEJ1U9gbO9WGCsFHarQnIocGwnV98zS1dkM7/1Qjd0VQchsbnOaaiOW3 iXwA== X-Gm-Message-State: APjAAAWGvzfiGpOFnpwP05JbCC6EaOzkkjGQe6Q+SEyobcnoNwqvKwfM 5alo1lW5hk5WBRBgETnFeInoKj33NuSOBbgk9ad3YA== X-Received: by 2002:a1c:c90e:: with SMTP id f14mr3112656wmb.23.1552680803684; Fri, 15 Mar 2019 13:13:23 -0700 (PDT) MIME-Version: 1.0 References: <1551819273-640-1-git-send-email-john.stultz@linaro.org> <1551819273-640-6-git-send-email-john.stultz@linaro.org> <232410de-f20c-cde8-fdbb-48ca8ec1223b@redhat.com> In-Reply-To: <232410de-f20c-cde8-fdbb-48ca8ec1223b@redhat.com> From: John Stultz Date: Fri, 15 Mar 2019 13:13:08 -0700 Message-ID: Subject: Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test To: Laura Abbott Cc: Benjamin Gaignard , lkml , Greg KH , Sumit Semwal , Liam Mark , Brian Starkey , "Andrew F . Davis" , Chenbo Feng , Alistair Strachan , ML dri-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 1:07 PM Laura Abbott wrote: > > 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 =C3=A0 21:54, John Stultz = a =C3=A9crit : > >>> + > >>> + printf("Allocating 1 MEG\n"); > >>> + ret =3D 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 pr= operly. > > > > 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 impo= rt > interfaces") . I mostly used it for private tests and never ended > up upstreaming any of the tests. Thanks for the poitner, I'll check that out as well! Also, if you still have them around, I'd be interested in checking out the tests to try to get something integrated into kselftest. Talking with Brian yesterday, there was some thought that we should try to put together some sort of example dmabuf pipeline that isn't hardware dependent and can be used to demonstrate the usage model as well as validate the frameworks and maybe even benchmark some of the ideas floating around right now. So suggestions here would be welcome! thanks -john