aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-02-15 18:29:27 -0500
committerDave Airlie <airlied@redhat.com>2018-02-15 18:29:27 -0500
commit76ea0f334e7fb13226e64ee7de928611f5303faf (patch)
tree4a6b8d8f1b19a68072f2ce8f33add59be9a67be7 /drivers/gpu/drm/amd/amdgpu
parentf0308d76906a5b65ec4fcc3b133394caa9f00638 (diff)
parent1bc3d3cce8c3b44c2b5ac6cee98c830bb40e6b0f (diff)
Merge tag 'drm-misc-next-2018-02-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 4.17: UAPI Changes: - drm/vc4: Expose performance counters to userspace (Boris) Cross-subsystem Changes: - MAINTAINERS: Linus to maintain panel-arm-versatile in -misc (Linus) Core Changes: - Only use swiotlb when necessary (Chunming) Driver Changes: - drm/panel: Add support for ARM Versatile panels (Linus) - pl111: Improvements around versatile panel support (Linus) ---------------------------------------- Tagged on 2018-02-06: drm-misc-next for 4.17: UAPI Changes: - Validate mode flags + type (Ville) - Deprecate unused mode flags PIXMUX, BCAST (Ville) - Deprecate unused mode types BUILTIN, CRTC_C, CLOCK_C, DEFAULT (Ville) Cross-subsystem Changes: - MAINTAINERS: s/Daniel/Maarten/ for drm-misc (Daniel) Core Changes: - gem: Export gem functions for drivers to use (Samuel) - bridge: Introduce bridge timings in drm_bridge (Linus) - dma-buf: Allow exclusive fence to be bundled in fence array when calling reservation_object_get_fences_rcu (Christian) - dp: Add training pattern 4 and HBR3 support to dp helpers (Manasi) - fourcc: Add alpha bit to formats to avoid driver format LUTs (Maxime) - mode: Various cleanups + add new device-wide .mode_valid hook (Ville) - atomic: Fix state leak when non-blocking commits fail (Leo) NOTE: IIRC, this was cross-picked to -fixes so it might fall out - crc: Allow polling on the data fd (Maarten) Driver Changes: - bridge/vga-dac: Add THS8134* support (Linus) - tinydrm: Various MIPI DBI improvements/cleanups (Noralf) - bridge/dw-mipi-dsi: Cleanups + use create_packet helper (Brian) - drm/sun4i: Add Display Engine frontend support (Maxime) - drm/sun4i: Add zpos support + increase num planes from 2 to 4 (Maxime) - various: Use drm_mode_get_hv_timing() to fill plane clip rectangle (Ville) - stm: Add 8-bit clut support, add dsi phy v1.31 support, +fixes (Phillipe) Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Chunming Zhou <david1.zhou@amd.com> Cc: Samuel Li <Samuel.Li@amd.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Noralf Trønnes <noralf@tronnes.org> Cc: Brian Norris <briannorris@chromium.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Christian König <christian.koenig@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Philippe Cornu <philippe.cornu@st.com> Cc: Leo (Sunpeng) Li <sunpeng.li@amd.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> * tag 'drm-misc-next-2018-02-13' of git://anongit.freedesktop.org/drm/drm-misc: (115 commits) drm/radeon: only enable swiotlb path when need v2 drm/amdgpu: only enable swiotlb alloc when need v2 drm: add func to get max iomem address v2 drm/vc4: Expose performance counters to userspace drm: Print the pid when debug logging an ioctl error. drm/stm: ltdc: remove non-alpha color formats on layer 2 for older hw drm/stm: ltdc: add non-alpha color formats drm/bridge/synopsys: dsi: Add 1.31 version support drm/bridge/synopsys: dsi: Add read feature drm/pl111: Support multiple endpoints on the CLCD drm/pl111: Support variants with broken VBLANK drm/pl111: Support variants with broken clock divider drm/pl111: Handle the Versatile RGB/BGR565 mode drm/pl111: Properly detect the ARM PL110 variants drm/panel: Add support for ARM Versatile panels drm/panel: Device tree bindings for ARM Versatile panels drm/bridge: Rename argument from crtc to bridge drm/crc: Add support for polling on the data fd. drm/sun4i: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/rcar-du: Use drm_mode_get_hv_timing() to populate plane clip rectangle ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c2
6 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index d5a2eefd6c3e..31126df06c8c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1504,6 +1504,7 @@ struct amdgpu_device {
1504 const struct amdgpu_asic_funcs *asic_funcs; 1504 const struct amdgpu_asic_funcs *asic_funcs;
1505 bool shutdown; 1505 bool shutdown;
1506 bool need_dma32; 1506 bool need_dma32;
1507 bool need_swiotlb;
1507 bool accel_working; 1508 bool accel_working;
1508 struct work_struct reset_work; 1509 struct work_struct reset_work;
1509 struct notifier_block acpi_nb; 1510 struct notifier_block acpi_nb;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index e4bb435e614b..d897c4c61a01 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1018,7 +1018,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm,
1018 } 1018 }
1019 1019
1020#ifdef CONFIG_SWIOTLB 1020#ifdef CONFIG_SWIOTLB
1021 if (swiotlb_nr_tbl()) { 1021 if (adev->need_swiotlb && swiotlb_nr_tbl()) {
1022 return ttm_dma_populate(&gtt->ttm, adev->dev, ctx); 1022 return ttm_dma_populate(&gtt->ttm, adev->dev, ctx);
1023 } 1023 }
1024#endif 1024#endif
@@ -1045,7 +1045,7 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_tt *ttm)
1045 adev = amdgpu_ttm_adev(ttm->bdev); 1045 adev = amdgpu_ttm_adev(ttm->bdev);
1046 1046
1047#ifdef CONFIG_SWIOTLB 1047#ifdef CONFIG_SWIOTLB
1048 if (swiotlb_nr_tbl()) { 1048 if (adev->need_swiotlb && swiotlb_nr_tbl()) {
1049 ttm_dma_unpopulate(&gtt->ttm, adev->dev); 1049 ttm_dma_unpopulate(&gtt->ttm, adev->dev);
1050 return; 1050 return;
1051 } 1051 }
@@ -2010,7 +2010,7 @@ static int amdgpu_ttm_debugfs_init(struct amdgpu_device *adev)
2010 count = ARRAY_SIZE(amdgpu_ttm_debugfs_list); 2010 count = ARRAY_SIZE(amdgpu_ttm_debugfs_list);
2011 2011
2012#ifdef CONFIG_SWIOTLB 2012#ifdef CONFIG_SWIOTLB
2013 if (!swiotlb_nr_tbl()) 2013 if (!(adev->need_swiotlb && swiotlb_nr_tbl()))
2014 --count; 2014 --count;
2015#endif 2015#endif
2016 2016
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 8e28270d1ea9..5f5eb15ccf4a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -22,6 +22,7 @@
22 */ 22 */
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <drm/drmP.h> 24#include <drm/drmP.h>
25#include <drm/drm_cache.h>
25#include "amdgpu.h" 26#include "amdgpu.h"
26#include "gmc_v6_0.h" 27#include "gmc_v6_0.h"
27#include "amdgpu_ucode.h" 28#include "amdgpu_ucode.h"
@@ -851,6 +852,7 @@ static int gmc_v6_0_sw_init(void *handle)
851 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32)); 852 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
852 dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n"); 853 dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
853 } 854 }
855 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
854 856
855 r = gmc_v6_0_init_microcode(adev); 857 r = gmc_v6_0_init_microcode(adev);
856 if (r) { 858 if (r) {
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 86e9d682c59e..12e49bd8fd2d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -22,6 +22,7 @@
22 */ 22 */
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <drm/drmP.h> 24#include <drm/drmP.h>
25#include <drm/drm_cache.h>
25#include "amdgpu.h" 26#include "amdgpu.h"
26#include "cikd.h" 27#include "cikd.h"
27#include "cik.h" 28#include "cik.h"
@@ -999,6 +1000,7 @@ static int gmc_v7_0_sw_init(void *handle)
999 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32)); 1000 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
1000 pr_warn("amdgpu: No coherent DMA available\n"); 1001 pr_warn("amdgpu: No coherent DMA available\n");
1001 } 1002 }
1003 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
1002 1004
1003 r = gmc_v7_0_init_microcode(adev); 1005 r = gmc_v7_0_init_microcode(adev);
1004 if (r) { 1006 if (r) {
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 9a813d834f1a..9a170e37fbe7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -22,6 +22,7 @@
22 */ 22 */
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <drm/drmP.h> 24#include <drm/drmP.h>
25#include <drm/drm_cache.h>
25#include "amdgpu.h" 26#include "amdgpu.h"
26#include "gmc_v8_0.h" 27#include "gmc_v8_0.h"
27#include "amdgpu_ucode.h" 28#include "amdgpu_ucode.h"
@@ -1085,6 +1086,7 @@ static int gmc_v8_0_sw_init(void *handle)
1085 */ 1086 */
1086 adev->need_dma32 = false; 1087 adev->need_dma32 = false;
1087 dma_bits = adev->need_dma32 ? 32 : 40; 1088 dma_bits = adev->need_dma32 ? 32 : 40;
1089 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
1088 r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits)); 1090 r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
1089 if (r) { 1091 if (r) {
1090 adev->need_dma32 = true; 1092 adev->need_dma32 = true;
@@ -1096,6 +1098,7 @@ static int gmc_v8_0_sw_init(void *handle)
1096 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32)); 1098 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
1097 pr_warn("amdgpu: No coherent DMA available\n"); 1099 pr_warn("amdgpu: No coherent DMA available\n");
1098 } 1100 }
1101 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
1099 1102
1100 r = gmc_v8_0_init_microcode(adev); 1103 r = gmc_v8_0_init_microcode(adev);
1101 if (r) { 1104 if (r) {
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 2719937e09d6..100ec69f020a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -21,6 +21,7 @@
21 * 21 *
22 */ 22 */
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <drm/drm_cache.h>
24#include "amdgpu.h" 25#include "amdgpu.h"
25#include "gmc_v9_0.h" 26#include "gmc_v9_0.h"
26#include "amdgpu_atomfirmware.h" 27#include "amdgpu_atomfirmware.h"
@@ -852,6 +853,7 @@ static int gmc_v9_0_sw_init(void *handle)
852 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32)); 853 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
853 printk(KERN_WARNING "amdgpu: No coherent DMA available.\n"); 854 printk(KERN_WARNING "amdgpu: No coherent DMA available.\n");
854 } 855 }
856 adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
855 857
856 r = gmc_v9_0_mc_init(adev); 858 r = gmc_v9_0_mc_init(adev);
857 if (r) 859 if (r)