Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2576734ybi; Mon, 17 Jun 2019 07:09:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwF0IrwztNX70mGAKtcG2MzoSGCU0o9l6Egj0SfSmgKTNrrZlH1cGYDRShbycxp0pjZrAof X-Received: by 2002:a63:5656:: with SMTP id g22mr34806802pgm.280.1560780548857; Mon, 17 Jun 2019 07:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560780548; cv=none; d=google.com; s=arc-20160816; b=HkslBjZiDbgPYSAcIlBuii9vYwMAfq3qe5Lg+OGSqY+LYQSdnppiljNa3k/Aj1/NXU +7bbC0Fr5ZVvtkc5pZEKOZ0GgQ7S5Z0Vv+JXZJLIoJjgkBnvOoV5YH7QwLg+fDeuaell tVkYRxijznai4XLzzvyEnipNqKmaFBxmZiEn2VXnEacLVuYEIUNTsnXVVbxmumcM1tWI 5jJDDgqbW51HAsvgarRu7mEgUgUeCbGBj/PqwmWpIEZhGKMEsuwHxrAdw0n7aBzELeG6 pNKcZ15HjO5Ybb+dw9FkRAEGLmqV03+xL7FpLIU9QOF1gQQVMFUIQvd9o8VhSuHQ7zVd r4gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=QclIRmGgE6e1NwC0LyK0y/gOsKzmfG48w5Q/Ut94Q+k=; b=LMjks5ml/N5DR2LvvdS+dCdlXBUiUutf5SFU+rcl/3zb9UwhQ592Q0xxtQt78roJ8C xUseAlq7cC/AALCJHjAGUP94QsReSy7UHkOvI3c1ahDDNstJIJYiQG4fq0EKf9ACKNbN fQ/EZ4pvB6BaHmHhTSRhAcnNwG0cqpAxIZuOJF9SMUqAjdRE6MW7XbSxP3HvJ+AHfUGa HEW/Xd2/UBRDTpedzjrdQWU1Xg0rwrmmYUbgwv3Fs0DTwdzoAHtMMmOFYs/PFuMSzvuS adEgvwYSo+QELmJL2xKHgcS6oCJNcwTPaMdBgbnx38wWgbvWTbfy4Ysp1Shi4xDlV2s7 q++Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=YyLeBzVY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s34si10283521pgk.514.2019.06.17.07.08.51; Mon, 17 Jun 2019 07:09:08 -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=fail header.i=@ffwll.ch header.s=google header.b=YyLeBzVY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbfFQOIb (ORCPT + 99 others); Mon, 17 Jun 2019 10:08:31 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:46850 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfFQOIb (ORCPT ); Mon, 17 Jun 2019 10:08:31 -0400 Received: by mail-ed1-f66.google.com with SMTP id d4so16335392edr.13 for ; Mon, 17 Jun 2019 07:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QclIRmGgE6e1NwC0LyK0y/gOsKzmfG48w5Q/Ut94Q+k=; b=YyLeBzVYVYsicyyTQaxOj8/wVRXFIWW/Pk135d0I16nxXxId1a6hq5l4MbpdrVDb1q 6K00J3TChDALBDD04GdAyKBMsE45rcW3gx1uphcbzC7nmtufgwJsA9J9KKokP6xZk8RF IokXKwK/8xTC7O5fOi/xUwQMKRgUFj4H+SzJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=QclIRmGgE6e1NwC0LyK0y/gOsKzmfG48w5Q/Ut94Q+k=; b=D/nRntlX9oRz3tInTKy7UYPKhjHmqSpm64b/RHfsG9PZuqtHUi291QonKVFuB7GqU3 4VZTghO5qwRYCNJkzwY698l9mz3Eif5+pcT3foZ3siwMmXgajh4RwbBZcxcsQsIYcgyl ZSFnDjzYioK5uYwC9NvkweGKvt8oIXoXDGLKplD04znGKc6msmbSu7jmjY16feajzV8s OymbCfPquXCE87hkjAD42CPb3QESAUxoDB+wYB1i02hTuVBtZeJZ/XdsHLLDK3KuvKcH tSSwX76kMLmr/BWjJv+LMIc5VCzxCu6hqsHBe3GbyqBcnUrRKRbrf1h64eokJWYjHd4O 1oNg== X-Gm-Message-State: APjAAAWvVC1qtdTbdoyJ8H0JHDqpF08bOqrf7sOuek33WlfchIDNud7l D8S39fMiuecn3gbO+QLD8Ro32Q== X-Received: by 2002:a05:6402:8d7:: with SMTP id d23mr76998441edz.17.1560780509384; Mon, 17 Jun 2019 07:08:29 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id y3sm3688780edr.27.2019.06.17.07.08.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 07:08:27 -0700 (PDT) Date: Mon, 17 Jun 2019 16:08:25 +0200 From: Daniel Vetter To: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH 1/4] drm/virtio: pass gem reservation object to ttm init Message-ID: <20190617140825.GD12905@phenom.ffwll.local> Mail-Followup-To: Gerd Hoffmann , dri-devel@lists.freedesktop.org, David Airlie , "open list:VIRTIO GPU DRIVER" , open list References: <20190617111406.14765-1-kraxel@redhat.com> <20190617111406.14765-2-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190617111406.14765-2-kraxel@redhat.com> X-Operating-System: Linux phenom 4.19.0-5-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 17, 2019 at 01:14:03PM +0200, Gerd Hoffmann wrote: > With this gem and ttm will use the same reservation object, > so mixing and matching ttm / gem reservation helpers should > work fine. > > Signed-off-by: Gerd Hoffmann While doing my prime doc+cleanup series I wondered whether we should do this for everyone, and perhaps even remove ttm_bo.ttm_resv. Only driver which doesn't yet have a gem_bo embedded in the same allocation is vmwgfx, and that would be easy to fix by adding a vmwgfx_resv somehwere. Anyway, looks like a solid start into the convergence story. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c > index b2da31310d24..242766d644a7 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_object.c > +++ b/drivers/gpu/drm/virtio/virtgpu_object.c > @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, > virtio_gpu_init_ttm_placement(bo); > ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, > ttm_bo_type_device, &bo->placement, 0, > - true, acc_size, NULL, NULL, > + true, acc_size, NULL, > + bo->gem_base.resv, > &virtio_gpu_ttm_bo_destroy); > /* ttm_bo_init failure will call the destroy */ > if (ret != 0) > -- > 2.18.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch