Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3153122ybd; Fri, 28 Jun 2019 03:50:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXILNEDyIqbTV6aHMMbU8ikfJSkLJVFd4ZudZTIma8E/w1QvBYEaFptUPCkhVCKtkf7BMx X-Received: by 2002:a17:90a:360b:: with SMTP id s11mr12157909pjb.51.1561719020822; Fri, 28 Jun 2019 03:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561719020; cv=none; d=google.com; s=arc-20160816; b=Wkjq+XbCwrtHqbOZzivuzLTKDxEHbJrpUZ9K42V6N4VuCeXYGGar8nVu2uUeJ3baFQ g6GHqXwvcLRCBUJVa13cw2jNlAsLA+XQeoYe08a+XO9R3dTv/mCE6rftyvRQ5NtcRqsN ewQ94N/T1SjiH+Ggq35rtNFeJxpJnHFgwsKmqiIzT46D5SKsbQDo+l8htHcrl3xvsTSr swX+LsBXaTv0ABpSEg/zf3S7nwByZ2dvTjBJPOxGB805zOsPm5NFkQkK7K3z8W1ygitm NarB/s7vSGLdMyqVIlszNqlZFfGBicF7naqTUqpneft+6Ey6NsCYKllWEKeMHj1rWM68 qv7A== 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:message-id:subject:cc :to:from:date; bh=7RfhRE43MsqEpzDU7EQevIW+prUiCof/r0uA2dwIt3E=; b=qNXvgbm0HVz6aXvciXTVDNQxC/frQ4s8pany6Q10y5gCNEl7RV7AMyHqz/PsPKQWr7 JWdft2mvfMfSaPZhDonGdo2BAcvbk+SMY5PAh9ekRfb65BWngj09HxChVX6aF9ovlIMF aZCvHXh6l0oQOk1vwkT1L7izCoc8jH4tAh9Kw8CZuD4KFyevZ//z+tTzEQatg6Z6yUcc oDYX1jjwnjti2hvT4hgrUDSiRmXKI/Eh8NgM5fry1xkUECKSiekUjmGj5tF/0IkTBld1 dz4nOLSG7SQtTAfQ2jVanoc9z01RrXZhux4ms0HBovDhpjKdjI6w/vSWld+1lTsHKRAc z0+A== 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 z3si1757617pln.198.2019.06.28.03.50.04; Fri, 28 Jun 2019 03:50:20 -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 S1726706AbfF1KtQ (ORCPT + 99 others); Fri, 28 Jun 2019 06:49:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43176 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726543AbfF1KtP (ORCPT ); Fri, 28 Jun 2019 06:49:15 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1069A30BBEA6; Fri, 28 Jun 2019 10:49:09 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id B44EE1001B1B; Fri, 28 Jun 2019 10:49:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EB20D11AA3; Fri, 28 Jun 2019 12:49:07 +0200 (CEST) Date: Fri, 28 Jun 2019 12:49:07 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: ML dri-devel , David Airlie , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers Message-ID: <20190628104907.vign7lmgftrwfisv@sirius.home.kraxel.org> References: <20190620060726.926-1-kraxel@redhat.com> <20190620060726.926-12-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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 28 Jun 2019 10:49:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > static inline struct virtio_gpu_object* > > virtio_gpu_object_ref(struct virtio_gpu_object *bo) > The last users of these two helpers are removed with this patch. We > can remove them. patch 12/12 does that. > > + bo = gem_to_virtio_gpu_obj(&shmem_obj->base); > > + bo->base.base.funcs = &virtio_gpu_gem_funcs; > Move this to virtio_gpu_create_object. Fixed. > > + ret = drm_gem_shmem_pin(&obj->base.base); > The bo is attached for its entire lifetime, at least currently. Maybe > we can use drm_gem_shmem_get_pages_sgt (and get rid of obj->pages). Already checked this. We can't due to the iommu quirks. cheers, Gerd