1. 19 Dec, 2023 12 commits
    • Maarten Lankhorst's avatar
      drm/xe: Convert memory device refcount to s32 · 09a68b4a
      Maarten Lankhorst authored
      The comparison with < 0 suggests that the memory device access
      should be signed to handle underflow. This makes it work more reliably.
      
      As a result, the max refcount is now S32_MAX instead.
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      09a68b4a
    • José Roberto de Souza's avatar
      drm/xe/uapi: Add XE_ENGINE_GET_PROPERTY uAPI · 19431b02
      José Roberto de Souza authored
      This is intended to get some properties that are of interest of UMDs
      like the ban state.
      
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      19431b02
    • José Roberto de Souza's avatar
      drm/xe/uapi: Rename XE_ENGINE_PROPERTY_X to XE_ENGINE_SET_PROPERTY_X · 3949d57f
      José Roberto de Souza authored
      Engine property get uAPI will be added, so to avoid ambiguity here
      renaming XE_ENGINE_PROPERTY_X to XE_ENGINE_SET_PROPERTY_X.
      
      No changes in behavior.
      
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      3949d57f
    • Francois Dugast's avatar
      drm/xe: Use global macros to set PM functions · 8375e58c
      Francois Dugast authored
      This aligns with other drivers and fixes build failure when
      CONFIG_PM_SLEEP is not set, such as on RISC-V.
      Signed-off-by: default avatarFrancois Dugast <francois.dugast@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      8375e58c
    • Mauro Carvalho Chehab's avatar
      drm/xe: skip Kunit tests requiring real hardware when running on UML · a93bcc3a
      Mauro Carvalho Chehab authored
      Some tests are meant to run only on real hardware. Skip those,
      if no device was found.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      a93bcc3a
    • Rodrigo Vivi's avatar
      drm/xe/guc_pc: Fix Meteor Lake registers. · b3ab1b91
      Rodrigo Vivi authored
      When adding the frequency management, Meteor Lake platform
      was left behind. Handling it properly now.
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Cc: Francois Dugast <francois.dugast@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      b3ab1b91
    • Philippe Lecluse's avatar
      drm/xe: Fix Meteor Lake rsa issue on guc loading · 6c8c1e74
      Philippe Lecluse authored
      [  117.901473] xe 0000:00:02.0: [drm] GuC load failed: status = 0x400000A0
      [  117.901506] xe 0000:00:02.0: [drm] GuC load failed: status: Reset = 0, BootROM = 0x50, UKernel = 0x00, MIA = 0x00, Auth = 0x01
      Signed-off-by: default avatarPhilippe Lecluse <philippe.lecluse@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      6c8c1e74
    • Balasubramani Vivekanandan's avatar
      drm/xe/gt: Enable interrupt while initializing root gt · 9484c7dc
      Balasubramani Vivekanandan authored
      At present the interrupts are enabled while initializing the last GT.
      But this is incorrect for a Multi-GT platform, as root GT initialization
      will fail with interrupt disabled. Interrupts are required for
      the GuC submission triggered during initialization.
      Enable the interrupt during the root GT initialization.
      Signed-off-by: default avatarBalasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      9484c7dc
    • Mauro Carvalho Chehab's avatar
      drm/xe: KUnit tests depend on CONFIG_DRM_FBDEV_EMULATION · a4c75c0f
      Mauro Carvalho Chehab authored
      ERROR:root:../drivers/gpu/drm/xe/display/intel_fbdev.c:585:5: error: redefinition of ‘intel_fbdev_init’
        585 | int intel_fbdev_init(struct drm_device *dev)
            |     ^~~~~~~~~~~~~~~~
      In file included from ../drivers/gpu/drm/xe/display/intel_fbdev.c:55:
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:26:19: note: previous definition of ‘intel_fbdev_init’ with type ‘int(struct drm_device *)’
         26 | static inline int intel_fbdev_init(struct drm_device *dev)
            |                   ^~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:626:6: error: redefinition of ‘intel_fbdev_initial_config_async’
        626 | void intel_fbdev_initial_config_async(struct drm_device *dev)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:31:20: note: previous definition of ‘intel_fbdev_initial_config_async’ with type ‘void(struct drm_device *)’
         31 | static inline void intel_fbdev_initial_config_async(struct drm_device *dev)
            |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:646:6: error: redefinition of ‘intel_fbdev_unregister’
        646 | void intel_fbdev_unregister(struct drm_i915_private *dev_priv)
            |      ^~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:35:20: note: previous definition of ‘intel_fbdev_unregister’ with type ‘void(struct xe_device *)’
         35 | static inline void intel_fbdev_unregister(struct drm_i915_private *dev_priv)
            |                    ^~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:661:6: error: redefinition of ‘intel_fbdev_fini’
        661 | void intel_fbdev_fini(struct drm_i915_private *dev_priv)
            |      ^~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:39:20: note: previous definition of ‘intel_fbdev_fini’ with type ‘void(struct xe_device *)’
         39 | static inline void intel_fbdev_fini(struct drm_i915_private *dev_priv)
            |                    ^~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:692:6: error: redefinition of ‘intel_fbdev_set_suspend’
        692 | void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous)
            |      ^~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:43:20: note: previous definition of ‘intel_fbdev_set_suspend’ with type ‘void(struct drm_device *, int,  bool)’ {aka ‘void(struct drm_device *, int,  _Bool)’}
         43 | static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous)
            |                    ^~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:751:6: error: redefinition of ‘intel_fbdev_output_poll_changed’
        751 | void intel_fbdev_output_poll_changed(struct drm_device *dev)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:47:20: note: previous definition of ‘intel_fbdev_output_poll_changed’ with type ‘void(struct drm_device *)’
         47 | static inline void intel_fbdev_output_poll_changed(struct drm_device *dev)
            |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:770:6: error: redefinition of ‘intel_fbdev_restore_mode’
        770 | void intel_fbdev_restore_mode(struct drm_device *dev)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:51:20: note: previous definition of ‘intel_fbdev_restore_mode’ with type ‘void(struct drm_device *)’
         51 | static inline void intel_fbdev_restore_mode(struct drm_device *dev)
            |                    ^~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.c:785:27: error: redefinition of ‘intel_fbdev_framebuffer’
        785 | struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
            |                           ^~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_fbdev.h:54:41: note: previous definition of ‘intel_fbdev_framebuffer’ with type ‘struct intel_framebuffer *(struct intel_fbdev *)’
         54 | static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
            |                                         ^~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      a4c75c0f
    • Mauro Carvalho Chehab's avatar
      drm/xe/Kconfig.debug: select DEBUG_FS for KUnit runs · 1598955d
      Mauro Carvalho Chehab authored
      KUnit reuquires debugfs, as otherwise, it won't build:
      
      $ make ARCH=x86_64 O=.kunit --jobs=8
      ERROR:root:../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1612:6: error: redefinition of ‘intel_display_debugfs_register’
       1612 | void intel_display_debugfs_register(struct drm_i915_private *i915)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:18:
      ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:18:20: note: previous definition of ‘intel_display_debugfs_register’ with type ‘void(struct xe_device *)’
         18 | static inline void intel_display_debugfs_register(struct drm_i915_private *i915) {}
            |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1935:6: error: redefinition of ‘intel_connector_debugfs_add’
       1935 | void intel_connector_debugfs_add(struct intel_connector *intel_connector)
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:19:20: note: previous definition of ‘intel_connector_debugfs_add’ with type ‘void(struct intel_connector *)’
         19 | static inline void intel_connector_debugfs_add(struct intel_connector *connector) {}
            |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1993:6: error: redefinition of ‘intel_crtc_debugfs_add’
       1993 | void intel_crtc_debugfs_add(struct drm_crtc *crtc)
            |      ^~~~~~~~~~~~~~~~~~~~~~
      ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:20:20: note: previous definition of ‘intel_crtc_debugfs_add’ with type ‘void(struct drm_crtc *)’
         20 | static inline void intel_crtc_debugfs_add(struct drm_crtc *crtc) {}
            |                    ^~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      1598955d
    • Lucas De Marchi's avatar
      drm/xe: Add min config for kunit integration ARCH=um · a02a0c6d
      Lucas De Marchi authored
      Some of the tests may benefit from running with ARCH=um, forgoing any
      additional setup on the CI build side. Add min config for that.
      
      Tested with:
      
      	./tools/testing/kunit/kunit.py build \
      		--kunitconfig drivers/gpu/drm/xe/.kunitconfig \
      		--jobs $(nproc) \
      		--build_dir build_kunit
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      a02a0c6d
    • Lucas De Marchi's avatar
      drm/xe: Add documentation for mem_type · 1ef151d7
      Lucas De Marchi authored
      mem_type field was added in commit d8b52a02 ("drm/xe: Implement
      stolen memory.") to designate the TTM memory type for that mgr. Add
      kernel-doc with its description.
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      1ef151d7
  2. 12 Dec, 2023 28 commits