From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66717C06513 for ; Thu, 4 Jul 2019 11:20:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CAD02189E for ; Thu, 4 Jul 2019 11:20:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727563AbfGDLTl (ORCPT ); Thu, 4 Jul 2019 07:19:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54646 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbfGDLTk (ORCPT ); Thu, 4 Jul 2019 07:19:40 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A8402F8BD6; Thu, 4 Jul 2019 11:19:35 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-222.ams2.redhat.com [10.36.116.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6924118B97; Thu, 4 Jul 2019 11:19:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 70D9511AB5; Thu, 4 Jul 2019 13:19:27 +0200 (CEST) Date: Thu, 4 Jul 2019 13:19:27 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: ML dri-devel , Gurchetan Singh , David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers Message-ID: <20190704111927.u34xaaqeeiwrwrtb@sirius.home.kraxel.org> References: <20190702141903.1131-1-kraxel@redhat.com> <20190702141903.1131-8-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 Jul 2019 11:19:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > +int virtio_gpu_array_lock_resv(struct virtio_gpu_object_array *objs) > > > +{ > > > + return drm_gem_lock_reservations(objs->objs, objs->nents, > > > + &objs->ticket); > Unlike in other drivers where an "object array" is only needed in > execbuffer, we will use this in several places, and often with only 1 > object in the array. Can we special case that and do a quick > reservation_object_lock? Yes, done. > > > +void virtio_gpu_array_unlock_resv(struct virtio_gpu_object_array *objs) > > > +{ > > > + drm_gem_unlock_reservations(objs->objs, objs->nents, > > > + &objs->ticket); > > > +} > > > + Likewise here. cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers Date: Thu, 4 Jul 2019 13:19:27 +0200 Message-ID: <20190704111927.u34xaaqeeiwrwrtb@sirius.home.kraxel.org> References: <20190702141903.1131-1-kraxel@redhat.com> <20190702141903.1131-8-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF0236E2FD for ; Thu, 4 Jul 2019 11:19:40 +0000 (UTC) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Chia-I Wu Cc: David Airlie , open list , ML dri-devel , "open list:VIRTIO GPU DRIVER" , Gurchetan Singh List-Id: dri-devel@lists.freedesktop.org PiA+ID4gK2ludCB2aXJ0aW9fZ3B1X2FycmF5X2xvY2tfcmVzdihzdHJ1Y3QgdmlydGlvX2dwdV9v YmplY3RfYXJyYXkgKm9ianMpCj4gPiA+ICt7Cj4gPiA+ICsgICAgICAgcmV0dXJuIGRybV9nZW1f bG9ja19yZXNlcnZhdGlvbnMob2Jqcy0+b2Jqcywgb2Jqcy0+bmVudHMsCj4gPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9ianMtPnRpY2tldCk7Cj4gVW5saWtl IGluIG90aGVyIGRyaXZlcnMgd2hlcmUgYW4gIm9iamVjdCBhcnJheSIgaXMgb25seSBuZWVkZWQg aW4KPiBleGVjYnVmZmVyLCB3ZSB3aWxsIHVzZSB0aGlzIGluIHNldmVyYWwgcGxhY2VzLCBhbmQg b2Z0ZW4gd2l0aCBvbmx5IDEKPiBvYmplY3QgaW4gdGhlIGFycmF5LiAgQ2FuIHdlIHNwZWNpYWwg Y2FzZSB0aGF0IGFuZCBkbyBhIHF1aWNrCj4gcmVzZXJ2YXRpb25fb2JqZWN0X2xvY2s/CgpZZXMs IGRvbmUuCgo+ID4gPiArdm9pZCB2aXJ0aW9fZ3B1X2FycmF5X3VubG9ja19yZXN2KHN0cnVjdCB2 aXJ0aW9fZ3B1X29iamVjdF9hcnJheSAqb2JqcykKPiA+ID4gK3sKPiA+ID4gKyAgICAgICBkcm1f Z2VtX3VubG9ja19yZXNlcnZhdGlvbnMob2Jqcy0+b2Jqcywgb2Jqcy0+bmVudHMsCj4gPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvYmpzLT50aWNrZXQpOwo+ID4gPiAr fQo+ID4gPiArCgpMaWtld2lzZSBoZXJlLgoKY2hlZXJzLAogIEdlcmQKCl9fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmRyaS1kZXZlbCBtYWlsaW5nIGxpc3QK ZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwczovL2xpc3RzLmZyZWVkZXNrdG9w Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbA==