[PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2

Marek Olšák maraeo at gmail.com
Tue May 13 12:47:51 PDT 2014


For the patch:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

It would be clearer if alt_domain was renamed to allowed_domains.

Marek

On Mon, May 12, 2014 at 3:30 PM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Some buffers (UVD/VM page tables) must be placed in VRAM,
> but the byte restriction for moving buffers didn't took this
> into account.
>
> v2: keep closer to the original code
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 72705fb..4faa4d6 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -458,7 +458,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
>                          * into account. We don't want to disallow buffer moves
>                          * completely.
>                          */
> -                       if (current_domain != RADEON_GEM_DOMAIN_CPU &&
> +                       if ((lobj->alt_domain & current_domain) != 0 &&
>                             (domain & current_domain) == 0 && /* will be moved */
>                             bytes_moved > bytes_moved_threshold) {
>                                 /* don't move it */
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list