[PATCH 49/88] drm/amdgpu: remove AMDGPU_GEM_CREATE_CPU_GTT_UC

Oded Gabbay oded.gabbay at gmail.com
Sat Jun 6 10:08:39 PDT 2015


Hi Alex,
I think you have a mistake in this patch.
You renamed AMDGPU_GEM_CREATE_CPU_GTT_WC to AMDGPU_GEM_CREATE_CPU_GTT_USWC,
however, AMDGPU_GEM_CREATE_CPU_GTT_WC was defined as (1 << 3) and
AMDGPU_GEM_CREATE_CPU_GTT_USWC is defined as (1 << 2)

Oded

On Wed, May 27, 2015 at 6:22 AM Alex Deucher <alexdeucher at gmail.com> wrote:

> From: Jammy Zhou <Jammy.Zhou at amd.com>
>
> This flag isn't used by user mode drivers, remove it to avoid
> confusion. And rename GTT_WC to GTT_USWC to make it clear.
>
> Signed-off-by: Jammy Zhou <Jammy.Zhou at amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 10 ++--------
>  include/uapi/drm/amdgpu_drm.h              |  7 ++-----
>  2 files changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index f5e17f9..992b7f5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -132,10 +132,7 @@ void amdgpu_ttm_placement_from_domain(struct
> amdgpu_bo *rbo, u32 domain)
>         }
>
>         if (domain & AMDGPU_GEM_DOMAIN_GTT) {
> -               if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_UC) {
> -                       rbo->placements[c].fpfn = 0;
> -                       rbo->placements[c++].flags = TTM_PL_FLAG_UNCACHED
> | TTM_PL_FLAG_TT;
> -               } else if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_WC) {
> +               if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) {
>                         rbo->placements[c].fpfn = 0;
>                         rbo->placements[c++].flags = TTM_PL_FLAG_WC |
> TTM_PL_FLAG_TT |
>
>        TTM_PL_FLAG_UNCACHED;
> @@ -146,10 +143,7 @@ void amdgpu_ttm_placement_from_domain(struct
> amdgpu_bo *rbo, u32 domain)
>         }
>
>         if (domain & AMDGPU_GEM_DOMAIN_CPU) {
> -               if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_UC) {
> -                       rbo->placements[c].fpfn = 0;
> -                       rbo->placements[c++].flags =  TTM_PL_FLAG_UNCACHED
> | TTM_PL_FLAG_SYSTEM;
> -               } else if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_WC) {
> +               if (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) {
>                         rbo->placements[c].fpfn = 0;
>                         rbo->placements[c++].flags = TTM_PL_FLAG_WC |
> TTM_PL_FLAG_SYSTEM |
>
>        TTM_PL_FLAG_UNCACHED;
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 9e771fb..77bc574 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -73,15 +73,12 @@
>  #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED  (1 << 0)
>  /* Flag that CPU access will not work, this VRAM domain is invisible */
>  #define AMDGPU_GEM_CREATE_NO_CPU_ACCESS                (1 << 1)
> -/* Flag that un-cached attributes should be used for GTT */
> -#define AMDGPU_GEM_CREATE_CPU_GTT_UC           (1 << 2)
>  /* Flag that USWC attributes should be used for GTT */
> -#define AMDGPU_GEM_CREATE_CPU_GTT_WC           (1 << 3)
> +#define AMDGPU_GEM_CREATE_CPU_GTT_USWC         (1 << 2)
>
>  /* Flag mask for GTT domain_flags */
>  #define AMDGPU_GEM_CREATE_CPU_GTT_MASK \
> -       (AMDGPU_GEM_CREATE_CPU_GTT_WC | \
> -        AMDGPU_GEM_CREATE_CPU_GTT_UC | \
> +       (AMDGPU_GEM_CREATE_CPU_GTT_USWC | \
>          AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | \
>          AMDGPU_GEM_CREATE_NO_CPU_ACCESS)
>
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150606/7a94b66b/attachment-0001.html>


More information about the dri-devel mailing list