Merge tag 'amd-drm-next-5.14-2021-05-19' of https://gitlab.freedesktop.org/agd5f...
authorDave Airlie <airlied@redhat.com>
Fri, 21 May 2021 05:29:34 +0000 (15:29 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 21 May 2021 05:29:40 +0000 (15:29 +1000)
amd-drm-next-5.14-2021-05-19:

amdgpu:
- Aldebaran updates
- More LTTPR display work
- Vangogh updates
- SDMA 5.x GCR fixes
- RAS fixes
- PCIe ASPM support
- Modifier fixes
- Enable TMZ on Renoir
- Buffer object code cleanup
- Display overlay fixes
- Initial support for multiple eDP panels
- Initial SR-IOV support for Aldebaran
- DP link training refactor
- Misc code cleanups and bug fixes
- SMU regression fixes for variable sized arrays
- MAINTAINERS fixes for amdgpu

amdkfd:
- Initial SR-IOV support for Aldebaran
- Topology fixes
- Initial HMM SVM support
- Misc code cleanups and bug fixes

radeon:
- Misc code cleanups and bug fixes
- SMU regression fixes for variable sized arrays
- Flickering fix for Oland with multiple 4K displays

UAPI:
- amdgpu: Drop AMDGPU_GEM_CREATE_SHADOW flag.
  This was always a kernel internal flag and userspace use of it has always been blocked.
  It's no longer needed so remove it.
- amdkgd: HMM SVM support
  Overview: https://patchwork.freedesktop.org/series/85562/
  Porposed userspace: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/tree/fxkamd/hmm-wip

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210520031258.231896-1-alexander.deucher@amd.com
15 files changed:
1  2 
MAINTAINERS
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc_link.h

diff --cc MAINTAINERS
index a7a1c8e21a2ea0d6d153fbf58a23fba09817c078,32e47e4111b534946dbd2884172a07886df73194..315120c4124d5a46b09e4b230e851e96826dfc0d
@@@ -878,9 -867,16 +878,9 @@@ M:        Harry Wentland <harry.wentland@amd.c
  M:    Leo Li <sunpeng.li@amd.com>
  L:    amd-gfx@lists.freedesktop.org
  S:    Supported
- T:    git git://people.freedesktop.org/~agd5f/linux
+ T:    git https://gitlab.freedesktop.org/agd5f/linux.git
  F:    drivers/gpu/drm/amd/display/
  
 -AMD ENERGY DRIVER
 -M:    Naveen Krishna Chatradhi <nchatrad@amd.com>
 -L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/hwmon/amd_energy.rst
 -F:    drivers/hwmon/amd_energy.c
 -
  AMD FAM15H PROCESSOR POWER MONITORING DRIVER
  M:    Huang Rui <ray.huang@amd.com>
  L:    linux-hwmon@vger.kernel.org
index d216b7ecb5d115070b4bbbeb9a83eb139f4730fd,418e6747b3d5fa66fa37d7bdc0fa3de86cc802f7..cc36570b0d2f06027bf66eb8ae6687bc0e245fcf
@@@ -56,10 -56,8 +56,10 @@@ amdgpu-y += amdgpu_device.o amdgpu_kms.
        amdgpu_gmc.o amdgpu_mmhub.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
        amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o amdgpu_nbio.o \
        amdgpu_umc.o smu_v11_0_i2c.o amdgpu_fru_eeprom.o amdgpu_rap.o \
-       amdgpu_fw_attestation.o amdgpu_securedisplay.o
+       amdgpu_fw_attestation.o amdgpu_securedisplay.o amdgpu_hdp.o
  
 +amdgpu-$(CONFIG_PROC_FS) += amdgpu_fdinfo.o
 +
  amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o
  
  # add asic specific block
Simple merge
index f7235438535f5ac00bce0ee859ab96088598a39a,e2cbe19404c0e6c5e72abe63ad17e157521e6dae..f78d21910e07992dc6e7bd7e58473a98be6d5cbc
@@@ -448,10 -391,10 +391,10 @@@ static int amdgpu_vram_mgr_new(struct t
                pages_per_node = HPAGE_PMD_NR;
  #else
                /* default to 2MB */
-               pages_per_node = (2UL << (20UL - PAGE_SHIFT));
+               pages_per_node = 2UL << (20UL - PAGE_SHIFT);
  #endif
-               pages_per_node = max((uint32_t)pages_per_node,
-                                    tbo->page_alignment);
+               pages_per_node = max_t(uint32_t, pages_per_node,
 -                                     mem->page_alignment);
++                                     tbo->page_alignment);
                num_nodes = DIV_ROUND_UP(mem->num_pages, pages_per_node);
        }
  
        mem->start = 0;
        pages_left = mem->num_pages;
  
-       spin_lock(&mgr->lock);
-       for (i = 0; pages_left >= pages_per_node; ++i) {
-               unsigned long pages = rounddown_pow_of_two(pages_left);
+       /* Limit maximum size to 2GB due to SG table limitations */
+       pages = min(pages_left, 2UL << (30 - PAGE_SHIFT));
  
-               /* Limit maximum size to 2GB due to SG table limitations */
-               pages = min(pages, (2UL << (30 - PAGE_SHIFT)));
-               r = drm_mm_insert_node_in_range(mm, &nodes[i], pages,
-                                               pages_per_node, 0,
-                                               place->fpfn, lpfn,
-                                               mode);
-               if (unlikely(r))
-                       break;
-               vis_usage += amdgpu_vram_mgr_vis_size(adev, &nodes[i]);
-               amdgpu_vram_mgr_virt_start(mem, &nodes[i]);
-               pages_left -= pages;
-       }
-       for (; pages_left; ++i) {
-               unsigned long pages = min(pages_left, pages_per_node);
+       i = 0;
+       spin_lock(&mgr->lock);
+       while (pages_left) {
 -              uint32_t alignment = mem->page_alignment;
 +              uint32_t alignment = tbo->page_alignment;
  
-               if (pages == pages_per_node)
+               if (pages >= pages_per_node)
                        alignment = pages_per_node;
  
-               r = drm_mm_insert_node_in_range(mm, &nodes[i],
-                                               pages, alignment, 0,
-                                               place->fpfn, lpfn,
-                                               mode);
-               if (unlikely(r))
+               r = drm_mm_insert_node_in_range(mm, &nodes[i], pages, alignment,
+                                               0, place->fpfn, lpfn, mode);
+               if (unlikely(r)) {
+                       if (pages > pages_per_node) {
+                               if (is_power_of_2(pages))
+                                       pages = pages / 2;
+                               else
+                                       pages = rounddown_pow_of_two(pages);
+                               continue;
+                       }
                        goto error;
+               }
  
                vis_usage += amdgpu_vram_mgr_vis_size(adev, &nodes[i]);
                amdgpu_vram_mgr_virt_start(mem, &nodes[i]);