Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1323250rwd; Tue, 13 Jun 2023 07:44:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6B5xJ/yvsinp2rV8xI/mNJF0xgLYgxTdK0ytd7d5LRLdOXPK36SrJe3OLjocraYlX41FpZ X-Received: by 2002:a2e:8049:0:b0:2b1:c09c:ee4a with SMTP id p9-20020a2e8049000000b002b1c09cee4amr4361119ljg.26.1686667471985; Tue, 13 Jun 2023 07:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686667471; cv=none; d=google.com; s=arc-20160816; b=c/k0R1MLXby5oIdAqdDCnKw/neT6u85DFcrY/HtPywpcMP0wHXM4duuBpZ4djP067o 2aKfHMJWaJ4J835p18WNhDpgfUwa7vzpDRaPiqc5aAkWIcwJ7Z6dav7u078pPN4NfPN3 6qhKdAIL6P95Paj8lAJpSvCqJrCBJYklrK9WGkhqph8aMhL4yDbSAyeyRioLxGrAVAKW yiC5cK50YSiRuT1Fn4V6Rd6DodhJozQ8Q8+s2O7OWbAl8AbzDrcYARtBlBSVAqsCJ7BX 9n/XxKLwppEdpPj8MkjWQNLGwixOzJXdx85Yi36RtfX6gnoH7OspIBNlIkCaLTjTDr8Z bezg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=cZEUY4eFrIiW2hJOSDRcVK2BXCKkst+J0Ig7f66lGys=; b=PthCeVKyhJN99YWsBAuWVPTiI2ZEfiWx80Ylb6iRuYBjqN1TFp8L7eQTFIlCVG7c5o ExtAbRxZ/XOpgo+TvcYRkm/ZzFpMIy+J44Av5Zu0I2CTSb8B7usWscHGM1CPDxg1qGbt hgpmWDNOKu3mRKjd7QFAIhFFUeat41iKHr9V4rHkAEvOnZcKMLvQdlJHfBYHOYxDskfZ 12xLnaFUfyxUbcsMautRUFW63urUmS6slRPfqa2YgEsZdsIhuye1sczYFWib8rpXewAm 1lwrZTO2lAc/12Dt9+UH1SjuYSPdetLfUNSL/NkoX826Vv12OGfdLVDq8PmbPLpx2K+Q U9pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZajmTeyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020aa7d04c000000b005149e642610si7575099edo.296.2023.06.13.07.44.06; Tue, 13 Jun 2023 07:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZajmTeyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242451AbjFMOWE (ORCPT + 99 others); Tue, 13 Jun 2023 10:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235921AbjFMOWD (ORCPT ); Tue, 13 Jun 2023 10:22:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11798172B for ; Tue, 13 Jun 2023 07:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686666072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cZEUY4eFrIiW2hJOSDRcVK2BXCKkst+J0Ig7f66lGys=; b=ZajmTeyfD10j/c7K5H5ggbyDwsJsBvCJMNgXnXAriOJO470lsSTOcwVjYWHSGtM08XllzZ 4Tlm7eYCAH0665dfQ1ujh9EW41Z3S1ibYyHNKEiI8GdEO4lb+rmMdeVLMQTNlXLAIA7tmA 0DhDYdB6Lsba1Qc6880wkiqfnF/9yBQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-XNmXmiENOhix3nSWu-zn-w-1; Tue, 13 Jun 2023 10:21:11 -0400 X-MC-Unique: XNmXmiENOhix3nSWu-zn-w-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-977e50b0120so607060366b.0 for ; Tue, 13 Jun 2023 07:21:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686666044; x=1689258044; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cZEUY4eFrIiW2hJOSDRcVK2BXCKkst+J0Ig7f66lGys=; b=bj7tR2dai1JuJS6ToMC95oKkfeJoox7PhGvrw8CVgfi0+jnjgtTaypbhLY2Ne0eQD1 RGFzoAhm9gmf2HrLOOi2Ijgu8SZj932vcBtPkkNMFEzUb9FjZj4gkTs8badlomHaWR7i u86mLpwQtkv9dcXhzSyhw1wCnIM4TXVL2d/+eg+h7zoC1efSLeJxH/WImYpA6Jifxm50 LEpGoL4bqb3jZpLeumC7unY029ViJhHSNi1kfZr7vvhRXfTCJAStAg/vCovkMn3EqYsf GbyEsLZVRKjws3/vboGG1G8YqPvrYSZy8NpL2Hhtrrbn67rqXInjppzibbSjNziajv1R TPGQ== X-Gm-Message-State: AC+VfDyhx30QaqbXh+D9IMvJ+VgWI5RboVI/iw38u1/ITR1Lz8GbYAPj 0iNpyDjtVOVolnCfBfTTS+EP1IPNDdUeswnfKdLiE5uLho/wozi789d0OkL5wcqAqNijImwF1AL AoP+SMOd0dINlQWJIqQf9suB7 X-Received: by 2002:a17:907:809:b0:977:cbaf:bc56 with SMTP id wv9-20020a170907080900b00977cbafbc56mr13671262ejb.43.1686666044425; Tue, 13 Jun 2023 07:20:44 -0700 (PDT) X-Received: by 2002:a17:907:809:b0:977:cbaf:bc56 with SMTP id wv9-20020a170907080900b00977cbafbc56mr13671233ejb.43.1686666044074; Tue, 13 Jun 2023 07:20:44 -0700 (PDT) Received: from ?IPV6:2a02:810d:4b3f:de9c:642:1aff:fe31:a15c? ([2a02:810d:4b3f:de9c:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id e24-20020a170906081800b009786c8249d6sm6855650ejd.175.2023.06.13.07.20.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 07:20:43 -0700 (PDT) Message-ID: <67ffef18-fae4-cb84-ff75-c4eed92a8755@redhat.com> Date: Tue, 13 Jun 2023 16:20:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH drm-next v4 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI Content-Language: en-US To: Donald Robson Cc: "corbet@lwn.net" , "jason@jlekstrand.net" , "willy@infradead.org" , "christian.koenig@amd.com" , "tzimmermann@suse.de" , "bagasdotme@gmail.com" , "mripard@kernel.org" , "matthew.brost@intel.com" , "bskeggs@redhat.com" , "ogabbay@kernel.org" , "boris.brezillon@collabora.com" , "Liam.Howlett@oracle.com" , "daniel@ffwll.ch" , "alexdeucher@gmail.com" , "airlied@gmail.com" , "dri-devel@lists.freedesktop.org" , "nouveau@lists.freedesktop.org" , "linux-mm@kvack.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20230606223130.6132-1-dakr@redhat.com> From: Danilo Krummrich Organization: RedHat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Donald, On 6/9/23 13:56, Donald Robson wrote: > On Wed, 2023-06-07 at 00:31 +0200, Danilo Krummrich wrote: >> >> Christian König (1): >> drm: execution context for GEM buffers v4 >> >> Danilo Krummrich (13): >> maple_tree: split up MA_STATE() macro >> drm: manager to keep track of GPUs VA mappings > > I have tested the drm GPUVA manager as part of using it with our new > driver. The link below shows use of the drm_gpuva_sm_[un]map() > functions. I think this is based on the v3 patches, but I have also > tried it locally using v4 patches. We will be submitting this > driver for review soon. That's awesome - thank your for taking the effort! > > https://gitlab.freedesktop.org/sarah-walker-imgtec/powervr/-/blob/dev/v3/drivers/gpu/drm/imagination/pvr_vm.c > > In a previous incarnation, I used the drm_gpuva_insert() and > drm_gpuva_remove() functions directly. In some now abandoned work I > used the drm_gpuva_sm_[un]map_ops_create() route. > > The only problem I encountered along the way was the maple tree init > issue already reported by Boris and fixed in v4. One caveat - as > our driver is a work in progress our testing is limited to certain > Sascha Willem tests. > > I did find it quite difficult to get the prealloc route with > drm_gpuva_sm_[un]map() working. I'm not sure to what degree this > reflects me being a novice on matters DRM, but I did find myself > wishing for more direction, even with Boris's help. I'm definitely up improving the existing documentation. Anything in particular you think should be described in more detail? - Danilo > > Tested-by: Donald Robson > >> drm: debugfs: provide infrastructure to dump a DRM GPU VA space >> drm/nouveau: new VM_BIND uapi interfaces >> drm/nouveau: get vmm via nouveau_cli_vmm() >> drm/nouveau: bo: initialize GEM GPU VA interface >> drm/nouveau: move usercopy helpers to nouveau_drv.h >> drm/nouveau: fence: separate fence alloc and emit >> drm/nouveau: fence: fail to emit when fence context is killed >> drm/nouveau: chan: provide nouveau_channel_kill() >> drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm >> drm/nouveau: implement new VM_BIND uAPI >> drm/nouveau: debugfs: implement DRM GPU VA debugfs >>