From patchwork Thu Oct 10 14:01:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11183661 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 F3D5476 for ; Thu, 10 Oct 2019 14:03:16 +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 DBD41206A1 for ; Thu, 10 Oct 2019 14:03:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBD41206A1 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 385186EB4E; Thu, 10 Oct 2019 14:03:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 833006EB4E; Thu, 10 Oct 2019 14:03:15 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id i76so3751544pgc.0; Thu, 10 Oct 2019 07:03:15 -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=IewVY57uz1/Kiphd8vb0bt/QUlZQEPyJi2R//qFblJc=; b=Q6C3xkMrmzki73LFWbYOky8/YNEU3oxRAZaGGh7y3lnF0I3hZLfm2Md2dbYhUgYOt6 hCAMShMyJ589VFa0vWaJja4rRYhWExRmq+9jQweEzUGZC2oFMx8UiYparRF033mxIBZc b3U5XyGVgzptxfyTn/O6t65oSvbIVDbRgILFJ1eqo14v2QyQetI+qIDLldCUiPQlQdBZ 5XVSMKswYTBC0cdX7+3hRDzXZfL5eHILnVRQovp6C+D+Lz367uugx4xpoadkCFHQhvhW nyWrXwPXIcQRRdUg6ynXN56xp+gjt7mskDkWmx0l9mLZ+bUQ6B5uS32HRBmH2x2o++Ba 77tA== X-Gm-Message-State: APjAAAU8rlIDG7usIxwhvUHPcY+qWn1CYu49MV/a1TnTSoz1mQbOW8WN JrgPneDF4y8dH4emvOeb59QJRZd5Bbg= X-Google-Smtp-Source: APXvYqw/6s0G32k+wU3EgmEOjvkhCtrWEdR/ys/wReF3V2JKGJPv6VOqLvhBkMPgmYoFAEaROt7oQg== X-Received: by 2002:a17:90a:bc41:: with SMTP id t1mr11532426pjv.67.1570716194485; Thu, 10 Oct 2019 07:03:14 -0700 (PDT) Received: from localhost.localdomain (ah.ptr230.ptrcloud.net. [153.122.161.8]) by smtp.gmail.com with ESMTPSA id h14sm5523371pfo.15.2019.10.10.07.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 07:03:13 -0700 (PDT) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 3/3] drm/lima: add __GFP_NOWARN flag to all dma_alloc_wc Date: Thu, 10 Oct 2019 22:01:52 +0800 Message-Id: <20191010140152.17747-4-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010140152.17747-1-yuq825@gmail.com> References: <20191010140152.17747-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=IewVY57uz1/Kiphd8vb0bt/QUlZQEPyJi2R//qFblJc=; b=AGm9LzhsHj2mSPK6XzZPf4a9jdFceo6KmnMxVYg+oNSW1c6xe5QL4/Y/bOIAyModji Jy8azHHgcU9MgLazsFHOgraVZGmOtoGMnpawCJHEMZTaRt6swufDRf64wxRRUEV+WkBs P/6neGYfzVmr4f/74ilS8E5jd7pSSV1py2gQjV+HfVLwNaUVnydZN7oXpjc8P9x+9hud KI76KRYpuBb75PASva77Rjrf6V7j9ufxg7g1ktU3QzzVW921X/IlF3kCARrhS9PQ9Msw 4oqqOJNxQhvu2MKEy9GzvHUzTCcP97AsrDm1dj5XGgMfZ1PJ+MJDxtcLghWvjdwb8Lwv 9OgA== 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 , 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 e3e0ca11382e..19829b543024 100644 --- a/drivers/gpu/drm/lima/lima_device.c +++ b/drivers/gpu/drm/lima/lima_device.c @@ -314,7 +314,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;