From patchwork Fri Feb 16 09:26:35 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: 10224219 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 B2DE9602CB for ; Fri, 16 Feb 2018 09:26:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA05329406 for ; Fri, 16 Feb 2018 09:26:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ED1829410; Fri, 16 Feb 2018 09:26:45 +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 6B89B29406 for ; Fri, 16 Feb 2018 09:26:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F1656E5F5; Fri, 16 Feb 2018 09:26:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E5696E034; Fri, 16 Feb 2018 09:26:39 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id k9so2215742wre.9; Fri, 16 Feb 2018 01:26:39 -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=azE1QdP8adYfZDR8b6CBC8krSLPlCdxXZlLZwdAkVvA=; b=rNskVrPR0tCIJASfhDe0Igu/tK+YcPo2/Z7hRQAMgV8JB4RrNcyV6zKXa5sTAXYogK pFZlseNoC6BHC/58WxmstturYiwuMZ8heBnj+3Ti9xwX/ck3EOS+baQVwOJI2tJ9EdvA 2XYICSEGUuQd/p8+t6TusV8qwjQ3wW0lvklSGdgV5ilOp09/GxTpDYnsDbhOZn/FfEwv fvbmU5+PxokFEmqaseSfZGV3MMsESh0oqrkl4lN2yG58/MPA+sd94xgTAGUNaAcE6x9D QzQ74qvgiSEdvjplqO3edmKOuROe5pMRFnubCByHIzPcRJeOAOxyaZ47lD0AzVPFdmwY aH0g== 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=azE1QdP8adYfZDR8b6CBC8krSLPlCdxXZlLZwdAkVvA=; b=RKJCUVw/nmUHGv0V3qYRSJCBTzbkXt3rpcnYIP0ad61ISyy2G+ypU+lgQyWtbE2+rY QImKoyhW4XarcQDHxzxkY7FeFEn1zzSPkHnwkp1wnrf/JRWaZxn4B8DoVlQJp80lvb9K WOp3Pg6w9ANgs3+BhjAEONibAZ7d3EYQECMllolQWRvRXu6+lD61xJe8uGJv53QsmOTw PWfKikXcsqD6N3QZ814RaIWHP1ClFZZfLI0Ku9Z1pUYIcMpikdycuDj1f75Vhl1Sm90F slTqngmTs33fynBGlRvfiPgiyZWaC6uKemMX2/BEYKZ7ybRWOAFjYGmnjkzEgtGI1Kve Pyfw== X-Gm-Message-State: APf1xPALxEbK6lsIrnlSjsOlnqfcEmDmNmiL9c8HaFbHlY+Gj6AP0hhf bssTvP1tOO1HOQOb5rWnzCyVLA== X-Google-Smtp-Source: AH8x225NrYyyjoWlum13lWUrgtKHN0cb0sPJ7fZ5BJkfvj3AqFNSC9oSr8IECBCO85ESMYdbbI4RhA== X-Received: by 10.223.150.102 with SMTP id c35mr5194477wra.225.1518773197712; Fri, 16 Feb 2018 01:26:37 -0800 (PST) Received: from baker.fritz.box ([2a02:908:1251:8fc0:602f:e390:1e0f:ebf3]) by smtp.gmail.com with ESMTPSA id z73sm36622372wrb.50.2018.02.16.01.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Feb 2018 01:26:37 -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/2] drm/radeon: use drm_gem_private_object_init Date: Fri, 16 Feb 2018 10:26:35 +0100 Message-Id: <20180216092635.64271-2-christian.koenig@amd.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180216092635.64271-1-christian.koenig@amd.com> References: <20180216092635.64271-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 We use our own backing store and don't need the shmem file. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 15404af9d740..c38fea37a67d 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -204,11 +204,7 @@ int radeon_bo_create(struct radeon_device *rdev, bo = kzalloc(sizeof(struct radeon_bo), GFP_KERNEL); if (bo == NULL) return -ENOMEM; - r = drm_gem_object_init(rdev->ddev, &bo->gem_base, size); - if (unlikely(r)) { - kfree(bo); - return r; - } + drm_gem_private_object_init(rdev->ddev, &bo->gem_base, size); bo->rdev = rdev; bo->surface_reg = -1; INIT_LIST_HEAD(&bo->list);