From: Nirmoy Das <nirmoy.das@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
Nirmoy Das <nirmoy.das@linux.intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Matthew Auld <matthew.auld@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH v2] drm/xe: Create a helper function to init job's user fence
Date: Wed, 27 Mar 2024 17:48:40 +0100 [thread overview]
Message-ID: <98ce5b38-e6c9-4a1d-ae3e-80f81669c9b7@intel.com> (raw)
In-Reply-To: <p5orrg525ipnqq4xuj5pymekfcoisfqmmm53hxugtiiiz2g2vv@mrp7nupohvd5>
On 3/26/2024 11:56 PM, Lucas De Marchi wrote:
> On Mon, Mar 25, 2024 at 09:54:31PM +0100, Nirmoy Das wrote:
>> Hi Lucas,
>>
>> On 3/22/2024 5:11 PM, Lucas De Marchi wrote:
>>> On Thu, Mar 21, 2024 at 05:11:42PM +0100, Nirmoy Das wrote:
>>>> Refactor xe_sync_entry_signal so it doesn't have to
>>>> modify xe_sched_job struct instead create a new helper function
>>>> to set user fence values for a job.
>>>>
>>>> v2: Move the sync type check to xe_sched_job_init_user_fence(Lucas)
>>>>
>>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>>>> Cc: Matthew Auld <matthew.auld@intel.com>
>>>> Cc: Matthew Brost <matthew.brost@intel.com>
>>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>>>> ---
>>>> drivers/gpu/drm/xe/xe_exec.c | 9 +++++----
>>>> drivers/gpu/drm/xe/xe_sched_job.c | 18 ++++++++++++++++++
>>>> drivers/gpu/drm/xe/xe_sched_job.h | 3 +++
>>>> drivers/gpu/drm/xe/xe_sync.c | 7 +------
>>>> drivers/gpu/drm/xe/xe_sync.h | 1 -
>>>> drivers/gpu/drm/xe/xe_vm.c | 10 +++++-----
>>>> 6 files changed, 32 insertions(+), 16 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_exec.c
>>>> b/drivers/gpu/drm/xe/xe_exec.c
>>>> index 7692ebfe7d47..9d53ef8c49cc 100644
>>>> --- a/drivers/gpu/drm/xe/xe_exec.c
>>>> +++ b/drivers/gpu/drm/xe/xe_exec.c
>>>> @@ -249,7 +249,7 @@ int xe_exec_ioctl(struct drm_device *dev, void
>>>> *data, struct drm_file *file)
>>>> goto err_unlock_list;
>>>> }
>>>> for (i = 0; i < num_syncs; i++)
>>>> - xe_sync_entry_signal(&syncs[i], NULL, fence);
>>>> + xe_sync_entry_signal(&syncs[i], fence);
>>>> xe_exec_queue_last_fence_set(q, vm, fence);
>>>> dma_fence_put(fence);
>>>> }
>>>> @@ -359,9 +359,10 @@ int xe_exec_ioctl(struct drm_device *dev, void
>>>> *data, struct drm_file *file)
>>>> drm_gpuvm_resv_add_fence(&vm->gpuvm, exec,
>>>> &job->drm.s_fence->finished,
>>>> DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_WRITE);
>>>>
>>>> - for (i = 0; i < num_syncs; i++)
>>>> - xe_sync_entry_signal(&syncs[i], job,
>>>> - &job->drm.s_fence->finished);
>>>> + for (i = 0; i < num_syncs; i++) {
>>>> + xe_sync_entry_signal(&syncs[i], &job->drm.s_fence->finished);
>>>> + xe_sched_job_init_user_fence(job, &syncs[i]);
>>>> + }
>>>>
>>>> if (xe_exec_queue_is_lr(q))
>>>> q->ring_ops->emit_job(job);
>>>> diff --git a/drivers/gpu/drm/xe/xe_sched_job.c
>>>> b/drivers/gpu/drm/xe/xe_sched_job.c
>>>> index 8151ddafb940..bfbce9b69087 100644
>>>> --- a/drivers/gpu/drm/xe/xe_sched_job.c
>>>> +++ b/drivers/gpu/drm/xe/xe_sched_job.c
>>>> @@ -5,6 +5,7 @@
>>>>
>>>> #include "xe_sched_job.h"
>>>>
>>>> +#include <drm/xe_drm.h>
>>>> #include <linux/dma-fence-array.h>
>>>> #include <linux/slab.h>
>>>>
>>>> @@ -17,6 +18,7 @@
>>>> #include "xe_macros.h"
>>>> #include "xe_trace.h"
>>>> #include "xe_vm.h"
>>>> +#include "xe_sync_types.h"
>>>
>>> wrong placement, otherwise lgtm
>>>
>>> Feel free to carry by Reviewed-by: Lucas De Marchi
>>> <lucas.demarchi@intel.com>
>>> with that fixed.
>>
>> Could you please help me merge this patch. I am having issue with my
>> dev machine which I use to merge patches.
>
> Applied to drm-xe-next, thanks!
>
> [1/1] drm/xe: Create a helper function to init job's user fence
> commit: 5dffaa1bb94a6bc75393476fbe3c8a704ff4fcf8
Thanks a lot!
Nirmoy
>
> Best regards,
prev parent reply other threads:[~2024-03-27 16:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 16:11 [PATCH v2] drm/xe: Create a helper function to init job's user fence Nirmoy Das
2024-03-21 20:18 ` ✓ CI.Patch_applied: success for drm/xe: Create a helper function to init job's user fence (rev2) Patchwork
2024-03-21 20:19 ` ✓ CI.checkpatch: " Patchwork
2024-03-21 20:19 ` ✓ CI.KUnit: " Patchwork
2024-03-21 20:30 ` ✓ CI.Build: " Patchwork
2024-03-21 20:33 ` ✓ CI.Hooks: " Patchwork
2024-03-21 20:34 ` ✓ CI.checksparse: " Patchwork
2024-03-21 20:56 ` ✓ CI.BAT: " Patchwork
2024-03-22 16:11 ` [PATCH v2] drm/xe: Create a helper function to init job's user fence Lucas De Marchi
2024-03-25 20:54 ` Nirmoy Das
2024-03-26 22:56 ` Lucas De Marchi
2024-03-27 16:48 ` Nirmoy Das [this message]
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=98ce5b38-e6c9-4a1d-ae3e-80f81669c9b7@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=nirmoy.das@linux.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