intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of the drm-xe tree
@ 2025-08-27  3:30 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2025-08-27  3:30 UTC (permalink / raw)
  To: Lucas De Marchi, Thomas Hellström, DRM XE List
  Cc: Himal Prasad Ghimiray, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

Hi all,

After merging the drm-xe tree, today's linux-next build (htmldocs)
produced these warnings:

Documentation/gpu/driver-uapi:29: include/uapi/drm/xe_drm.h:2078: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/driver-uapi:29: include/uapi/drm/xe_drm.h:2080: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/driver-uapi:29: include/uapi/drm/xe_drm.h:2012: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/driver-uapi:29: include/uapi/drm/xe_drm.h:2196: ERROR: Error in "code-block" directive:
maximum 1 argument(s) allowed, 16 supplied.

.. code-block:: C
   struct drm_xe_vm_query_mem_range_attr query = {
        .vm_id = vm_id,
        .start = 0x100000,
        .range = 0x2000,
    };

   // First ioctl call to get num of mem regions and sizeof each attribute
   ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);

   // Allocate buffer for the memory region attributes
   void *ptr = malloc(query.num_mem_ranges * query.sizeof_mem_range_attr);
   void *ptr_start = ptr;

   query.vector_of_mem_attr = (uintptr_t)ptr;

   // Second ioctl call to actually fill the memory attributes
   ioctl(fd, DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS, &query);

   // Iterate over the returned memory region attributes
   for (unsigned int i = 0; i < query.num_mem_ranges; ++i) {
      struct drm_xe_mem_range_attr *attr = (struct drm_xe_mem_range_attr *)ptr;

      // Do something with attr

      // Move pointer by one entry
      ptr += query.sizeof_mem_range_attr;
    }

   free(ptr_start); [docutils]

Introduced by commits

  231bb0ee7aa5 ("drm/xe/uapi: Add madvise interface")
  418807860e94 ("drm/xe/uapi: Add UAPI for querying VMA count and memory attributes")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-27  3:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27  3:30 linux-next: build warnings after merge of the drm-xe tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).