1. 24 Aug, 2021 8 commits
    • Candice Li's avatar
    • Candice Li's avatar
      drm/amd/amdgpu: add name field back to ras_common_if · 355e3e4c
      Candice Li authored
      Adding name field back to ras_common_if to work around error
      injection failure with amdgpuras tool.
      Signed-off-by: default avatarCandice Li <candice.li@amd.com>
      Reviewed-by: default avatarJohn Clements <john.clements@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      355e3e4c
    • Borislav Petkov's avatar
      drm/amdgpu: Fix build with missing pm_suspend_target_state module export · a47f6a58
      Borislav Petkov authored
      Building a randconfig here triggered:
      
        ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
      
      because the module export of that symbol happens in
      kernel/power/suspend.c which is enabled with CONFIG_SUSPEND.
      
      The ifdef guards in amdgpu_acpi_is_s0ix_supported(), however, test for
      CONFIG_PM_SLEEP which is defined like this:
      
        config PM_SLEEP
                def_bool y
                depends on SUSPEND || HIBERNATE_CALLBACKS
      
      and that randconfig has:
      
        # CONFIG_SUSPEND is not set
        CONFIG_HIBERNATE_CALLBACKS=y
      
      leading to the module export missing.
      
      Change the ifdeffery to depend directly on CONFIG_SUSPEND.
      
      Fixes: 5706cb3c ("drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled")
      Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Link: https://lkml.kernel.org/r/YSP6Lv53QV0cOAsd@zn.tnicSigned-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      a47f6a58
    • Christophe JAILLET's avatar
      drm/radeon: switch from 'pci_' to 'dma_' API · a5f61dd4
      Christophe JAILLET authored
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below.
      
      It has been compile tested.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a5f61dd4
    • Christophe JAILLET's avatar
      drm/amdgpu: switch from 'pci_' to 'dma_' API · 8a1d1bdb
      Christophe JAILLET authored
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below.
      
      It has been compile tested.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8a1d1bdb
    • Mukul Joshi's avatar
      drm/amdkfd: CWSR with sw scheduler on Aldebaran and Arcturus · f270921a
      Mukul Joshi authored
      Program trap handler settings to enable CWSR with software scheduler
      on Aldebaran and Arcturus.
      Signed-off-by: default avatarMukul Joshi <mukul.joshi@amd.com>
      Reviewed-by: default avatarAmber Lin <Amber.Lin@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f270921a
    • Shashank Sharma's avatar
      drm/amdgpu/OLAND: clip the ref divider max value · 7301757e
      Shashank Sharma authored
      This patch limits the ref_div_max value to 100, during the
      calculation of PLL feedback reference divider. With current
      value (128), the produced fb_ref_div value generates unstable
      output at particular frequencies. Radeon driver limits this
      value at 100.
      
      On Oland, when we try to setup mode 2048x1280@60 (a bit weird,
      I know), it demands a clock of 221270 Khz. It's been observed
      that the PLL calculations using values 128 and 100 are vastly
      different, and look like this:
      
      +------------------------------------------+
      |Parameter    |AMDGPU        |Radeon       |
      |             |              |             |
      +-------------+----------------------------+
      |Clock feedback              |             |
      |divider max  |  128         |   100       |
      |cap value    |              |             |
      |             |              |             |
      |             |              |             |
      +------------------------------------------+
      |ref_div_max  |              |             |
      |             |  42          |  20         |
      |             |              |             |
      |             |              |             |
      +------------------------------------------+
      |ref_div      |  42          |  20         |
      |             |              |             |
      +------------------------------------------+
      |fb_div       |  10326       |  8195       |
      +------------------------------------------+
      |fb_div       |  1024        |  163        |
      +------------------------------------------+
      |fb_dev_p     |  4           |  9          |
      |frac fb_de^_p|              |             |
      +----------------------------+-------------+
      
      With ref_div_max value clipped at 100, AMDGPU driver can also
      drive videmode 2048x1280@60 (221Mhz) and produce proper output
      without any blanking and distortion on the screen.
      
      PS: This value was changed from 128 to 100 in Radeon driver also, here:
      https://github.com/freedesktop/drm-tip/commit/4b21ce1b4b5d262e7d4656b8ececc891fc3cb806
      
      V1:
      Got acks from:
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      
      V2:
      - Restricting the changes only for OLAND, just to avoid any regression
        for other cards.
      - Changed unsigned -> unsigned int to make checkpatch quiet.
      
      V3: Apply the change on SI family (not only oland) (Christian)
      
      Cc: Alex Deucher <Alexander.Deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Eddy Qin <Eddy.Qin@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7301757e
    • Eric Yang's avatar
      drm/amd/display: refactor riommu invalidation wa · 234b4fd9
      Eric Yang authored
      [Why]
      A cleaner solution, only done once on boot.
      
      [How]
      Remove previous workaround and configure an extra
      vmid one time on boot
      Reviewed-by: default avatarKazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
      Acked-by: default avatarSolomon Chiu <solomon.chiu@amd.com>
      Signed-off-by: default avatarEric Yang <Eric.Yang2@amd.com>
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      234b4fd9
  2. 20 Aug, 2021 3 commits
  3. 18 Aug, 2021 9 commits
  4. 16 Aug, 2021 20 commits