Skip to content
Snippets Groups Projects
  1. Sep 05, 2024
  2. Sep 03, 2024
  3. Aug 27, 2024
    • Leo Li's avatar
      drm/amd: Introduce additional IPS debug flags · a08d7592
      Leo Li authored
      
      [Why]
      
      Idle power states (IPS) describe levels of power-gating within DCN. DM
      and DC is responsible for ensuring that we are out of IPS before any DCN
      programming happens. Any DCN programming while we're in IPS leads to
      undefined behavior (mostly hangs).
      
      Because IPS intersects with all display features, the ability to disable
      IPS by default while ironing out the known issues is desired. However,
      disabing it completely will cause important features such as s0ix entry
      to fail.
      
      Therefore, more granular IPS debug flags are desired.
      
      [How]
      
      Extend the dc debug mask bits to include the available list of IPS
      debug flags.
      
      All the flags should work as documented, with the exception of
      IPS_DISABLE_DYNAMIC. It requires dm changes which will be done in
      later changes.
      
      v2: enable docs and fix docstring format
      
      Signed-off-by: default avatarLeo Li <sunpeng.li@amd.com>
      Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a08d7592
  4. Aug 22, 2024
  5. Jul 22, 2024
  6. Jul 16, 2024
  7. Jul 08, 2024
  8. Jun 27, 2024
  9. Jun 11, 2024
  10. May 31, 2024
  11. May 28, 2024
  12. May 21, 2024
    • Lucas De Marchi's avatar
      drm/xe/client: Print runtime to fdinfo · 188ced1e
      Lucas De Marchi authored
      
      Print the accumulated runtime for client when printing fdinfo.
      Each time a query is done it first does 2 things:
      
      1) loop through all the exec queues for the current client and
         accumulate the runtime, per engine class. CTX_TIMESTAMP is used for
         that, being read from the context image.
      
      2) Read a "GPU timestamp" that can be used for considering "how much GPU
         time has passed" and that has the same unit/refclock as the one
         recording the runtime. RING_TIMESTAMP is used for that via MMIO.
      
      Since for all current platforms RING_TIMESTAMP follows the same
      refclock, just read it once, using any first engine available.
      
      This is exported to userspace as 2 numbers in fdinfo:
      
      	drm-cycles-<class>: <RUNTIME>
      	drm-total-cycles-<class>: <TIMESTAMP>
      
      Userspace is expected to collect at least 2 samples, which allows to
      know the client engine busyness as per:
      
      		    RUNTIME1 - RUNTIME0
      	busyness = ---------------------
      			  T1 - T0
      
      Since drm-cycles-<class> always starts at 0, it's also possible to know
      if and engine was ever used by a client.
      
      It's expected that userspace will read any 2 samples every few seconds.
      Given the update frequency of the counters involved and that
      CTX_TIMESTAMP is 32-bits, the counter for each exec_queue can wrap
      around (assuming 100% utilization) after ~200s. The wraparound is not
      perceived by userspace since it's just accumulated for all the
      exec_queues in a 64-bit counter) but the measurement will not be
      accurate if the samples are too far apart.
      
      This could be mitigated by adding a workqueue to accumulate the counters
      every so often, but it's additional complexity for something that is
      done already by userspace every few seconds in tools like gputop (from
      igt), htop, nvtop, etc, with none of them really defaulting to 1 sample
      per minute or more.
      
      Reviewed-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@igalia.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-9-lucas.demarchi@intel.com
      
      
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      188ced1e
  13. May 20, 2024
  14. May 15, 2024
  15. May 14, 2024
  16. May 08, 2024
  17. May 02, 2024
  18. Apr 17, 2024
  19. Apr 15, 2024
    • Jocelyn Falempe's avatar
      drm/panic: Add a drm panic handler · bf9fb17c
      Jocelyn Falempe authored
      
      This module displays a user friendly message when a kernel panic
      occurs. It currently doesn't contain any debug information,
      but that can be added later.
      
      v2
       * Use get_scanout_buffer() instead of the drm client API.
        (Thomas Zimmermann)
       * Add the panic reason to the panic message (Nerdopolis)
       * Add an exclamation mark (Nerdopolis)
      
      v3
       * Rework the drawing functions, to write the pixels line by line and
       to use the drm conversion helper to support other formats.
       (Thomas Zimmermann)
      
      v4
       * Use drm_fb_r1_to_32bit for fonts (Thomas Zimmermann)
       * Remove the default y to DRM_PANIC config option (Thomas Zimmermann)
       * Add foreground/background color config option
       * Fix the bottom lines not painted if the framebuffer height
         is not a multiple of the font height.
       * Automatically register the device to drm_panic, if the function
         get_scanout_buffer exists. (Thomas Zimmermann)
      
      v5
       * Change the drawing API, use drm_fb_blit_from_r1() to draw the font.
       * Also add drm_fb_fill() to fill area with background color.
       * Add draw_pixel_xy() API for drivers that can't provide a linear buffer.
       * Add a flush() callback for drivers that needs to synchronize the buffer.
       * Add a void *private field, so drivers can pass private data to
         draw_pixel_xy() and flush().
      
      v6
       * Fix sparse warning for panic_msg and logo.
      
      v7
       * Add select DRM_KMS_HELPER for the color conversion functions.
      
      v8
       * Register directly each plane to the panic notifier (Sima)
       * Add raw_spinlock to properly handle concurrency (Sima)
       * Register plane instead of device, to avoid looping through plane
         list, and simplify code.
       * Replace get_scanout_buffer() logic with drm_panic_set_buffer()
        (Thomas Zimmermann)
       * Removed the draw_pixel_xy() API, will see later if it can be added back.
      
      v9
       * Revert to using get_scanout_buffer() (Sima)
       * Move get_scanout_buffer() and panic_flush() to the plane helper
         functions (Thomas Zimmermann)
       * Register all planes with get_scanout_buffer() to the panic notifier
       * Use drm_panic_lock() to protect against race (Sima)
      
      v10
       * Move blit and fill functions back in drm_panic (Thomas Zimmermann).
       * Simplify the text drawing functions.
       * Use kmsg_dumper instead of panic_notifier (Sima).
      
      v12
       * Use array for map and pitch in struct drm_scanout_buffer
         to support multi-planar format later. (Thomas Zimmermann)
       * Better indent struct drm_scanout_buffer declaration. (Thomas Zimmermann)
      
      Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240409163432.352518-3-jfalempe@redhat.com
      
      
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      bf9fb17c
    • Sebastian Wick's avatar
      drm: Document requirements for driver-specific KMS props in new drivers · f99885b1
      Sebastian Wick authored
      
      When extending support for a driver-specific KMS property to additional
      drivers, we should apply all the requirements for new properties and
      make sure the semantics are the same and documented.
      
      v2: devs of the driver which introduced property shall help and ack
      
      Signed-off-by: default avatarSebastian Wick <sebastian.wick@redhat.com>
      Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240410122008.38207-1-sebastian.wick@redhat.com
      f99885b1
  20. Apr 10, 2024
  21. Mar 22, 2024
  22. Mar 11, 2024
  23. Mar 01, 2024
    • Boris Brezillon's avatar
      drm/panthor: Add uAPI · 0f25e493
      Boris Brezillon authored
      
      Panthor follows the lead of other recently submitted drivers with
      ioctls allowing us to support modern Vulkan features, like sparse memory
      binding:
      
      - Pretty standard GEM management ioctls (BO_CREATE and BO_MMAP_OFFSET),
        with the 'exclusive-VM' bit to speed-up BO reservation on job submission
      - VM management ioctls (VM_CREATE, VM_DESTROY and VM_BIND). The VM_BIND
        ioctl is loosely based on the Xe model, and can handle both
        asynchronous and synchronous requests
      - GPU execution context creation/destruction, tiler heap context creation
        and job submission. Those ioctls reflect how the hardware/scheduler
        works and are thus driver specific.
      
      We also have a way to expose IO regions, such that the usermode driver
      can directly access specific/well-isolate registers, like the
      LATEST_FLUSH register used to implement cache-flush reduction.
      
      This uAPI intentionally keeps usermode queues out of the scope, which
      explains why doorbell registers and command stream ring-buffers are not
      directly exposed to userspace.
      
      v6:
      - Add Maxime's and Heiko's acks
      
      v5:
      - Fix typo
      - Add Liviu's R-b
      
      v4:
      - Add a VM_GET_STATE ioctl
      - Fix doc
      - Expose the CORE_FEATURES register so we can deal with variants in the
        UMD
      - Add Steve's R-b
      
      v3:
      - Add the concept of sync-only VM operation
      - Fix support for 32-bit userspace
      - Rework drm_panthor_vm_create to pass the user VA size instead of
        the kernel VA size (suggested by Robin Murphy)
      - Typo fixes
      - Explicitly cast enums with top bit set to avoid compiler warnings in
        -pedantic mode.
      - Drop property core_group_count as it can be easily calculated by the
        number of bits set in l2_present.
      
      Co-developed-by: default avatarSteven Price <steven.price@arm.com>
      Signed-off-by: default avatarSteven Price <steven.price@arm.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
      Reviewed-by: default avatarSteven Price <steven.price@arm.com>
      Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240229162230.2634044-2-boris.brezillon@collabora.com
      0f25e493
  24. Feb 16, 2024
  25. Jan 29, 2024
Loading