From patchwork Fri Feb 16 09:26:34 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: 10224217 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 C887C602CB for ; Fri, 16 Feb 2018 09:26:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC5D29406 for ; Fri, 16 Feb 2018 09:26:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B355B2941A; Fri, 16 Feb 2018 09:26:43 +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 2B8092940B for ; Fri, 16 Feb 2018 09:26:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D0E56E5EE; Fri, 16 Feb 2018 09:26:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80B886E034; Fri, 16 Feb 2018 09:26:38 +0000 (UTC) Received: by mail-wr0-x241.google.com with SMTP id k32so2232557wrk.4; Fri, 16 Feb 2018 01:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=uheeZGC3C3/qjmC4PkwVA3+tEmRjlWvcD43u3VQIF0Q=; b=DeXxHKDLGcwPv9N3pbIS5Y6NqDW0WHTuS75bFX8+Wy8pwDqsEi20hK4lgJwGZVG0lP 9L8PjsZpdpZ28Aiizdxj/ux1lyoUpYEZKFN+uNR9jy8K/Hb0+1Cu7BicOE4VsILHm992 xZIM2Zp9bP/5/Ko+5MGxlDmt7PB5usgI7tmLH5sBculOw/LL/N4lVrGFC2+vNRdqzIaQ U7NzBbrl2DU0Xuw+F7AqSoLUJgVYWkz/rDEWrQ0oFrUOV+22bT9gGtQPFbk6egNPgKDo FgEx/G/rim2c7vHRyI9i1VIfZf9p+E+fAl/Wl87Vze3ZrPik0hacoA08RrvknA7fnqxO RxLA== 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:mime-version :content-transfer-encoding; bh=uheeZGC3C3/qjmC4PkwVA3+tEmRjlWvcD43u3VQIF0Q=; b=p8HA5z96FJN6vcKee0w+ifUanoO+G/SEl4bbTf8/5thzyNZ7OOMso0h65wAswiuqBq n/ZClgoCh/vgp3DeC01d1Am3PppHOhak2q7f3AKdhSdNL1DVB0WwiTd/98xkJJmHx+24 UfXaDQRzQrsgsoneMCi/LNQ/Ido7qM8XaMlkbVv6QpdwXpMjSDOjcX8nTJcf6JZCvB+d Y5XGLnw5AGiGB81ITgR31lFErHUrbWfnwWDffqjiNPmEuTo1bdHTojgLA8p/eKh8AGnh hZhg8zGlxR0KCPbbB5IlrnNNr1tede9/wfo+C05yrNN/Yuk2b6NrxYmZgHgxt6pvwsPh 7Nlw== X-Gm-Message-State: APf1xPAzpv9JfT5hJx41zFRKxeiUyFysC1iIlai9YXW5X5ZemjsbKu66 5MQvBZ1fCQhVspQ72FhRMo5yEA== X-Google-Smtp-Source: AH8x224dWXQuBGUm0K8vfxtt/yElEDeEJwaXdhV64x67qQsEwj7YsaJ/42ZIk5kgFEHnN9TkJNCAsg== X-Received: by 10.223.160.243 with SMTP id n48mr4297671wrn.92.1518773196911; Fri, 16 Feb 2018 01:26:36 -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.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Feb 2018 01:26:36 -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 1/2] drm/amdgpu: use drm_gem_private_object_init Date: Fri, 16 Feb 2018 10:26:34 +0100 Message-Id: <20180216092635.64271-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.14.1 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/amd/amdgpu/amdgpu_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 512612ec3557..969de54b62da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -371,11 +371,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo = kzalloc(sizeof(struct amdgpu_bo), GFP_KERNEL); if (bo == NULL) return -ENOMEM; - r = drm_gem_object_init(adev->ddev, &bo->gem_base, size); - if (unlikely(r)) { - kfree(bo); - return r; - } + drm_gem_private_object_init(adev->ddev, &bo->gem_base, size); INIT_LIST_HEAD(&bo->shadow_list); INIT_LIST_HEAD(&bo->va); bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |