]> Git Repo - J-linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
Merge tag 'x86_bugs_pbrsb' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[J-linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.c
index 5444515c1476e1f5f093497b156c0c62e3587a0a..4570ad4493905869ccd04f9fb639d9214d5e87a3 100644 (file)
@@ -567,6 +567,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
                bp->domain;
        bo->allowed_domains = bo->preferred_domains;
        if (bp->type != ttm_bo_type_kernel &&
+           !(bp->flags & AMDGPU_GEM_CREATE_DISCARDABLE) &&
            bo->allowed_domains == AMDGPU_GEM_DOMAIN_VRAM)
                bo->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT;
 
@@ -881,6 +882,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
        if (WARN_ON_ONCE(min_offset > max_offset))
                return -EINVAL;
 
+       /* Check domain to be pinned to against preferred domains */
+       if (bo->preferred_domains & domain)
+               domain = bo->preferred_domains & domain;
+
        /* A shared bo cannot be migrated to VRAM */
        if (bo->tbo.base.import_attach) {
                if (domain & AMDGPU_GEM_DOMAIN_GTT)
@@ -1018,7 +1023,9 @@ static const char *amdgpu_vram_names[] = {
        "DDR3",
        "DDR4",
        "GDDR6",
-       "DDR5"
+       "DDR5",
+       "LPDDR4",
+       "LPDDR5"
 };
 
 /**
This page took 0.028157 seconds and 4 git commands to generate.