From patchwork Fri Feb 2 19:09:45 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: 10198025 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 2703860388 for ; Fri, 2 Feb 2018 19:09:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 178BC28F53 for ; Fri, 2 Feb 2018 19:09:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C5B928F56; Fri, 2 Feb 2018 19:09:57 +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 C948728F53 for ; Fri, 2 Feb 2018 19:09:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF0DB6F05F; Fri, 2 Feb 2018 19:09:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE41F6EE0A; Fri, 2 Feb 2018 19:09:51 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id v71so14434745wmv.2; Fri, 02 Feb 2018 11:09: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=oNkxYmnpT1xfxUrUcEWAJ+i+h0QcZIJwUu1TgRJMRA0=; b=qOb2JVkWIhQEiM9Gcj0HDBWCBi14NONPm4vhXvwh8/A6ifEFsB4iWgA6btQtUEOgxo SUrJxGZVK/JAszfB/4TpFifBe8PG/dxJLhteAymSZ4L+f+1EOU91LZ5Eo1q09Yir5j6i XJpqfwsZ/srXgs1pHKpPOqB4G3+2Mw4AoHGkYyiEQNxKrvWdB0yV7i8AgyQ//c1Ow+mb ETpTCzhcTChSAYedqaLXDf9ian8JURkrpCimkxNXapyIOLYoyqI6w6AK067QKRFtmb3A 60O1fl6raeU6uFVluNArY8jlyiT5lQTEXJU1iAg7nPDtBaI06XXzDt9UDaNrBRDBLYhX xm4Q== 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=oNkxYmnpT1xfxUrUcEWAJ+i+h0QcZIJwUu1TgRJMRA0=; b=FXRR8fIW5pf7RMU2UWJgZCQ6zL3EeWHYHyBmOMVQPxkuNnf1E5MUB/2hGe1izXFpbl azYYrsUeEPVfWSW0Q4cNXnSOMB8l2M0hCvOngtlGSpx4vin+NhxotTRJlS4YyoGKQmpu j9Y982RiIkrR1ZoaqfsSSXuewTT1yrwYFg61Ftq6IBwYrkm40AWdZHAufiS7HzbfcxYw baHAx/ykz6F32QqOn+9ZDkcj/Np7JWuWKB82WeGLAdnElT8c+8C++V6i0jQn8K08ceox 90ZGa2y4NqxmRrf74tfj4Nh164sUPgTII3Z2vF/JNbRneQQUM6tIM9IZzd5OeSJig1Gt tiQg== X-Gm-Message-State: AKwxytfAG4ScIBw7B5MgQVCVkr7fb2DDu+N0/j6DCqhjRB0jJkHq1e5f 0957hjIWzqtGoPoGQ2PCaCpsUA== X-Google-Smtp-Source: AH8x226UzZFTl/5pVXhR43Hq3SeaTloiQMPFv8R2CRZpc91AfISA7ctcZEDn8p7P3QQnhq5aJR+RTQ== X-Received: by 10.28.146.197 with SMTP id u188mr31265630wmd.124.1517598590484; Fri, 02 Feb 2018 11:09:50 -0800 (PST) Received: from baker.fritz.box ([2a02:908:1251:8fc0:ad10:3711:be7c:8502]) by smtp.gmail.com with ESMTPSA id j132sm3917316wmd.38.2018.02.02.11.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2018 11:09:50 -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 2/5] drm/amdgpu: remove extra TT unpopulated check Date: Fri, 2 Feb 2018 20:09:45 +0100 Message-Id: <20180202190948.2654-2-christian.koenig@amd.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180202190948.2654-1-christian.koenig@amd.com> References: <20180202190948.2654-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 The subsystem chould check that, not the driver. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 95f990140f2a..648c449aaa79 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -997,9 +997,6 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm, struct amdgpu_ttm_tt *gtt = (void *)ttm; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); - if (ttm->state != tt_unpopulated) - return 0; - if (gtt && gtt->userptr) { ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL); if (!ttm->sg)