From: Matthew Auld <matthew.auld@intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>, intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/xe: Avoid using stolen memory for DPT.
Date: Wed, 1 Jul 2026 11:20:37 +0100 [thread overview]
Message-ID: <60d5a5c7-e6a0-4d99-ba73-485a42121e73@intel.com> (raw)
In-Reply-To: <6e41bc45-82a2-4cd3-a666-ade919acd26b@lankhorst.se>
On 01/07/2026 11:14, Maarten Lankhorst wrote:
> Hello,
>
> On 6/30/26 16:10, Matthew Auld wrote:
>> On 30/06/2026 14:55, Maarten Lankhorst wrote:
>>> On systems with media GT, extra latency is added when accessing stolen
>>> memory when the GT is in MC6. Since we additionally aren't counting how
>>> much memory is used for stolen and we could in theory fill up the
>>> entire stolen area with DPT's, avoid using stolen and only use the
>>> default memory region.
>>>
>>> Additionally, this may also result in random system hangs under load.
>>>
>>> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7513
>>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>>
>> Fixes: 775d0adc01a5 ("drm/xe/fbdev: Limit the usage of stolen for LNL+")
>> Cc: <stable@vger.kernel.org> # v6.12+
>>
>> ?
>>
>>> ---
>>> drivers/gpu/drm/xe/display/xe_fb_pin.c | 33 +++++++-------------------
>>> 1 file changed, 8 insertions(+), 25 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
>>> index 5f4a0cd8deca0..73469ea5f333d 100644
>>> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
>>> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
>>> @@ -164,31 +164,14 @@ static int __xe_pin_fb_vma_dpt(struct drm_gem_object *obj,
>>> dpt_size = ALIGN(intel_rotation_info_size(&view->rotated) * 8,
>>> XE_PAGE_SIZE);
>>> - if (IS_DGFX(xe))
>>> - dpt = xe_bo_create_pin_map_at_novm(xe, tile0,
>>> - dpt_size, ~0ull,
>>> - ttm_bo_type_kernel,
>>> - XE_BO_FLAG_VRAM0 |
>>> - XE_BO_FLAG_GGTT |
>>> - XE_BO_FLAG_PAGETABLE,
>>> - pin_params->alignment, false);
>>> - else
>>> - dpt = xe_bo_create_pin_map_at_novm(xe, tile0,
>>> - dpt_size, ~0ull,
>>> - ttm_bo_type_kernel,
>>> - XE_BO_FLAG_STOLEN |
>>> - XE_BO_FLAG_GGTT |
>>> - XE_BO_FLAG_PAGETABLE,
>>> - pin_params->alignment, false);
>>> - if (IS_ERR(dpt))
>>> - dpt = xe_bo_create_pin_map_at_novm(xe, tile0,
>>> - dpt_size, ~0ull,
>>> - ttm_bo_type_kernel,
>>> - XE_BO_FLAG_SYSTEM |
>>> - XE_BO_FLAG_GGTT |
>>> - XE_BO_FLAG_PAGETABLE |
>>> - XE_BO_FLAG_FORCE_WC,
>>> - pin_params->alignment, false);
>>
>> Technically this changes the behaviour for dgpu, where it looks like it will fall back to system memory? Surprised that would even work though, and not get a bunch of pipe errors? I would assume VRAM is a requirement.
>
> I just tried it out to answer the question, turns out this fails spectacularly!
> It gives a pipe fault error on every vblank on my bmg.
hah, thanks for confirming.
>
> It probably never worked, but as long as we never fall back it never was an issue.
> The new behavior is correct, I'll update the wording of the commit message for this.
Maybe also change the commit title to "fix DPT path" or similar, or just
split that out. Might need a different fixes tag. Or I guess so long as
this lands in 6.12+, we should be good.
>
>> Either keeping the same behaviour, or updating the commit to mention this change, or splitting that out (maybe needs a separate fixes?),
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>>
> Can I extend that to patch 2 and 3 too?
Will look at those now.
>
>>> + dpt = xe_bo_create_pin_map_at_novm(xe, tile0,
>>> + dpt_size, ~0ull,
>>> + ttm_bo_type_kernel,
>>> + XE_BO_FLAG_VRAM_IF_DGFX(tile0) |
>>> + XE_BO_FLAG_GGTT |
>>> + XE_BO_FLAG_PAGETABLE |
>>> + XE_BO_FLAG_FORCE_WC,
>>> + pin_params->alignment, false);
>>> if (IS_ERR(dpt))
>>> return PTR_ERR(dpt);
>>>
>>
>
next prev parent reply other threads:[~2026-07-01 10:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 13:55 [PATCH 0/3] drm/xe: Disable stolen memory for driver allocations Maarten Lankhorst
2026-06-30 13:55 ` [PATCH 1/3] drm/xe: Avoid using stolen memory for DPT Maarten Lankhorst
2026-06-30 14:05 ` sashiko-bot
2026-06-30 14:10 ` Matthew Auld
2026-07-01 10:14 ` Maarten Lankhorst
2026-07-01 10:20 ` Matthew Auld [this message]
2026-06-30 13:55 ` [PATCH 2/3] drm/xe/display: Avoid using stolen memory for framebuffer when media gt exists Maarten Lankhorst
2026-07-01 10:27 ` Matthew Auld
2026-07-01 10:28 ` Matthew Auld
2026-06-30 13:55 ` [PATCH 3/3] drm/xe/display: Do not allocate into stolen for new framebuffers Maarten Lankhorst
2026-07-01 10:33 ` Matthew Auld
2026-06-30 14:25 ` ✓ CI.KUnit: success for drm/xe: Disable stolen memory for driver allocations Patchwork
2026-06-30 14:59 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-01 6:40 ` ✓ Xe.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=60d5a5c7-e6a0-4d99-ba73-485a42121e73@intel.com \
--to=matthew.auld@intel.com \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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.