From patchwork Tue Mar 6 14:43:44 2018 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: 10261955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB29D602C8 for ; Tue, 6 Mar 2018 14:43:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC04D2900A for ; Tue, 6 Mar 2018 14:43:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0B182900D; Tue, 6 Mar 2018 14:43:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7062E2900A for ; Tue, 6 Mar 2018 14:43:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C22796E0F3; Tue, 6 Mar 2018 14:43:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 052D96E0BB; Tue, 6 Mar 2018 14:43:52 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id m12so21163807wrm.13; Tue, 06 Mar 2018 06:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=X7nOGK2jDb/H5PAf6lGT6JTNr5qCmxHXd1x+ygLJLTA=; b=QwE0T74z5hPixtn8ssiZdtGonuIc8qFLBzvv070yqTSXNDdW15R93yAwAd/5RGSLyI UVbZKyCHFq6PMZh4VPx+xd+/Slwj8+F37TmxmRES/w16oa/Bji753F87usr+qFCFDNv7 heKYxYN87le1mSumtJk1Cx8R+GQjI1UCXZdPSolbhV5F6AWgNxkpymqEwqv9ZDJgUzNX JPEJbMG6qG3ic30CGueZ4jOs6mtOFc1o3VhfEWEzcebFrT8O+Jvkbst/pN2oktMXSvAL ZqaKQOhUB1XtGq4obfKRK80sHJ9Jkv3Qra1LwxiTE5FStAwE29P6sx+11b94GK2HlwGu NinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X7nOGK2jDb/H5PAf6lGT6JTNr5qCmxHXd1x+ygLJLTA=; b=QSy6Rhu1YOStij42FiufPyY9C2ooGhZWzPrEngUEWnEDau2G+60Puv1/K7Q+Uw1/oA 48ak55OAZV4ClltUzBd9UWxAb/eHYZ+eGkD5D3GJW6kV43q60i9w6fWl/6TF1MRchN3G H+BvqOjrnh6MTRfGE/pXq83Xkry7p0a0PpMgmjCRQU31sr+UfAd0nwGdvlx80evclaPF 7afmyZT9J4pgpctIs7lJH15SxkcO07QVVCejiqcpkb5US/VihcdFPvtlYFxmbsMXTN+v WTAW7JhCCvIxgCojQofSKSTY3LA3CMzp/6eItn3AvKbUw2R0CYQxVYW44SrW+npngnIn sWtQ== X-Gm-Message-State: APf1xPAqRPMblNqoKwQV+vyCePvCgdDLXaxEAyxeorTX2eehqq+zXSaN ucYJUK6Iscce1sxVUZVignxkfA== X-Google-Smtp-Source: AG47ELvjoSqV0CTHliCGcHe63vQrZqTJNIXrWNmstiiotX1yw/jlrOElyWc6m5j1dO3erXZlK9sL6w== X-Received: by 10.223.171.247 with SMTP id s110mr16353785wrc.106.1520347430450; Tue, 06 Mar 2018 06:43:50 -0800 (PST) Received: from baker.fritz.box ([2a02:908:1251:8fc0:44ab:16c7:7c4f:90f9]) by smtp.gmail.com with ESMTPSA id s21sm13419206wra.45.2018.03.06.06.43.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 06:43:49 -0800 (PST) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm/ttm: move initializing ttm->sg into ttm_tt_init_fields Date: Tue, 6 Mar 2018 15:43:44 +0100 Message-Id: <20180306144347.1702-3-christian.koenig@amd.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180306144347.1702-1-christian.koenig@amd.com> References: <20180306144347.1702-1-christian.koenig@amd.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Better to set this with all other fields as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 65976238d24b..7e672be987b5 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -77,9 +77,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) if (unlikely(bo->ttm == NULL)) return -ENOMEM; - if (bo->type == ttm_bo_type_sg) - bo->ttm->sg = bo->sg; - return 0; } @@ -245,6 +242,7 @@ void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_buffer_object *bo, ttm->page_flags = page_flags; ttm->state = tt_unpopulated; ttm->swap_storage = NULL; + ttm->sg = bo->sg; } int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,