[PATCH 2/2] drm/xe: Ensure GT reset is complete during ccs_mode change
Vivekanandan, Balasubramani
balasubramani.vivekanandan at intel.com
Fri Nov 15 07:09:10 UTC 2024
On 14.11.2024 17:42, Matthew Brost wrote:
> On Thu, Nov 14, 2024 at 07:07:38PM +0530, Balasubramani Vivekanandan wrote:
> > Driver returns from the ccs_mode change request soon after initiating an
> > asynchronous GT reset. Userspace may submit GT workload while the GT
> > reset is ongoing and may see unexpected results.
>
> I missed this part. It should be fine to submit a workload while a GT
> reset is ongoing. Can you describe the unexpected results because AFIAK
> this should work.
I got intimidated by the exec_queue create ioctl prints getting
interleaved between the GuC firmware upload prints (because of GT reset)
in the dmesg while executing the ccs-mode-basic subtest of xe_compute.
My impression was exec_queue create ioctl succeeds but any actual
workload submission might fail during GT reset. My plan was to test the
actual workload submission in parallel to posting this patch.
But my thinking was wrong. I tried the subtest ccs-mode-compute-kernel
which actually submits a kernel after ccs_mode change and it completes
successfully. Driver is taking care of serializing the work submission
after GT reset.
So there is no need of this patch.
Regards,
Bala
>
> Matt
>
> > Make sure the GT reset is complete before exiting from the ccs_mode
> > change request.
> >
> > Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> > index b6adfb9f2030..9b6c15239487 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
> > @@ -150,7 +150,7 @@ ccs_mode_store(struct device *kdev, struct device_attribute *attr,
> > xe_gt_info(gt, "Setting compute mode to %d\n", num_engines);
> > gt->ccs_mode = num_engines;
> > xe_gt_record_user_engines(gt);
> > - xe_gt_reset_async(gt);
> > + xe_gt_reset_sync(gt);
> > }
> >
> > mutex_unlock(&xe->drm.filelist_mutex);
> > --
> > 2.34.1
> >
More information about the Intel-xe
mailing list