From patchwork Mon Oct 7 01:54:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11176713 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A353714DB for ; Mon, 7 Oct 2019 01:58:09 +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 8C15B20867 for ; Mon, 7 Oct 2019 01:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C15B20867 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 BF7A16E44C; Mon, 7 Oct 2019 01:58:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23E046E446; Mon, 7 Oct 2019 01:58:07 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id t3so1385999pga.8; Sun, 06 Oct 2019 18:58:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LgNE1dnflbO76HHoSzXDBrhS2Qt9Qg9bvtNf3mYw86I=; b=WlxO3gsI8i94PKfYqFkotsZPhBBLbOdaMJ1kgZx9ozzX9X+W0/5WKAiYiCh8ThhKIs lh6J4UL8WusAta3KEO9XbWUMMEH4jFYJW93ZK/irnOO77CXGaNHO6BmS/rKszVzWVe5S nxia73/Gn66MbLN1EzGxKgdGPasL0DfNpFpwLhocXt5C6GoyjSoMkx+0Vgl4GkHlADbv 6x5r6tpM4/+qs1owwW+1SMt/2NoZBpHobvHsHn/HF+jYygvaMfIEmdAaW8G76ckel8UN WdLNqjgYfVaaJ3n2B5A4WHa9q/0IgafUG3cX+quN5lzhSbyk8gWAKv0exKkQWEHrNm2r UFLQ== X-Gm-Message-State: APjAAAVBb0V4qcZ7BF2bBWKeV90geHCd12kE1aaLb1FOtPZcE76ukkDY h9ZhBgMeV5p0DpxQi4LlemI/myKTrZBHhA== X-Google-Smtp-Source: APXvYqzS/Iiu/DzwJdMmAKNvNxBzlJ8u+B/A+evWe5Ln4L1ldFFiJdumDYh5hM3R1F+6VPL0s6Zxqw== X-Received: by 2002:a17:90a:fa02:: with SMTP id cm2mr30602149pjb.133.1570413486546; Sun, 06 Oct 2019 18:58:06 -0700 (PDT) Received: from yuq-Aspire-4738G.lan (ah.ptr230.ptrcloud.net. [153.122.161.8]) by smtp.gmail.com with ESMTPSA id b123sm18328536pgc.72.2019.10.06.18.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Oct 2019 18:58:06 -0700 (PDT) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 6/6] drm/lima: add __GFP_NOWARN flag to all dma_alloc_wc Date: Mon, 7 Oct 2019 09:54:30 +0800 Message-Id: <20191007015430.20829-7-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007015430.20829-1-yuq825@gmail.com> References: <20191007015430.20829-1-yuq825@gmail.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LgNE1dnflbO76HHoSzXDBrhS2Qt9Qg9bvtNf3mYw86I=; b=naDxVso/GmVNPAAm8MTT1jO9c3h4dHgQkkKKKtBnFfV47IoEP9A0X8tgKuR7PIpSST yl3mvXh0KsaUTJzsrZAF164he2qhPv3BBCVtzHgWzL6pXbLeRZx4REmUcjvOf9gmiOU/ LlGdlqVxd0Ze4+LsqelEYMKXEYTAzsvuEwTV+s0SesaG6FT+DKJ4ySp1uDYqVxFv86Dj Kncitb78VM+fp8OaaGjZxX+49xCgQBfDMXswuthRsIP7IKCCzmt5Qtuf7z5N8X01aVdr g3A5hLEcelGSK6gufFm5jmg2c+uCKiZGDXc5mecWguAlu0LfnxkfeBF6xR+QF3dFPCsb jyyA== 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: , Cc: lima@lists.freedesktop.org, David Airlie , Maxime Ripard , Qiang Yu , Sean Paul MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This prevent CMA printing dumy "PFNs busy" info which is caused by alloc fail re-try case. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 2 +- drivers/gpu/drm/lima/lima_vm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c index d86b8d81a483..3d1a2b4d1005 100644 --- a/drivers/gpu/drm/lima/lima_device.c +++ b/drivers/gpu/drm/lima/lima_device.c @@ -313,7 +313,7 @@ int lima_device_init(struct lima_device *ldev) ldev->va_end = LIMA_VA_RESERVE_START; ldev->dlbu_cpu = dma_alloc_wc( ldev->dev, LIMA_PAGE_SIZE, - &ldev->dlbu_dma, GFP_KERNEL); + &ldev->dlbu_dma, GFP_KERNEL | __GFP_NOWARN); if (!ldev->dlbu_cpu) { err = -ENOMEM; goto err_out2; diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c index 8e69c4540e8b..840e2350d872 100644 --- a/drivers/gpu/drm/lima/lima_vm.c +++ b/drivers/gpu/drm/lima/lima_vm.c @@ -56,7 +56,7 @@ static int lima_vm_map_page(struct lima_vm *vm, dma_addr_t pa, u32 va) vm->bts[pbe].cpu = dma_alloc_wc( vm->dev->dev, LIMA_PAGE_SIZE << LIMA_VM_NUM_PT_PER_BT_SHIFT, - &vm->bts[pbe].dma, GFP_KERNEL | __GFP_ZERO); + &vm->bts[pbe].dma, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO); if (!vm->bts[pbe].cpu) return -ENOMEM; @@ -208,7 +208,7 @@ struct lima_vm *lima_vm_create(struct lima_device *dev) kref_init(&vm->refcount); vm->pd.cpu = dma_alloc_wc(dev->dev, LIMA_PAGE_SIZE, &vm->pd.dma, - GFP_KERNEL | __GFP_ZERO); + GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO); if (!vm->pd.cpu) goto err_out0;