All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Christian König" <christian.koenig@amd.com>,
	amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	nouveau@lists.freedesktop.org, spice-devel@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	"Zack Rusin" <zack.rusin@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Sui Jingfeng" <suijingfeng@loongson.cn>
Subject: [PATCH 0/2] drm/ttm: Add an option to report graphics memory OOM
Date: Thu,  5 Sep 2024 11:33:20 +0200	[thread overview]
Message-ID: <20240905093322.29786-1-thomas.hellstrom@linux.intel.com> (raw)

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/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 ++++++++++++++++++-
 16 files changed, 82 insertions(+), 50 deletions(-)

-- 
2.46.0


             reply	other threads:[~2024-09-05 18:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05  9:33 Thomas Hellström [this message]
2024-09-05  9:33 ` [PATCH 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools Thomas Hellström
2024-09-06  3:55   ` kernel test robot
2024-09-06  5:58   ` kernel test robot
2024-09-05  9:33 ` [PATCH 2/2] drm/ttm: Add a device flag to propagate -ENOSPC on OOM Thomas Hellström
2024-09-05 10:25 ` ✓ CI.Patch_applied: success for drm/ttm: Add an option to report graphics memory OOM Patchwork
2024-09-05 10:26 ` ✓ CI.checkpatch: " Patchwork
2024-09-05 10:28 ` ✓ CI.KUnit: " Patchwork
2024-09-05 10:43 ` ✓ CI.Build: " Patchwork
2024-09-05 10:45 ` ✓ CI.Hooks: " Patchwork
2024-09-05 10:46 ` ✗ CI.checksparse: warning " Patchwork
2024-09-05 11:15 ` ✓ CI.BAT: success " Patchwork
2024-09-05 12:30 ` ✗ Fi.CI.SPARSE: warning " Patchwork
2024-09-05 12:39 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-07  5:00 ` ✓ Fi.CI.IGT: " Patchwork
2024-09-07 10:14 ` ✓ CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240905093322.29786-1-thomas.hellstrom@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=suijingfeng@loongson.cn \
    --cc=zack.rusin@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.