[PATCH 2/2] @ drivers/gpu/drm/drm_gpuvm.c :  Used '..' to escape the
block of comments starting at line 2435.

Changes from 1/2: As the previous patch involved too many line
changes, this patch keeps it a bit clean by just having 4 changes.

Please Note that I think mentioned in [1] "..code-block :: c" is to be
used for rst pages, but as we are dealing with a c file,
we don't want sphinx to parse the comments as c code, we just want the
comments to be parsed as just comments.
and hence [1] needs to be disregarded.

Refs: [1] 
https://lore.kernel.org/all/20250810150706.305040-1-rampx...@gmail.com/
signed-off-by:Sidharth Seela<sidharthse...@gmail.com>
--------------------------------------------------------------------------------------------------------------------------------------------------------
commit 8c6b6943261764bdfeeebfc358aa0f34e30fb6b5
Author:     Sidharth Seela <sidharthse...@gmail.com>
AuthorDate: Thu Aug 14 19:11:44 2025 +0530
Commit:     Sidharth Seela <sidharthse...@gmail.com>
CommitDate: Thu Aug 14 19:11:44 2025 +0530

    '..' used as escape. New-lines removed to take code as a block.
---
 drivers/gpu/drm/drm_gpuvm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c
index bbc7fecb6f4a..d01eaa353f72 100644
--- a/drivers/gpu/drm/drm_gpuvm.c
+++ b/drivers/gpu/drm/drm_gpuvm.c
@@ -2432,12 +2432,10 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
- *    vm_bind {
+ *..  vm_bind {
  *        struct drm_exec exec;
- *
  *        // IGNORE_DUPLICATES is required, INTERRUPTIBLE_WAIT is recommended:
  *        drm_exec_init(&exec, IGNORE_DUPLICATES | INTERRUPTIBLE_WAIT, 0);
- *
  *        drm_exec_until_all_locked (&exec) {
  *            for_each_vm_bind_operation {
  *                switch (op->op) {
@@ -2450,7 +2448,6 @@ static const struct drm_gpuvm_ops lock_ops = {
  *                                                     obj, op->obj_offset);
  *                    break;
  *                }
- *
  *                drm_exec_retry_on_contention(&exec);
  *                if (ret)
  *                    return ret;
--
2.39.5 (Apple Git-154)


On Thu, Aug 14, 2025 at 6:02 PM Sidharth Seela <sidharthse...@gmail.com> wrote:
>
> Thank you Jani
> [BUG: Comment parsing error]
> What I did -> Applied the patch, you referred [1]
> https://lore.kernel.org/r/20250810150706.305040-1-rampx...@gmail.com.
> What I got-> error message pasted below.
> What I think might be the problem -> I believe ampersand's are being
> parsed as ':c:type:' while document generation
>
> --------ERROR MESSAGE START:---------
> linux/Documentation/gpu/drm-mm:506:
> ./drivers/gpu/drm/drm_gpuvm.c:2434: WARNING: Lexing literal_block
> 'vm_bind {\n    struct drm_exec exec;\n\n    // IGNORE_DUPLICATES is
> required, INTERRUPTIBLE_WAIT is recommended:\n
> drm_exec_init(:c:type:`exec`, IGNORE_DUPLICATES | INTERRUPTIBLE_WAIT,
> 0);\n\n    drm_exec_until_all_locked (:c:type:`exec`) {\n
> for_each_vm_bind_operation {\n            switch (op->op) {\n
>   case DRIVER_OP_UNMAP:\n                ret =
> drm_gpuvm_sm_unmap_exec_lock(gpuvm, :c:type:`exec`, op->addr,
> op->range);\n                break;\n            case DRIVER_OP_MAP:\n
>                ret = drm_gpuvm_sm_map_exec_lock(gpuvm, :c:type:`exec`,
> num_fences,\n
> op->addr, op->range,\n
> obj, op->obj_offset);\n                break;\n            }\n\n
>      drm_exec_retry_on_contention(:c:type:`exec`);\n            if
> (ret)\n                return ret;\n        }\n    }\n}' as "c"
> resulted in an error at token: '`'. Retrying in relaxed mode.
> [misc.highlighting_failure]
> --------ERROR MESSAGE END:---------
> PS: reporting this first, to give heads up, parallely trying to debug.
>
>
> On Wed, Aug 13, 2025 at 4:00 PM Jani Nikula <jani.nik...@linux.intel.com> 
> wrote:
> >
> > On Tue, 12 Aug 2025, Sidharth Seela <sidharthse...@gmail.com> wrote:
> > > Dear Maintainers,
> > > This is my first patch, please bear with me.
> > > I request you to suggest if it can be better.
> > > Your time is appreciated.
> >
> > A simpler fix is already on the list [1].
> >
> > BR,
> > Jani.
> >
> >
> > [1] https://lore.kernel.org/r/20250810150706.305040-1-rampx...@gmail.com
> >
> > > ---------------------------------------------------------------------------
> > > commit 4ed9c00376c616cdbfb978b5fd76911cccd63b26
> > > Author:     Sidharth Seela <sid@y740.local>
> > > AuthorDate: Tue Aug 12 15:56:03 2025 +0530
> > > Commit:     Sidharth Seela <sid@y740.local>
> > > CommitDate: Tue Aug 12 15:56:03 2025 +0530
> > >
> > >     cleaned up errors stemming for multiline text
> > > ---
> > >  drivers/gpu/drm/drm_gpuvm.c | 50 ++++++++++++++++++-------------------
> > >  1 file changed, 25 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c
> > > index bbc7fecb6f4a..cf49dbfcec91 100644
> > > --- a/drivers/gpu/drm/drm_gpuvm.c
> > > +++ b/drivers/gpu/drm/drm_gpuvm.c
> > > @@ -2432,31 +2432,31 @@ static const struct drm_gpuvm_ops lock_ops = {
> > >   *
> > >   * The expected usage is:
> > >   *
> > > - *    vm_bind {
> > > - *        struct drm_exec exec;
> > > - *
> > > - *        // IGNORE_DUPLICATES is required, INTERRUPTIBLE_WAIT is 
> > > recommended:
> > > - *        drm_exec_init(&exec, IGNORE_DUPLICATES | INTERRUPTIBLE_WAIT, 
> > > 0);
> > > - *
> > > - *        drm_exec_until_all_locked (&exec) {
> > > - *            for_each_vm_bind_operation {
> > > - *                switch (op->op) {
> > > - *                case DRIVER_OP_UNMAP:
> > > - *                    ret = drm_gpuvm_sm_unmap_exec_lock(gpuvm,
> > > &exec, op->addr, op->range);
> > > - *                    break;
> > > - *                case DRIVER_OP_MAP:
> > > - *                    ret = drm_gpuvm_sm_map_exec_lock(gpuvm, &exec,
> > > num_fences,
> > > - *                                                     op->addr, 
> > > op->range,
> > > - *                                                     obj, 
> > > op->obj_offset);
> > > - *                    break;
> > > - *                }
> > > - *
> > > - *                drm_exec_retry_on_contention(&exec);
> > > - *                if (ret)
> > > - *                    return ret;
> > > - *            }
> > > - *        }
> > > - *    }
> > > + * *   vm_bind {
> > > + * *       struct drm_exec exec;
> > > + * *
> > > + * *       // IGNORE_DUPLICATES is required, INTERRUPTIBLE_WAIT is 
> > > recommended:
> > > + * *       drm_exec_init(&exec, IGNORE_DUPLICATES | INTERRUPTIBLE_WAIT, 
> > > 0);
> > > + * *
> > > + * *       drm_exec_until_all_locked (&exec) {
> > > + * *           for_each_vm_bind_operation {
> > > + * *               switch (op->op) {
> > > + * *               case DRIVER_OP_UNMAP:
> > > + * *                   ret = drm_gpuvm_sm_unmap_exec_lock(gpuvm,
> > > &exec, op->addr, op->range);
> > > + * *                   break;
> > > + * *               case DRIVER_OP_MAP:
> > > + * *                   ret = drm_gpuvm_sm_map_exec_lock(gpuvm, &exec,
> > > num_fences,
> > > + * *                                                    op->addr, 
> > > op->range,
> > > + * *                                                    obj, 
> > > op->obj_offset);
> > > + * *                   break;
> > > + * *               }
> > > + * *
> > > + * *               drm_exec_retry_on_contention(&exec);
> > > + * *               if (ret)
> > > + * *                   return ret;
> > > + * *           }
> > > + * *       }
> > > + * *   }
> > >   *
> > >   * This enables all locking to be performed before the driver begins 
> > > modifying
> > >   * the VM.  This is safe to do in the case of overlapping 
> > > DRIVER_VM_BIND_OPs,
> > > --
> > > 2.39.5
> > > signed-off-by:Sidharth Seela<sidharthse...@gmail.com>
> >
> > --
> > Jani Nikula, Intel
>
>
>
> --
> Thanks,
> Sidharth Seela
> +91 - 8826248419
> www.realtimedesign.org



-- 
Thanks,
Sidharth Seela
+91 - 8826248419
www.realtimedesign.org

Reply via email to