intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/ttm: Add an option to report graphics memory OOM
@ 2024-10-02 12:24 Thomas Hellström
  2024-10-02 12:24 ` [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools Thomas Hellström
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Thomas Hellström @ 2024-10-02 12:24 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Matthew Brost, Christian König,
	Thomas Zimmermann, amd-gfx, intel-gfx, nouveau, spice-devel,
	dri-devel, Zack Rusin, bcm-kernel-feedback-list, Sui Jingfeng

Some graphics APIs differentiate between out-of-graphics-memory and
out-of-host-memory (system memory). Add a device init flag to
have -ENOSPC propagated from the resource managers instead of being
converted to -ENOMEM, to aid driver stacks in determining what
error code to return or whether corrective action can be taken at
the driver level.

The first patch deals with a ttm_device_init() interface change,
The Second patch adds the actual functionality.

A follow-up will be posted for Xe once this is merged / backmerged.

Thomas Hellström (2):
  drm/ttm: Change ttm_device_init to use a struct instead of multiple
    bools
  drm/ttm: Add a device flag to propagate -ENOSPC on OOM

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  6 +++--
 drivers/gpu/drm/drm_gem_vram_helper.c         |  7 +++---
 drivers/gpu/drm/i915/intel_region_ttm.c       |  3 ++-
 drivers/gpu/drm/loongson/lsdc_ttm.c           |  5 +++-
 drivers/gpu/drm/nouveau/nouveau_ttm.c         |  7 ++++--
 drivers/gpu/drm/qxl/qxl_ttm.c                 |  2 +-
 drivers/gpu/drm/radeon/radeon_ttm.c           |  6 +++--
 drivers/gpu/drm/ttm/tests/ttm_bo_test.c       | 16 ++++++------
 .../gpu/drm/ttm/tests/ttm_bo_validate_test.c  |  3 ++-
 drivers/gpu/drm/ttm/tests/ttm_device_test.c   | 16 ++++++------
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 20 ++++++---------
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h |  6 ++---
 drivers/gpu/drm/ttm/ttm_bo.c                  |  2 +-
 drivers/gpu/drm/ttm/ttm_device.c              |  8 +++---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |  4 +--
 drivers/gpu/drm/xe/xe_device.c                |  3 ++-
 include/drm/ttm/ttm_device.h                  | 25 ++++++++++++++++++-
 17 files changed, 86 insertions(+), 53 deletions(-)

-- 
2.46.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-10-09  5:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 12:24 [PATCH v2 0/2] drm/ttm: Add an option to report graphics memory OOM Thomas Hellström
2024-10-02 12:24 ` [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools Thomas Hellström
2024-10-02 12:45   ` Christian König
2024-10-02 12:54     ` Thomas Hellström
2024-10-04 14:28       ` Thomas Hellström
2024-10-05  4:14         ` Matthew Brost
2024-10-09  5:56           ` Thomas Hellström
2024-10-02 12:56   ` Jani Nikula
2024-10-03  4:28   ` Zack Rusin
2024-10-04 14:22     ` Thomas Hellström
2024-10-02 12:24 ` [PATCH v2 2/2] drm/ttm: Add a device flag to propagate -ENOSPC on OOM Thomas Hellström
2024-10-02 13:46   ` Christian König
2024-10-03  4:51 ` ✓ CI.Patch_applied: success for drm/ttm: Add an option to report graphics memory OOM (rev2) Patchwork
2024-10-03  4:52 ` ✓ CI.checkpatch: " Patchwork
2024-10-03  4:53 ` ✓ CI.KUnit: " Patchwork
2024-10-03  5:04 ` ✓ CI.Build: " Patchwork
2024-10-03  5:07 ` ✓ CI.Hooks: " Patchwork
2024-10-03  5:08 ` ✗ CI.checksparse: warning " Patchwork
2024-10-03  5:29 ` ✓ CI.BAT: success " Patchwork
2024-10-03  6:47 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).