Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3813828ybi; Tue, 18 Jun 2019 06:58:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1PlSunOSqoxKSSDi7vdPxJYItBTcpTlTS5dZlL7A8AVvpQ/7xdro+SNof5EepWL2Q+hJk X-Received: by 2002:a63:4185:: with SMTP id o127mr2746677pga.82.1560866339803; Tue, 18 Jun 2019 06:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560866339; cv=none; d=google.com; s=arc-20160816; b=DwoypdfoLkQ0jLgt3OrRXo42xIgIflDmWbsOp1scPEY+E6t0aOgc65wPBNdGcF+hMh dTBHfXa1qPvC6q4P46G/howWjrCzmkJQiWTb4p6nLAX0/EBHBZJgCYESGUEsa0J/uWw7 DJKuDUjDDW8v+LAzxS6MJzEAxdSXmdE9BI0qhTfMKNI/bxlETk52V1whCG1QIhj0/Vej eUvi/GAc79cDbU4CbeZaSJR/bvEhuXaW/XTATWN1Adim6/7so8v+lzYuSUSNAyop56ut qNothoTas2OMRRxS3R7R6S+GNML0954oC5sUb9/uJcnVXmINIapudevMCpUjnW695YTy mpzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=8H1Mwfj96VeTTfFXKp8UpKjgWG2x2GRhiei7IYXzCeE=; b=q+yrv2CwwmEK7v4eOKweqx6K2Vrx79EE/fr47pr0da5P66JNP3zWnJyE9oOP0AyUEm hPXIkSx/MzI/HbDNixHvtlt29W+DJtqqxI/Wvcc/i/43Ri8Bx0RzKBGkEWEHHb7iy8c0 CgdlzT4FnDqnXws4uujJ4HhvUPge/ImKVSB4xAPZGCIo2KMVighNHlyWVog7HeiRSRAS Tjdhb/kwhQPoMSJPPtQCPTwv++M7/2tabzZbWZZvBgbMvswP5aDLENxllnF/EZR9lDbi gEEftIjtC0dcaGkIolRfKbQgenH4TEaNrVRbcZazY6wD7WAlxfGOnQTDSRYg8Ne5TX1g ltpw== 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 g69si277902pgc.159.2019.06.18.06.58.44; Tue, 18 Jun 2019 06:58:59 -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 S1729466AbfFRN62 (ORCPT + 99 others); Tue, 18 Jun 2019 09:58:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40357 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729398AbfFRN60 (ORCPT ); Tue, 18 Jun 2019 09:58:26 -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 4967F3002F32; Tue, 18 Jun 2019 13:58:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06CD04146; Tue, 18 Jun 2019 13:58:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B918717472; Tue, 18 Jun 2019 15:58:21 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve} Date: Tue, 18 Jun 2019 15:58:14 +0200 Message-Id: <20190618135821.8644-7-kraxel@redhat.com> In-Reply-To: <20190618135821.8644-1-kraxel@redhat.com> References: <20190618135821.8644-1-kraxel@redhat.com> 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.40]); Tue, 18 Jun 2019 13:58:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call reservation_object_* directly instead of using ttm_bo_{reserve,unreserve}. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 06cc0e961df6..91c320819a8c 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -402,7 +402,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) { int r; - r = ttm_bo_reserve(&bo->tbo, true, false, NULL); + r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); if (unlikely(r != 0)) { if (r != -ERESTARTSYS) { struct virtio_gpu_device *qdev = @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo) { - ttm_bo_unreserve(&bo->tbo); + reservation_object_unlock(bo->gem_base.resv); } /* virgl debufs */ -- 2.18.1