Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp17876imc; Fri, 15 Mar 2019 13:50:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyeyTViiYU0aPXiI/E5BjTq8N2+DG4Ky3nl0oAITQDFojqeMQ9iDRZdbD4WIOlrUKG5WCb X-Received: by 2002:a17:902:7293:: with SMTP id d19mr6030351pll.29.1552683006041; Fri, 15 Mar 2019 13:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552683006; cv=none; d=google.com; s=arc-20160816; b=yE5e21wewU6atAMOyyAB389fnlFlu8cNiuVf6UlZYKtDQW2R5PqwDTdTfwuD0CzBDO dXzjG06UFZbUd2q3FFh93MZAG63Wo5oDVKwwPWRkHbpzszQx9HgBi0CHHoBi6PoGClnU CSi3oL+wofX276YSWsjgBvYmWLPKod7sWAyFclJFdO9QEphlHignVQJ8Oa5C4emI+O80 tEueweSuinqanVT/A/ae9cbu61ta2nD2W6YN2gK7PDETTlXKEGhtCX3KWMPUKU6Vqd8t YWqGMNSuFxDYwdTy1teU3rQJDuGIDqWb0ktpO7Z6i4HYA0jPx3bIRw1hwJBY3auwWvRB sQgA== 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=a4CPB5A/+GpX8tyD94diakciAgGyDRgPweGwpqPXIo0=; b=jamR09o3ID8fHtlduPuxjTBSPAKQnvcr1SehlPIDXVOoA99ykZFzM8+aeWutTctE7Y LC+WfKaGXEX4R7a5hFzX/+oWfIf06meFrWgdfBVOqtYAjWbFWJTh9v0AbZHlCAOS7MMb 2VRf67bdBmW4OBZyukbYb8vQ7EEGqSodI/5zmNQoSGB1S+GoFpIn8EdbBVkL6LJiQc7l vaABzfm9t7hbMyv+ihM9OdoHQTQJlYYPh1nxr+gWlPDp8X9qMOnRL1YfKFBEFYpKZ54s ZaKjIb1Odmxhln+MXMV/M2oZMqPVc7mUCcz2tKH+Ob92TW3O4Mf1o3xR7s009F2MfEgt ZI9A== 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 8si2615732pgq.591.2019.03.15.13.49.50; Fri, 15 Mar 2019 13:50:06 -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 S1726713AbfCOUtI (ORCPT + 99 others); Fri, 15 Mar 2019 16:49:08 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:40977 "EHLO mail-qt1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfCOUtI (ORCPT ); Fri, 15 Mar 2019 16:49:08 -0400 Received: by mail-qt1-f182.google.com with SMTP id w30so6347599qta.8 for ; Fri, 15 Mar 2019 13:49:07 -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=a4CPB5A/+GpX8tyD94diakciAgGyDRgPweGwpqPXIo0=; b=JQWIbU9TIgGTaFHCbPdhixQESHoHWfy9mtcULINoBO2UdUw8RQDfW0YFoAboKHSQDC 200M2MoQq0KbYPBBS2h+Qn6JJv05vNpvtPmOO7ym/a5V3LnLEwICHcYj54p3lUG5hxeG CrbNnwdZpXEoDzM/sdZuCotSoIHR5V/4o9o1aOp6FBTE1L1tgB0vMry4XQHVyOwlJgmx QCq0KrXQlgtOJBLNg/FhFI3uj7ImrLCVvWIRcAm+B5F9ftpcXmLi/1DhizJrUoXwGEqj FBhRO17GJfzbyK2zUzgsyFM/iWYbecW2sftzpJLzq/eOg3jfA0je1U+TZEkejgtg/wKi V+QQ== X-Gm-Message-State: APjAAAX9iRSWsR72/Feb6ikfAk4i+rXOSuBKTe6j0xbSkU+t5pUhkZZi yAGTH+wBENcEs8ZA9AWseZlGKtTocPU= X-Received: by 2002:a0c:ba13:: with SMTP id w19mr3973639qvf.179.1552682947343; Fri, 15 Mar 2019 13:49:07 -0700 (PDT) Received: from ?IPv6:2601:602:9800:dae6::362? ([2601:602:9800:dae6::362]) by smtp.gmail.com with ESMTPSA id w8sm3213970qkw.80.2019.03.15.13.49.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 13:49:06 -0700 (PDT) Subject: Re: [RFC][PATCH 5/5 v2] kselftests: Add dma-heap test To: John Stultz Cc: Benjamin Gaignard , 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> <232410de-f20c-cde8-fdbb-48ca8ec1223b@redhat.com> From: Laura Abbott Message-ID: <501196c4-e5bd-476d-21a8-3450d804cd5b@redhat.com> Date: Fri, 15 Mar 2019 13:49:04 -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/15/19 1:13 PM, John Stultz wrote: > 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 à 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 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! > So the existing ion selftest (tools/testing/selftests/android/ion) does make use of the import to do some very simple tests. I can't seem to find the more complex tests I had though they may have been lost during my last machine move :( I do think building off of vgem would be a good first step for a testing pipeline, although I worry we wouldn't be able to measure caching effects without a real device since setting up coherency testing otherwise seems error prone. Thanks, Laura > thanks > -john >