[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <761c07a9-a507-44a6-94e5-69655881c137@linux.dev>
Date: Sat, 31 Aug 2024 03:40:11 +0800
From: Sui Jingfeng <sui.jingfeng@...ux.dev>
To: "Wang, Xiaolei" <Xiaolei.Wang@...driver.com>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
"linux+etnaviv@...linux.org.uk" <linux+etnaviv@...linux.org.uk>,
"christian.gmeiner@...il.com" <christian.gmeiner@...il.com>,
"airlied@...il.com" <airlied@...il.com>, "daniel@...ll.ch" <daniel@...ll.ch>
Cc: "etnaviv@...ts.freedesktop.org" <etnaviv@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [v2] drm/etnaviv: Clear the __GFP_HIGHMEM bit in GFP_HIGHUSER
with 32 address
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;|"
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
Powered by blists - more mailing lists