Re: [PATCH 1/4] drm/radeon: rename alt_domain to allowed_domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks. This patch is:

Reviewed-by: Marek Olšák <marek.olsak@xxxxxxx>

Marek

On Mon, Jun 2, 2014 at 5:33 PM, Christian König <deathsimple@xxxxxxxxxxx> wrote:
> From: Christian König <christian.koenig@xxxxxxx>
>
> And also domain to prefered_domains. That matches better
> what those values represent.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> Cc: Marek Olšák <maraeo@xxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/radeon.h        | 4 ++--
>  drivers/gpu/drm/radeon/radeon_cs.c     | 8 ++++----
>  drivers/gpu/drm/radeon/radeon_object.c | 9 +++++----
>  drivers/gpu/drm/radeon/radeon_vm.c     | 8 ++++----
>  4 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 7501ba31..babb7f1 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -997,8 +997,8 @@ struct radeon_cs_reloc {
>         struct radeon_bo                *robj;
>         struct ttm_validate_buffer      tv;
>         uint64_t                        gpu_offset;
> -       unsigned                        domain;
> -       unsigned                        alt_domain;
> +       unsigned                        prefered_domains;
> +       unsigned                        allowed_domains;
>         uint32_t                        tiling_flags;
>         uint32_t                        handle;
>  };
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 41ecf8a..71a1434 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -140,10 +140,10 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
>                 if (p->ring == R600_RING_TYPE_UVD_INDEX &&
>                     (i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
>                         /* TODO: is this still needed for NI+ ? */
> -                       p->relocs[i].domain =
> +                       p->relocs[i].prefered_domains =
>                                 RADEON_GEM_DOMAIN_VRAM;
>
> -                       p->relocs[i].alt_domain =
> +                       p->relocs[i].allowed_domains =
>                                 RADEON_GEM_DOMAIN_VRAM;
>
>                         /* prioritize this over any other relocation */
> @@ -158,10 +158,10 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
>                                 return -EINVAL;
>                         }
>
> -                       p->relocs[i].domain = domain;
> +                       p->relocs[i].prefered_domains = domain;
>                         if (domain == RADEON_GEM_DOMAIN_VRAM)
>                                 domain |= RADEON_GEM_DOMAIN_GTT;
> -                       p->relocs[i].alt_domain = domain;
> +                       p->relocs[i].allowed_domains = domain;
>                 }
>
>                 p->relocs[i].tv.bo = &p->relocs[i].robj->tbo;
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 2918087..6c717b2 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -446,7 +446,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
>         list_for_each_entry(lobj, head, tv.head) {
>                 bo = lobj->robj;
>                 if (!bo->pin_count) {
> -                       u32 domain = lobj->domain;
> +                       u32 domain = lobj->prefered_domains;
>                         u32 current_domain =
>                                 radeon_mem_type_to_domain(bo->tbo.mem.mem_type);
>
> @@ -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 ((lobj->alt_domain & current_domain) != 0 &&
> +                       if ((lobj->allowed_domains & current_domain) != 0 &&
>                             (domain & current_domain) == 0 && /* will be moved */
>                             bytes_moved > bytes_moved_threshold) {
>                                 /* don't move it */
> @@ -476,8 +476,9 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
>                                        initial_bytes_moved;
>
>                         if (unlikely(r)) {
> -                               if (r != -ERESTARTSYS && domain != lobj->alt_domain) {
> -                                       domain = lobj->alt_domain;
> +                               if (r != -ERESTARTSYS &&
> +                                   domain != lobj->allowed_domains) {
> +                                       domain = lobj->allowed_domains;
>                                         goto retry;
>                                 }
>                                 ttm_eu_backoff_reservation(ticket, head);
> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> index a72e9c8..d3c9161 100644
> --- a/drivers/gpu/drm/radeon/radeon_vm.c
> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> @@ -140,8 +140,8 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
>         /* add the vm page table to the list */
>         list[0].gobj = NULL;
>         list[0].robj = vm->page_directory;
> -       list[0].domain = RADEON_GEM_DOMAIN_VRAM;
> -       list[0].alt_domain = RADEON_GEM_DOMAIN_VRAM;
> +       list[0].prefered_domains = RADEON_GEM_DOMAIN_VRAM;
> +       list[0].allowed_domains = RADEON_GEM_DOMAIN_VRAM;
>         list[0].tv.bo = &vm->page_directory->tbo;
>         list[0].tiling_flags = 0;
>         list[0].handle = 0;
> @@ -153,8 +153,8 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
>
>                 list[idx].gobj = NULL;
>                 list[idx].robj = vm->page_tables[i].bo;
> -               list[idx].domain = RADEON_GEM_DOMAIN_VRAM;
> -               list[idx].alt_domain = RADEON_GEM_DOMAIN_VRAM;
> +               list[idx].prefered_domains = RADEON_GEM_DOMAIN_VRAM;
> +               list[idx].allowed_domains = RADEON_GEM_DOMAIN_VRAM;
>                 list[idx].tv.bo = &list[idx].robj->tbo;
>                 list[idx].tiling_flags = 0;
>                 list[idx].handle = 0;
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux