Skip to content
Snippets Groups Projects
  1. Dec 22, 2022
  2. Dec 15, 2022
  3. Dec 08, 2022
  4. Dec 02, 2022
  5. Dec 01, 2022
  6. Nov 29, 2022
    • Randy Dunlap's avatar
      drm/amdgpu: update docum. filename following rename · 3d271e2e
      Randy Dunlap authored
      
      Fix documentation build errors for amdgpu: correct the filename.
      
      Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
      Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
      Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
      
      WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 5.3.0 -function MMU Notifier ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed with return code 1
      WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 5.3.0 -internal ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed with return code 2
      
      Fixes: d9483ecd ("drm/amdgpu: rename the files for HMM handling")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Felix Kuehling <Felix.Kuehling@amd.com>
      Cc: David Airlie <airlied@gmail.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3d271e2e
  7. Nov 24, 2022
  8. Nov 23, 2022
  9. Nov 15, 2022
  10. Nov 14, 2022
  11. Nov 08, 2022
  12. Oct 25, 2022
  13. Sep 05, 2022
    • Igor Torrente's avatar
      drm: vkms: Supports to the case where primary plane doesn't match the CRTC · bc0d7fde
      Igor Torrente authored and Melissa Wen's avatar Melissa Wen committed
      
      We will remove the current assumption that the primary plane has the
      same size and position as CRTC and that the primary plane is the
      bottom-most in zpos order, or is even enabled. At least as far
      as the blending machinery is concerned.
      
      For that we will add CRTC dimension information to `vkms_crtc_state`
      and add a opaque black backgound color.
      
      Because now we need to fill the background, we had a loss in
      performance with this change. Results running the IGT[1] test
      `igt@kms_cursor_crc@pipe-a-cursor-512x512-onscreen` ten times:
      
      |                  Frametime                   |
      |:--------------------------------------------:|
      |  Implementation |  Previous |   This commit  |
      |:---------------:|:---------:|:--------------:|
      | frametime range |  5~18 ms  |     10~22 ms   |
      |     Average     |  8.47 ms  |     12.32 ms   |
      
      [1] IGT commit id: bc3f6833a12221a46659535dac06ebb312490eb4
      
      V6: Improve the commit description (Pekka Paalanen).
          Update some comments (Pekka Paalanen).
          Remove some fields from `vkms_crtc_state` and move where
          some variables are set (Pekka Paalanen).
      
      Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
      Signed-off-by: default avatarIgor Torrente <igormtorrente@gmail.com>
      Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220905190811.25024-8-igormtorrente@gmail.com
      bc0d7fde
    • Igor Torrente's avatar
      drm: vkms: Refactor the plane composer to accept new formats · 8ba16485
      Igor Torrente authored and Melissa Wen's avatar Melissa Wen committed
      
      Currently the blend function only accepts XRGB_8888 and ARGB_8888
      as a color input.
      
      This patch refactors all the functions related to the plane composition
      to overcome this limitation.
      
      The pixels blend is done using the new internal format. And new handlers
      are being added to convert a specific format to/from this internal format.
      
      So the blend operation depends on these handlers to convert to this common
      format. The blended result, if necessary, is converted to the writeback
      buffer format.
      
      This patch introduces three major differences to the blend function.
      1 - All the planes are blended at once.
      2 - The blend calculus is done as per line instead of per pixel.
      3 - It is responsible to calculates the CRC and writing the writeback
      buffer(if necessary).
      
      These changes allow us to allocate way less memory in the intermediate
      buffer to compute these operations. Because now we don't need to
      have the entire intermediate image lines at once, just one line is
      enough.
      
      | Memory consumption (output dimensions) |
      |:--------------------------------------:|
      |       Current      |     This patch    |
      |:------------------:|:-----------------:|
      |   Width * Heigth   |     2 * Width     |
      
      Beyond memory, we also have a minor performance benefit from all
      these changes. Results running the IGT[1] test
      `igt@kms_cursor_crc@pipe-a-cursor-512x512-onscreen` ten times:
      
      |                 Frametime                  |
      |:------------------------------------------:|
      |  Implementation |  Current  |  This commit |
      |:---------------:|:---------:|:------------:|
      | frametime range |  9~22 ms  |    5~17 ms   |
      |     Average     |  11.4 ms  |    7.8 ms    |
      
      [1] IGT commit id: bc3f6833a12221a46659535dac06ebb312490eb4
      
      V2: Improves the performance drastically, by performing the operations
          per-line and not per-pixel(Pekka Paalanen).
          Minor improvements(Pekka Paalanen).
      V3: Changes the code to blend the planes all at once. This improves
          performance, memory consumption, and removes much of the weirdness
          of the V2(Pekka Paalanen and me).
          Minor improvements(Pekka Paalanen and me).
      V4: Rebase the code and adapt it to the new NUM_OVERLAY_PLANES constant.
      V5: Minor checkpatch fixes and the removal of TO-DO item(Melissa Wen).
          Several security/robustness improvents(Pekka Paalanen).
          Removes check_planes_x_bounds function and allows partial
          partly off-screen(Pekka Paalanen).
      V6: Fix a mismatch of some variable sizes (Pekka Paalanen).
          Several minor improvements (Pekka Paalanen).
      
      Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarIgor Torrente <igormtorrente@gmail.com>
      Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220905190811.25024-7-igormtorrente@gmail.com
      8ba16485
  14. Sep 03, 2022
  15. Sep 01, 2022
    • Rodrigo Siqueira's avatar
      Documentation/gpu: Add Multiplane Overlay doc · 6c49df92
      Rodrigo Siqueira authored
      Multiple plane overlay is a feature supported by AMD hardware, but it
      has specific details that deserve proper documentation. This commit
      introduces a documentation that describes some of the features,
      limitations, and use cases for this feature. Part of this documentation
      came from some discussion in the public upstream [1][2].
      
      [1]. https://lore.kernel.org/amd-gfx/3qY-QeukF_Q_MJeIXAuBjO4szbS4jRtqkTifXnbnN3bp88SxVodFQRpah3mIIVJq24DUkF6g0rOGdCmSqTvVxx9LCGEItmzLw8uWU44jtXE=@emersion.fr/
      [2]. https://lore.kernel.org/amd-gfx/864e45d0-c14b-3b12-0f5b-9d26a9cb41bd@amd.com/
      
      
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Cc: Hersen Wu <hersenxs.wu@amd.com>
      Cc: Alex Hung <alex.hung@amd.com>
      Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Mark Yacoub <markyacoub@chromium.org>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Pierre-Loup <pgriffais@valvesoftware.com>
      Cc: Michel Dänzer <michel.daenzer@mailbox.org>
      Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6c49df92
    • Rodrigo Siqueira's avatar
      Documentation/gpu: Add an explanation about the DCN pipeline · 330d6da3
      Rodrigo Siqueira authored
      
      In the DCN code, we constantly talk about hardware pipeline, pipeline,
      or even just pipes, which is a concept that is not obvious to everyone.
      For this reason, this commit expands the DCN overview explanation by
      adding a new section that describes what a pipeline is from the DCN
      perspective.
      
      Changes since V1:
      - Rewrite the first paragraph that describes AMD hardware pipeline.
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Cc: Hersen Wu <hersenxs.wu@amd.com>
      Cc: Alex Hung <alex.hung@amd.com>
      Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Mark Yacoub <markyacoub@chromium.org>
      Cc: Pierre-Loup <pgriffais@valvesoftware.com>
      Cc: Michel Dänzer <michel.daenzer@mailbox.org>
      Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      330d6da3
    • Rodrigo Siqueira's avatar
      Documentation/gpu: Add info table for ASICs · 9d9b217d
      Rodrigo Siqueira authored
      
      Amdgpu driver is used in an extensive range of devices, and each ASIC
      has some specific configuration. As a result of this variety, sometimes
      it is hard to identify the correct block that might cause the issue.
      This commit expands the amdgpu kernel-doc to alleviate this issue by
      introducing one ASIC table that describes dGPU and another one that
      shares the APU info.
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Cc: Hersen Wu <hersenxs.wu@amd.com>
      Cc: Alex Hung <alex.hung@amd.com>
      Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Mark Yacoub <markyacoub@chromium.org>
      Cc: Pierre-Loup <pgriffais@valvesoftware.com>
      Cc: Michel Dänzer <michel.daenzer@mailbox.org>
      Cc: Kent Russell <Kent.Russell@amd.com>
      Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9d9b217d
  16. Aug 16, 2022
  17. Aug 03, 2022
    • Danilo Krummrich's avatar
      drm/todo: remove task to rename CMA helpers · 1d8104e0
      Danilo Krummrich authored and Sam Ravnborg's avatar Sam Ravnborg committed
      
      Both, GEM and FB, CMA helpers were renamed to "GEM DMA" and "FB DMA",
      hence the task can be removed.
      
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-6-dakr@redhat.com
      1d8104e0
    • Danilo Krummrich's avatar
      drm/gem: rename GEM CMA helpers to GEM DMA helpers · 4a83c26a
      Danilo Krummrich authored and Sam Ravnborg's avatar Sam Ravnborg committed
      
      Rename "GEM CMA" helpers to "GEM DMA" helpers - considering the
      hierarchy of APIs (mm/cma -> dma -> gem dma) calling them "GEM
      DMA" seems to be more applicable.
      
      Besides that, commit e57924d4 ("drm/doc: Task to rename CMA helpers")
      requests to rename the CMA helpers and implies that people seem to be
      confused about the naming.
      
      In order to do this renaming the following script was used:
      
      ```
      	#!/bin/bash
      
      	DIRS="drivers/gpu include/drm Documentation/gpu"
      
      	REGEX_SYM_UPPER="[0-9A-Z_\-]"
      	REGEX_SYM_LOWER="[0-9a-z_\-]"
      
      	REGEX_GREP_UPPER="(${REGEX_SYM_UPPER}*)(GEM)_CMA_(${REGEX_SYM_UPPER}*)"
      	REGEX_GREP_LOWER="(${REGEX_SYM_LOWER}*)(gem)_cma_(${REGEX_SYM_LOWER}*)"
      
      	REGEX_SED_UPPER="s/${REGEX_GREP_UPPER}/\1\2_DMA_\3/g"
      	REGEX_SED_LOWER="s/${REGEX_GREP_LOWER}/\1\2_dma_\3/g"
      
      	# Find all upper case 'CMA' symbols and replace them with 'DMA'.
      	for ff in $(grep -REHl "${REGEX_GREP_UPPER}" $DIRS)
      	do
      	       sed -i -E "$REGEX_SED_UPPER" $ff
      	done
      
      	# Find all lower case 'cma' symbols and replace them with 'dma'.
      	for ff in $(grep -REHl "${REGEX_GREP_LOWER}" $DIRS)
      	do
      	       sed -i -E "$REGEX_SED_LOWER" $ff
      	done
      
      	# Replace all occurrences of 'CMA' / 'cma' in comments and
      	# documentation files with 'DMA' / 'dma'.
      	for ff in $(grep -RiHl " cma " $DIRS)
      	do
      		sed -i -E "s/ cma / dma /g" $ff
      		sed -i -E "s/ CMA / DMA /g" $ff
      	done
      
      	# Rename all 'cma_obj's to 'dma_obj'.
      	for ff in $(grep -RiHl "cma_obj" $DIRS)
      	do
      		sed -i -E "s/cma_obj/dma_obj/g" $ff
      	done
      ```
      
      Only a few more manual modifications were needed, e.g. reverting the
      following modifications in some DRM Kconfig files
      
          -       select CMA if HAVE_DMA_CONTIGUOUS
          +       select DMA if HAVE_DMA_CONTIGUOUS
      
      as well as manually picking the occurrences of 'CMA'/'cma' in comments and
      documentation which relate to "GEM CMA", but not "FB CMA".
      
      Also drivers/gpu/drm/Makefile was fixed up manually after renaming
      drm_gem_cma_helper.c to drm_gem_dma_helper.c.
      
      This patch is compile-time tested building a x86_64 kernel with
      `make allyesconfig && make drivers/gpu/drm`.
      
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
      Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> #drivers/gpu/drm/arm
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-4-dakr@redhat.com
      4a83c26a
    • Danilo Krummrich's avatar
      drm/fb: rename FB CMA helpers to FB DMA helpers · 6bcfe8ea
      Danilo Krummrich authored and Sam Ravnborg's avatar Sam Ravnborg committed
      
      Rename "FB CMA" helpers to "FB DMA" helpers - considering the hierarchy
      of APIs (mm/cma -> dma -> fb dma) calling them "FB DMA" seems to be
      more applicable.
      
      Besides that, commit e57924d4 ("drm/doc: Task to rename CMA helpers")
      requests to rename the CMA helpers and implies that people seem to be
      confused about the naming.
      
      In order to do this renaming the following script was used:
      
      ```
      	#!/bin/bash
      
      	DIRS="drivers/gpu include/drm Documentation/gpu"
      
      	REGEX_SYM_UPPER="[0-9A-Z_\-]"
      	REGEX_SYM_LOWER="[0-9a-z_\-]"
      
      	REGEX_GREP_UPPER="(${REGEX_SYM_UPPER}*)(FB)_CMA_(${REGEX_SYM_UPPER}*)"
      	REGEX_GREP_LOWER="(${REGEX_SYM_LOWER}*)(fb)_cma_(${REGEX_SYM_LOWER}*)"
      
      	REGEX_SED_UPPER="s/${REGEX_GREP_UPPER}/\1\2_DMA_\3/g"
      	REGEX_SED_LOWER="s/${REGEX_GREP_LOWER}/\1\2_dma_\3/g"
      
      	# Find all upper case 'CMA' symbols and replace them with 'DMA'.
      	for ff in $(grep -REHl "${REGEX_GREP_UPPER}" $DIRS)
      	do
      	       sed -i -E "$REGEX_SED_UPPER" $ff
      	done
      
      	# Find all lower case 'cma' symbols and replace them with 'dma'.
      	for ff in $(grep -REHl "${REGEX_GREP_LOWER}" $DIRS)
      	do
      	       sed -i -E "$REGEX_SED_LOWER" $ff
      	done
      
      	# Replace all occurrences of 'CMA' / 'cma' in comments and
      	# documentation files with 'DMA' / 'dma'.
      	for ff in $(grep -RiHl " cma " $DIRS)
      	do
      		sed -i -E "s/ cma / dma /g" $ff
      		sed -i -E "s/ CMA / DMA /g" $ff
      	done
      ```
      
      Only a few more manual modifications were needed, e.g. reverting the
      following modifications in some DRM Kconfig files
      
          -       select CMA if HAVE_DMA_CONTIGUOUS
          +       select DMA if HAVE_DMA_CONTIGUOUS
      
      as well as manually picking the occurrences of 'CMA'/'cma' in comments and
      documentation which relate to "FB CMA", but not "GEM CMA".
      
      This patch is compile-time tested building a x86_64 kernel with
      `make allyesconfig && make drivers/gpu/drm`.
      
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
      Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> #drivers/gpu/drm/arm
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-3-dakr@redhat.com
      6bcfe8ea
  18. Jul 28, 2022
  19. Jul 25, 2022
  20. Jul 13, 2022
  21. Jul 11, 2022
  22. Jul 05, 2022
  23. Jul 01, 2022
  24. Jun 27, 2022
  25. Jun 17, 2022
  26. Jun 12, 2022
  27. May 11, 2022
Loading