1. 10 Jan, 2024 4 commits
    • Brian Welty's avatar
      drm/xe: Finish refactoring of exec_queue_create · 25ce7c50
      Brian Welty authored
      Setting of exec_queue user extensions is moved from the end of the ioctl
      function earlier, into __xe_exec_queue_alloc().
      This fixes bug in that the USM attributes for access counters were being
      applied too late, and effectively were ignored.
      
      However, in order to apply user extensions this early, we can no longer
      call q->ops functions.  Instead, make it more efficient. The user extension
      functions can simply update the q->sched_props values and they will be
      applied by the backend during q->ops->init().
      
      v2: minor changes for readability (Matt)
      Signed-off-by: default avatarBrian Welty <brian.welty@intel.com>
      Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      25ce7c50
    • Brian Welty's avatar
      drm/xe: Add exec_queue.sched_props.job_timeout_ms · 6ae24344
      Brian Welty authored
      The purpose here is to allow to optimize exec_queue_set_job_timeout()
      in follow-on patch.  Currently it does q->ops->set_job_timeout(...).
      But we'd like to apply exec_queue_user_extensions much earlier and
      q->ops cannot be called before __xe_exec_queue_init().
      
      It will be much more efficient to instead only have to set
      q->sched_props.job_timeout_ms when applying user extensions. That value
      will then be used during q->ops->init().
      Signed-off-by: default avatarBrian Welty <brian.welty@intel.com>
      Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      6ae24344
    • Brian Welty's avatar
      drm/xe: Refactor __xe_exec_queue_create() · 6e144a7d
      Brian Welty authored
      Split __xe_exec_queue_create() into two functions, alloc and init.
      
      We have an issue in that exec_queue_user_extensions are applied too late.
      In the case of USM properties, these need to be set prior to xe_lrc_init().
      Refactor the logic here, so we can resolve this in follow-on. We only need
      the xe_vm_lock held during the exec_queue_init function.
      Signed-off-by: default avatarBrian Welty <brian.welty@intel.com>
      Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      6e144a7d
    • Paul E. McKenney's avatar
      drm/xe: Fix build bug for GCC 11 · a109d199
      Paul E. McKenney authored
      Building drivers/gpu/drm/xe/xe_gt_pagefault.c with GCC 11 results
      in the following build errors:
      
      ./include/linux/fortify-string.h:57:33: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
         57 | #define __underlying_memcpy     __builtin_memcpy
            |                                 ^
      ./include/linux/fortify-string.h:644:9: note: in expansion of macro ‘__underlying_memcpy’
        644 |         __underlying_##op(p, q, __fortify_size);                        \
            |         ^~~~~~~~~~~~~
      ./include/linux/fortify-string.h:689:26: note: in expansion of macro ‘__fortify_memcpy_chk’
        689 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
            |                          ^~~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/xe/xe_gt_pagefault.c:340:17: note: in expansion of macro ‘memcpy’
        340 |                 memcpy(pf_queue->data + pf_queue->tail, msg, len * sizeof(u32));
            |                 ^~~~~~
      In file included from drivers/gpu/drm/xe/xe_device_types.h:17,
                       from drivers/gpu/drm/xe/xe_vm_types.h:16,
                       from drivers/gpu/drm/xe/xe_bo.h:13,
                       from drivers/gpu/drm/xe/xe_gt_pagefault.c:16:
      drivers/gpu/drm/xe/xe_gt_types.h:102:25: note: at offset [1144, 265324] into destination object ‘tile’ of size 8
        102 |         struct xe_tile *tile;
            |                         ^~~~
      
      Fix these by removing -Wstringop-overflow from drm/xe builds.
      
      Closes: https://lore.kernel.org/all/45ad1d0f-a10f-483e-848a-76a30252edbe@paulmck-laptop/
      Fixes: 7a8bc117 ("drm/xe: Enable W=1 warnings by default")
      Suggested-by: default avatarStephen Rothwell <sfr@rothwell.id.au>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      [ This particular warning is broken on GCC11. In future changes it will
        be moved to the normal C flags in the top level Makefile (out of
        Makefile.extrawarn), but accounting for the compiler support. Just
        remove it out of xe's forced extra warnings for now ]
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      a109d199
  2. 09 Jan, 2024 14 commits
  3. 08 Jan, 2024 4 commits
  4. 05 Jan, 2024 15 commits
  5. 27 Dec, 2023 1 commit
  6. 26 Dec, 2023 1 commit
  7. 22 Dec, 2023 1 commit