From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6F2B3CA0FE8 for ; Fri, 30 Aug 2024 19:49:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A3A3710E02E; Fri, 30 Aug 2024 19:49:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.b="UVUQhKxz"; dkim-atps=neutral Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E60C10E0B9 for ; Fri, 30 Aug 2024 19:49:12 +0000 (UTC) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725047350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jlo7JXcZy13WFGclfaaL1pYp+Vqeb6IGWRjH5IJWAM8=; b=UVUQhKxzPkbU6KYHPDeNVPypYrkPwtMT9wxRxMe3vaHiVR6pTwY2ikE7u8Vsy2KBMCHza7 qpat9lOCHFyBqpERh7nv3Rt50e9fyuP/pt3NXejBp3NC/vwTzEiRDV+QW8AujIlywr7s65 unHj1N2lBjwdEZVdKaPmXV6yuns67fc= Date: Sat, 31 Aug 2024 03:48:49 +0800 MIME-Version: 1.0 Subject: Re: [v2] drm/etnaviv: Clear the __GFP_HIGHMEM bit in GFP_HIGHUSER with 32 address X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng To: "Wang, Xiaolei" , "l.stach@pengutronix.de" , "linux+etnaviv@armlinux.org.uk" , "christian.gmeiner@gmail.com" , "airlied@gmail.com" , "daniel@ffwll.ch" Cc: "etnaviv@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" References: <761c07a9-a507-44a6-94e5-69655881c137@linux.dev> Content-Language: en-US In-Reply-To: <761c07a9-a507-44a6-94e5-69655881c137@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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" On 2024/8/31 03:40, Sui Jingfeng wrote: > Hi, Xiaolei > > > On 2024/8/16 09:55, Wang, Xiaolei wrote: >> Ping ... > > I think, the more proper fix that Lucas hint > is to modify the 'priv->shm_gfp_mask' variable > in the|etnaviv_bind() function|. Say: > |Use "priv->shm_gfp_mask = GFP_USER | __GFP_RETRY_MAYFAIL | > __GFP_NOWARN;"| > > instead of > > |"priv->shm_gfp_mask = ||GFP_HIGHUSER||| __GFP_RETRY_MAYFAIL | > __GFP_NOWARN;|" > > Oops, please ignore the irrelevant(superfluous) "|" characters in my reply, my Thunderbird mail client has some problem, generate them unreasonably. Should be: priv->shm_gfp_mask = GFP_USER | __GFP_RETRY_MAYFAIL | __GFP_NOWARN; > Right? > >> thanks >> xiaolei >> >> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c >> b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c >> index 7c7f97793ddd..0e6bdf2d028b 100644 >> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c >> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c >> @@ -844,8 +844,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) >>            * request pages for our SHM backend buffers from the DMA32 >> zone to >>            * hopefully avoid performance killing SWIOTLB bounce >> buffering. >>            */ >> -       if (dma_addressing_limited(gpu->dev)) >> +       if (dma_addressing_limited(gpu->dev)) { >>                   priv->shm_gfp_mask |= GFP_DMA32; >> +               priv->shm_gfp_mask &= ~__GFP_HIGHMEM; >> +       } >> >>           /* Create buffer: */ >>           ret = etnaviv_cmdbuf_init(priv->cmdbuf_suballoc, &gpu->buffer, > -- Best regards, Sui