[Intel-xe] [PATCH 3/3] drm/xe: fix range printing for debug messages
Rodrigo Vivi
rodrigo.vivi at intel.com
Wed Oct 4 13:18:13 UTC 2023
On Fri, Sep 29, 2023 at 10:24:25PM -0700, Niranjana Vishwanathapura wrote:
> On Fri, Sep 29, 2023 at 10:31:04AM -0700, Paulo Zanoni wrote:
> > We're already using the half-open interval notation "[A, B)", that "-
> > 1" there makes it wrong. Also, getting rid of the "-1" makes it much
> > easier to grep for the logs when you're looking for an address that's
> > the end of a vma and the start of another.
> >
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_pt.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
> > index 4d4c6a4c305e..70a8bd3558c2 100644
> > --- a/drivers/gpu/drm/xe/xe_pt.c
> > +++ b/drivers/gpu/drm/xe/xe_pt.c
> > @@ -1265,7 +1265,7 @@ __xe_pt_bind_vma(struct xe_tile *tile, struct xe_vma *vma, struct xe_exec_queue
> >
> > vm_dbg(&xe_vma_vm(vma)->xe->drm,
> > "Preparing bind, with range [%llx...%llx) engine %p.\n",
> > - xe_vma_start(vma), xe_vma_end(vma) - 1, q);
> > + xe_vma_start(vma), xe_vma_end(vma), q);
> >
> > err = xe_pt_prepare_bind(tile, vma, entries, &num_entries, rebind);
> > if (err)
> > @@ -1618,7 +1618,7 @@ __xe_pt_unbind_vma(struct xe_tile *tile, struct xe_vma *vma, struct xe_exec_queu
> >
> > vm_dbg(&xe_vma_vm(vma)->xe->drm,
> > "Preparing unbind, with range [%llx...%llx) engine %p.\n",
> > - xe_vma_start(vma), xe_vma_end(vma) - 1, q);
> > + xe_vma_start(vma), xe_vma_end(vma), q);
>
> LGTM given it was intended to be half-open interval here and in
> xe_vm_dbg_print_entries().
>
> Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
pushed to drm-xe-next. thanks for the patches and reviews.
>
> >
> > num_entries = xe_pt_stage_unbind(tile, vma, entries);
> > xe_tile_assert(tile, num_entries <= ARRAY_SIZE(entries));
> > --
> > 2.39.2
> >
More information about the Intel-xe
mailing list