[Mesa-dev] [PATCH] winsys/radeon: Allow visible VRAM size > 256MB with kernel driver >= 2.49

Deucher, Alexander Alexander.Deucher at amd.com
Tue Jan 31 15:30:47 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Tuesday, January 31, 2017 1:54 AM
> To: amd-gfx at lists.freedesktop.org; mesa-dev at lists.freedesktop.org
> Subject: [PATCH] winsys/radeon: Allow visible VRAM size > 256MB with
> kernel driver >= 2.49
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> The kernel driver reports correct values now.
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> index a8da62fd36..cacd683879 100644
> --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> @@ -372,7 +372,12 @@ static bool do_winsys_init(struct
> radeon_drm_winsys *ws)
>      }
>      ws->info.gart_size = gem_info.gart_size;
>      ws->info.vram_size = gem_info.vram_size;
> -    ws->info.vram_vis_size = MIN2(gem_info.vram_visible, 256*1024*1024);
> +    ws->info.vram_vis_size = gem_info.vram_visible;
> +    /* Older versions of the kernel driver reported incorrect values, and
> +     * didn't support more than 256MB of visible VRAM anyway
> +     */
> +    if (ws->info.drm_minor < 49)
> +        ws->info.vram_vis_size = MIN2(ws->info.vram_vis_size,
> 256*1024*1024);
> 
>      /* Radeon allocates all buffers as contigous, which makes large allocations
>       * unlikely to succeed. */
> --
> 2.11.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the mesa-dev mailing list