[PATCH] drm/vram: fix incorrect flag variable usage.

Wen Pu puwen at hygon.cn
Thu Nov 19 07:34:28 UTC 2020


On 2020/11/19 9:14, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> In 7053e0eab473119503f6565b4e398f9a73122481
> drm/vram-helper: stop using TTM placement flags
> 
> it appears the flags got mixed up.
> 
> This should fix a regression on ast
> [   64.782340] WARNING: CPU: 51 PID: 1964 at drivers/gpu/drm/drm_gem_vram_helper.c:284 drm_gem_vram_offset+0x35/0x40 [drm_vram_helper]
......
> 

It may need this line:
Fixes: 7053e0eab473 ("drm/vram-helper: stop using TTM placement flags")

If possible, kindly add following tags as appropriate:
Reported-by: Pu Wen <puwen at hygon.cn>
Tested-by: Pu Wen <puwen at hygon.cn>

> Signed-off-by: Dave Airlie <airlied at redhat.com>> Cc: Wen Pu <puwen at hygon.cn>
> Cc: David Laight <David.Laight at aculab.com>
> Cc: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/drm_gem_vram_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index 50cad0e4a92e..2896a057b771 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -140,7 +140,7 @@ static void drm_gem_vram_placement(struct drm_gem_vram_object *gbo,
>  	unsigned int c = 0;
>  
>  	if (pl_flag & DRM_GEM_VRAM_PL_FLAG_TOPDOWN)
> -		pl_flag = TTM_PL_FLAG_TOPDOWN;
> +		invariant_flag = TTM_PL_FLAG_TOPDOWN;

invariant_flag should be invariant_flags :)

This change fix the regression on ast driver.

Thx.

>  
>  	gbo->placement.placement = gbo->placements;
>  	gbo->placement.busy_placement = gbo->placements;
> 

-- 
Regards,
Pu Wen


More information about the dri-devel mailing list