From patchwork Wed Aug 31 09:34:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 12960597 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FAECECAAD1 for ; Wed, 31 Aug 2022 09:34:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7B6710E2B6; Wed, 31 Aug 2022 09:34:37 +0000 (UTC) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by gabe.freedesktop.org (Postfix) with ESMTPS id A6D5C10E2B4; Wed, 31 Aug 2022 09:34:33 +0000 (UTC) Received: by mail-ej1-x62d.google.com with SMTP id h5so15601479ejb.3; Wed, 31 Aug 2022 02:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=LyzVEZpAcOs03g6cb7ZXFSVg5DeiSEyIliByIbzxjy0=; b=XSokJLxe6P7UTrsiWvl1wwt4OOZsbK+5wwsIUk7d8SBFd5X+tY+tObxfxvDLjWEGQn dZEjqhI0gtUTuSC1No3ORTG/KYFl7iiSVUVGI3AfG+BLIIQvmclITM0mH7YCP4671FCH 9BV3j6vsJ01Ue6vYeIHj9Cj1gL9r6FaNzoXHWpev+yF9K/s9/CYHo3EEYTLWS2U5Nbrn PBdbULNBmyPPfmE9ryW/6TSjkNPXVa0vUukDG3Lbwo6q9PafLxAYUVUx6WjffYM+fnYt E8aho3UKS+uJYC8hyV6xOJc17BtMgJ8cv3cv4ekCnOG1XoPUzh99LWJVNL2BPXqubLf4 ogzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=LyzVEZpAcOs03g6cb7ZXFSVg5DeiSEyIliByIbzxjy0=; b=Yd2W/1yO+xZWw78qy+TCfS54qYETOriNpHEolhl4D5M7I1v2wYtDp+WpojnovmXn+A 6SJzJLaLe7SRtoj1QcAiIwAauJltGdnZjSyIGV1H2ifY7S40cvzrBw2H07XJ/+tVV+ZR ldJSNfRoV6xRU9Wb8Wb6aQgDG5mUTCuyItvIuU8ecW6n9DSADkH7dGarBujNJgn8+qh4 ynHQsnYhb0ZHMD7jbSFt4IBPWT8hYGEs4g8UoQQWnQl7vqPROA5PYHgSvMMAlCbElOo5 jYYX9HbgFu0bZBgMG2A2SPG9zB/yDsjTpb+/qHwQLfJjx0ItAClej6fDdTUX1TBRGpOs v3yg== X-Gm-Message-State: ACgBeo17Y9pvuMQ9vjf7pHSAnoPC9hUkyfeE9FN8acAImy7i9Btshu8S 5fo++BH2tyIh4JL/2x5+ld0= X-Google-Smtp-Source: AA6agR5vjAbum1imghVUmQE8sbTSfHUd+Y9Enu1vC7vpsh+8A7LQQBUb8/xrwYp2QmiGtq3OLiFK2A== X-Received: by 2002:a17:907:c002:b0:73d:d96c:c632 with SMTP id ss2-20020a170907c00200b0073dd96cc632mr18121224ejc.543.1661938472111; Wed, 31 Aug 2022 02:34:32 -0700 (PDT) Received: from able.fritz.box (p4fc20ad4.dip0.t-ipconnect.de. [79.194.10.212]) by smtp.gmail.com with ESMTPSA id d5-20020a056402400500b004466f5375a5sm5608983eda.53.2022.08.31.02.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 02:34:31 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: matthew.auld@intel.com, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Wed, 31 Aug 2022 11:34:27 +0200 Message-Id: <20220831093428.1397-2-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220831093428.1397-1-christian.koenig@amd.com> References: <20220831093428.1397-1-christian.koenig@amd.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/3] drm/ttm: stop allocating dummy resources during BO creation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl --- drivers/gpu/drm/ttm/ttm_bo.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index f066e8124c50..d7ed891d3887 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -959,7 +959,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, struct sg_table *sg, struct dma_resv *resv, void (*destroy) (struct ttm_buffer_object *)) { - static const struct ttm_place sys_mem = { .mem_type = TTM_PL_SYSTEM }; int ret; kref_init(&bo->kref); @@ -977,12 +976,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, bo->base.resv = &bo->base._resv; atomic_inc(&ttm_glob.bo_count); - ret = ttm_resource_alloc(bo, &sys_mem, &bo->resource); - if (unlikely(ret)) { - ttm_bo_put(bo); - return ret; - } - /* * For ttm_bo_type_device buffers, allocate * address space from the device.