diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-20 20:43:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-20 20:43:06 -0800 |
| commit | c44104f3642da720164042623e4832836aefdd8e (patch) | |
| tree | 76fc4494b40b186831ee690b8a335a0cb6b87480 /drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | |
| parent | aa31d5f8b151b786b748c6bfc9a8c4f1855c8adc (diff) | |
| parent | ce29b8f9fb606f87014c2d05483a3fef05a11f38 (diff) | |
Pull drm fixes from Dave Airlie:
"Weekly fixes, around the usual size, though it looks like vmwgfx got
hit with a lot of analysis and has a bunch of validation fixes.
nouveau fixes for a 7.3 regression.
I know of one open i915 7.3 regressions that hopefully a fix will land
next week. Otherwise amdgpu and xe have the most with a scattering for
others.
core:
- syncobj: Limit allocations
- vblank: Resolve deadlock in timer
amdgpu:
- GPUVM fixes
- SMU 8 fix
- PCO quirk
- ATPX lifetime fix
- Unwinding fix for module loading failure
- UserQ fix
- HDMI fixes
- DML2 fix
- DC DRAM config fixes
- DCN 4.2 fixes
- DC pre-OS clock handling fixes
- DPMS fix
- Cleaner shader fixes for multi-XCC parts
- Vblank fix for GPU resets
- Properly handle firmware with different trust athorities
- Freesync/VRR fixes
- Backlight fix
- Display warning fixes
- PSR fixes
amdkfd:
- SVM fixes
radeon:
- Bounds checks in vbios parsing
- ATPX lifetime fix
xe:
- hwmon error handling fixes
- Treat CT-disabled TLB invalidation as cancelled
- Validate BOs on export to charge the exporter
- Always free requested IRQs on uninstall
- Reset TLB invalidation state in submit fini
- Use ordered clock reads for engine cycles cpu_delta
- Treat non-fatal PCIe errors as recovered
i915:
- Regression fix for GitLab #16595 and #17423: 4K displays
corrupt/black on CML/KBL
- DSB programming fix for GOSUB
imagination:
- Use correct function for polling non-iomem
ivpu:
- Fix race condition in recovery
nouveau:
- Fix instmem io_mapping faults and slowdowns
omap:
- dss: Fix handling deferrals
qaic:
- Harden ioctl checks
rocket:
- iommu fixes
- lifetime and validation fixes
- clock request fix
- devicetre core count fix
tilcdc:
- Fix drvdata in suspend/resume
vc4:
- async flip fixes
- off by one shader record
- object lifetime fixes
- two dsi fixes
vmwgfx:
- bounds checking fixes
- validation fixes"
* tag 'drm-fixes-2026-11-21' of https://gitlab.freedesktop.org/drm/kernel: (111 commits)
drm/vc4: Clear the slice caches before resetting a stalled GPU
drm/vc4: Start shader code at varying offsets in its BO
drm/vc4: Check for a validated shader before reading its thread mode
drm/vc4: Fix off-by-one in the shader record BO handle check
MAINTAINERS: Add Dmitry Baryshkov as bridge maintainer
MAINTAINERS: Remove myself for VC4 DRM driver
MAINTAINERS: Remove Andrzej Hajda from bridge maintainers
MAINTAINERS: Remove Jonas Karlman from bridge reviewers
MAINTAINERS: Move Tegra DRM under drm-misc
MAINTAINERS: Move Keem Bay DRM under drm-misc
MAINTAINERS: Move armada DRM under drm-misc
drm/xe/hwmon: Propagate all hardware read errors
drm/xe/hwmon: Report errors using structured xe_log API
drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components
drm/xe/guc: Treat CT-disabled TLB invalidation as cancelled
drm/xe/dma-buf: Validate BOs on export to charge the exporter
drm/xe/irq: Always free requested IRQs on uninstall
drm/xe/guc: Reset TLB invalidation state in submit fini
drm/xe/query: Use ordered clock reads for engine cycles cpu_delta
drm/xe/ras: Treat non-fatal PCIe errors as recovered
...
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c')
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c index d607452dff6a..cc580ce57797 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c @@ -54,8 +54,11 @@ static int vmw_gmrid_man_get_node(struct ttm_resource_manager *man, const struct ttm_place *place, struct ttm_resource **res) { + struct vmw_private *vmw = vmw_priv_from_ttm(bo->bdev); struct vmwgfx_gmrid_man *gman = to_gmrid_manager(man); - int id; + u32 max_gmr_pages = 0; + bool mob_overflow = false; + int id, ret = 0; *res = kmalloc_obj(**res); if (!*res) @@ -85,43 +88,53 @@ static int vmw_gmrid_man_get_node(struct ttm_resource_manager *man, const unsigned long max_graphics_pages = totalram_pages() / 2; uint32_t new_max_pages = 0; - DRM_WARN("vmwgfx: mob memory overflow. Consider increasing guest RAM and graphicsMemory.\n"); - vmw_host_printf("vmwgfx, warning: mob memory overflow. Consider increasing guest RAM and graphicsMemory.\n"); + mob_overflow = true; + drm_warn(&vmw->drm, + "vmwgfx: mob memory overflow. Consider increasing guest RAM and graphicsMemory.\n"); if (gman->max_gmr_pages > (max_graphics_pages / 2)) { - DRM_WARN("vmwgfx: guest requires more than half of RAM for graphics.\n"); + drm_warn(&vmw->drm, + "vmwgfx: guest requires more than half of RAM for graphics.\n"); new_max_pages = max_graphics_pages; } else new_max_pages = gman->max_gmr_pages * 2; if (new_max_pages > gman->max_gmr_pages && new_max_pages >= gman->used_gmr_pages) { - DRM_WARN("vmwgfx: increasing guest mob limits to %u KiB.\n", - ((new_max_pages) << (PAGE_SHIFT - 10))); + drm_warn(&vmw->drm, + "vmwgfx: increasing guest mob limits to %u KiB.\n", + new_max_pages << (PAGE_SHIFT - 10)); gman->max_gmr_pages = new_max_pages; } else { - char buf[256]; - snprintf(buf, sizeof(buf), - "vmwgfx, error: guest graphics is out of memory (mob limit at: %u KiB).\n", - ((gman->max_gmr_pages) << (PAGE_SHIFT - 10))); - vmw_host_printf(buf); - DRM_WARN("%s", buf); - goto nospace; + max_gmr_pages = gman->max_gmr_pages; + gman->used_gmr_pages -= PFN_UP((*res)->size); + ret = -ENOSPC; + goto out_unlock; } } } (*res)->start = id; +out_unlock: spin_unlock(&gman->lock); - return 0; -nospace: - gman->used_gmr_pages -= PFN_UP((*res)->size); - spin_unlock(&gman->lock); - ida_free(&gman->gmr_ida, id); - ttm_resource_fini(man, *res); - kfree(*res); - return -ENOSPC; + /* Host logging allocates with GFP_KERNEL and must run unlocked. */ + if (mob_overflow) + vmw_host_printf("%s", + "vmwgfx, warning: mob memory overflow. Consider increasing guest RAM and graphicsMemory.\n"); + if (ret) { + char buf[256]; + + snprintf(buf, sizeof(buf), + "vmwgfx, error: guest graphics is out of memory (mob limit at: %u KiB).\n", + max_gmr_pages << (PAGE_SHIFT - 10)); + vmw_host_printf("%s", buf); + drm_warn(&vmw->drm, "%s", buf); + ida_free(&gman->gmr_ida, id); + ttm_resource_fini(man, *res); + kfree(*res); + } + return ret; } static void vmw_gmrid_man_put_node(struct ttm_resource_manager *man, |
