From patchwork Tue Nov 17 14:06:15 2020 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: 11912363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78F43C64E69 for ; Tue, 17 Nov 2020 14:06:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1BAC120729 for ; Tue, 17 Nov 2020 14:06:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iMj3VJTF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BAC120729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 468766E233; Tue, 17 Nov 2020 14:06:24 +0000 (UTC) Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id C51846E233 for ; Tue, 17 Nov 2020 14:06:20 +0000 (UTC) Received: by mail-ej1-x642.google.com with SMTP id y17so23929009ejh.11 for ; Tue, 17 Nov 2020 06:06:20 -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=oFyHoiV2d00mo5V49sT/52n1Qfw4rgsyOigOvwy2QxY=; b=iMj3VJTFLfOrPxcBH52cWhxLXPMM0y1PB6j6dPHRHemhFSO26WeZPXerYVhC0p6fzA bJdzTool0Gy8QrHSxNrnFBy3X/DPonbsiGOP3o7Njjaf4r4nBPgcchyOBRIE701ASbwB bgxNDRbL48ONoopDjFSAWTpaj6bPGIyL3V9EMslZx7vfCXXNtJeJMvHu0jO4Q188WhYZ QpcBsnPknIoKE9EKkcPDgs0VVYmBqlZwqVeHd89QaI25Fm14rK5CdpKicMtLuRvkeQJR dqT1YxjmVrTXtBUiZTsCzEAK3k2nSCFHPDN6ej8s2aF3k/MMUjYAi4XSrPH2LxZx5qm2 dx5A== 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=oFyHoiV2d00mo5V49sT/52n1Qfw4rgsyOigOvwy2QxY=; b=KVkvU18thBRBIrlq7FUYtbxUcOg+K6RtL8EkKQ1V27Mb0zohm5eWlrfV95DhKYy+Gi CaFdl5xW1p/Ot9b3LwII+O0/6QM3UvMJ2a4xu+F/Mn7vWJZ/izNZuLvA1W4m/I3HMLko d+j9lY0BUbMUPDQJl5GyDUGf4iuHS9lm62GtwUuM2Ra2gSt4cZtSXg/UUHm4tLRrVy9c rLubQlFK7wKez0or5quuaSbyIlhCfEg5ktD1rHZTCz1MRx3RynID/9thuC2upknSdmKG a0rsVpEKXOg6KZWW4fSmuKjZsjCfzQfXM3yMRwCD8EuKntZFdoQVT+BCwdNnlx9It6Hg zomQ== X-Gm-Message-State: AOAM533dXpnt0kLminxMXT2coBEG/T7btIi6gcDeXYSADKX7zuFieRjU FvVKzyujYYPj7B33SFbvypw= X-Google-Smtp-Source: ABdhPJxT0aRt7dNz8VGn0baSCWvCmgUQdQ6JZuKgQlCHV7JFilZmBkSJuG3nrtbiHDgoGDpTzQg5Vw== X-Received: by 2002:a17:906:1497:: with SMTP id x23mr20603707ejc.457.1605621979465; Tue, 17 Nov 2020 06:06:19 -0800 (PST) Received: from abel.fritz.box ([2a02:908:1252:fb60:4d18:8ca3:78f:2e63]) by smtp.gmail.com with ESMTPSA id h23sm11998900edv.69.2020.11.17.06.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 06:06:18 -0800 (PST) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: airlied@linux.ie, Felix.Kuehling@amd.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com, sroland@vmware.com Subject: [PATCH 3/3] drm/ttm: make up to 90% of system memory available Date: Tue, 17 Nov 2020 15:06:15 +0100 Message-Id: <20201117140615.255887-3-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201117140615.255887-1-christian.koenig@amd.com> References: <20201117140615.255887-1-christian.koenig@amd.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" Increase the ammount of system memory drivers can use to about 90% of the total available. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index a958135cb3fe..0a93df93dba4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1267,7 +1267,7 @@ static int ttm_bo_global_init(void) * the available system memory. */ num_pages = (u64)si.totalram * si.mem_unit; - num_pages = (num_pages * 50 / 100) >> PAGE_SHIFT; + num_pages = (num_pages * 90 / 100) >> PAGE_SHIFT; /* But for DMA32 we limit ourself to only use 2GiB maximum. */ num_dma32_pages = (u64)(si.totalram - si.totalhigh) * si.mem_unit;