Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm/xe: Add uapi for dumpable bos
Date: Tue, 16 Jan 2024 17:58:17 +0100	[thread overview]
Message-ID: <ecf33bc1-2203-4692-b3d0-fbb70e50a25a@linux.intel.com> (raw)
In-Reply-To: <da54a2ad4a494d70dd550b3561c61b20a18d119c.camel@intel.com>



On 2024-01-12 18:19, Souza, Jose wrote:
> On Fri, 2024-01-12 at 13:41 +0100, Maarten Lankhorst wrote:
>> Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that this
>> mapping should be dumped.
>>
>> This is not hooked up, but the uapi should be ready before merging.
>>
>> It's likely easier to dump the contents of the bo's at devcoredump
>> readout time, so it's better if the bos will stay unmodified after
>> a hang. The NEEDS_CPU_MAPPING flag is removed as requirement.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_vm.c | 8 +++-----
>>   include/uapi/drm/xe_drm.h  | 1 +
>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
>> index a7e7a0b24099..0a3b9c0ad772 100644
>> --- a/drivers/gpu/drm/xe/xe_vm.c
>> +++ b/drivers/gpu/drm/xe/xe_vm.c
>> @@ -2687,12 +2687,13 @@ static int vm_bind_ioctl_ops_execute(struct xe_vm *vm,
>>   #ifdef TEST_VM_ASYNC_OPS_ERROR
>>   #define SUPPORTED_FLAGS	\
>>   	(FORCE_ASYNC_OP_ERROR | DRM_XE_VM_BIND_FLAG_READONLY | \
>> -	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | 0xffff)
>> +	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | \
>> +	 DRM_XE_VM_BIND_FLAG_DUMPABLE | 0xffff)
>>   #else
>>   #define SUPPORTED_FLAGS	\
>>   	(DRM_XE_VM_BIND_FLAG_READONLY | \
>>   	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | \
>> -	 0xffff)
>> +	 DRM_XE_VM_BIND_FLAG_DUMPABLE | 0xffff)
>>   #endif
>>   #define XE_64K_PAGE_MASK 0xffffull
>>   #define ALL_DRM_XE_SYNCS_FLAGS (DRM_XE_SYNCS_FLAG_WAIT_FOR_OP)
>> @@ -2919,9 +2920,6 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
>>   		u16 pat_index = bind_ops[i].pat_index;
>>   		u16 coh_mode;
>>   
>> -		if (!obj)
>> -			continue;
>> -
> 
> Why are you dropping this ^
> Without this block DRM_XE_VM_BIND_FLAG_NULL binds fails.
I have no idea why this is there, that also explains why my userptr 
stuff failed. Had to readd the check, but didn't notice I removed it in 
the first place. :)

Cheers,
~Maarten

  reply	other threads:[~2024-01-16 16:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 12:41 [PATCH 1/4] drm/xe: Add uapi for dumpable bos Maarten Lankhorst
2024-01-12 12:41 ` [PATCH 2/4] drm/xe: Annotate each dumpable vma as such Maarten Lankhorst
2024-01-12 12:41 ` [PATCH 3/4] drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump Maarten Lankhorst
2024-01-12 12:41 ` [PATCH 4/4] drm/xe: Implement VM snapshot support for BO's and userptr Maarten Lankhorst
2024-01-12 17:20   ` Souza, Jose
2024-01-15 21:02   ` Souza, Jose
2024-01-16 14:31   ` Souza, Jose
2024-01-22 17:58     ` Souza, Jose
2024-01-12 13:22 ` ✓ CI.Patch_applied: success for series starting with [1/4] drm/xe: Add uapi for dumpable bos Patchwork
2024-01-12 13:23 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-12 13:23 ` ✓ CI.KUnit: success " Patchwork
2024-01-12 13:31 ` ✓ CI.Build: " Patchwork
2024-01-12 13:31 ` ✓ CI.Hooks: " Patchwork
2024-01-12 13:32 ` ✓ CI.checksparse: " Patchwork
2024-01-12 13:59 ` ✗ CI.BAT: failure " Patchwork
2024-01-12 17:19 ` [PATCH 1/4] " Souza, Jose
2024-01-16 16:58   ` Maarten Lankhorst [this message]
2024-01-12 17:39 ` Souza, Jose

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=ecf33bc1-2203-4692-b3d0-fbb70e50a25a@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox