]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 08:46:04 +0000 (04:46 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 08:46:04 +0000 (04:46 -0400)
added patches:
drm-amdgpu-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
drm-amdgpu-dce10-disable-hpd-on-local-panels.patch
drm-amdgpu-dce11-add-missing-drm_mode_config_cleanup-call.patch
drm-amdgpu-dce11-disable-hpd-on-local-panels.patch
drm-amdgpu-dce8-disable-hpd-on-local-panels.patch
drm-amdgpu-fix-ib-alignment-for-uvd.patch
drm-radeon-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
drm-radeon-narrow-asic_init-for-virtualization.patch
drm-radeon-si-dpm-fix-phase-shedding-setup.patch
drm-vmwgfx-limit-the-user-space-command-buffer-size.patch

queue-4.4/drm-amdgpu-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-dce10-disable-hpd-on-local-panels.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-dce11-add-missing-drm_mode_config_cleanup-call.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-dce11-disable-hpd-on-local-panels.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-dce8-disable-hpd-on-local-panels.patch [new file with mode: 0644]
queue-4.4/drm-amdgpu-fix-ib-alignment-for-uvd.patch [new file with mode: 0644]
queue-4.4/drm-radeon-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch [new file with mode: 0644]
queue-4.4/drm-radeon-narrow-asic_init-for-virtualization.patch [new file with mode: 0644]
queue-4.4/drm-radeon-si-dpm-fix-phase-shedding-setup.patch [new file with mode: 0644]
queue-4.4/drm-vmwgfx-limit-the-user-space-command-buffer-size.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/drm-amdgpu-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch b/queue-4.4/drm-amdgpu-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
new file mode 100644 (file)
index 0000000..a99ae3e
--- /dev/null
@@ -0,0 +1,53 @@
+From dc8184aa8621ee8048652496884d9f40d4bb407f Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Mon, 10 Oct 2016 15:57:21 +0800
+Subject: drm/amdgpu: change vblank_time's calculation method to reduce computational error.
+
+From: Rex Zhu <Rex.Zhu@amd.com>
+
+commit dc8184aa8621ee8048652496884d9f40d4bb407f upstream.
+
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
+@@ -113,24 +113,26 @@ void amdgpu_dpm_print_ps_status(struct a
+       printk("\n");
+ }
++
+ u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev)
+ {
+       struct drm_device *dev = adev->ddev;
+       struct drm_crtc *crtc;
+       struct amdgpu_crtc *amdgpu_crtc;
+-      u32 line_time_us, vblank_lines;
++      u32 vblank_in_pixels;
+       u32 vblank_time_us = 0xffffffff; /* if the displays are off, vblank time is max */
+       if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
+               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+                       amdgpu_crtc = to_amdgpu_crtc(crtc);
+                       if (crtc->enabled && amdgpu_crtc->enabled && amdgpu_crtc->hw_mode.clock) {
+-                              line_time_us = (amdgpu_crtc->hw_mode.crtc_htotal * 1000) /
+-                                      amdgpu_crtc->hw_mode.clock;
+-                              vblank_lines = amdgpu_crtc->hw_mode.crtc_vblank_end -
++                              vblank_in_pixels =
++                                      amdgpu_crtc->hw_mode.crtc_htotal *
++                                      (amdgpu_crtc->hw_mode.crtc_vblank_end -
+                                       amdgpu_crtc->hw_mode.crtc_vdisplay +
+-                                      (amdgpu_crtc->v_border * 2);
+-                              vblank_time_us = vblank_lines * line_time_us;
++                                      (amdgpu_crtc->v_border * 2));
++
++                              vblank_time_us = vblank_in_pixels * 1000 / amdgpu_crtc->hw_mode.clock;
+                               break;
+                       }
+               }
diff --git a/queue-4.4/drm-amdgpu-dce10-disable-hpd-on-local-panels.patch b/queue-4.4/drm-amdgpu-dce10-disable-hpd-on-local-panels.patch
new file mode 100644 (file)
index 0000000..0db73a1
--- /dev/null
@@ -0,0 +1,62 @@
+From e96ec90f496603c48e0945f8bdeb4cdf3088cbba Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 28 Sep 2016 12:41:50 -0400
+Subject: drm/amdgpu/dce10: disable hpd on local panels
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit e96ec90f496603c48e0945f8bdeb4cdf3088cbba upstream.
+
+Otherwise we can get a hotplug interrupt storm when
+we turn the panel off if hpd interrupts were enabled
+by the bios.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=97471
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c |   23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+@@ -419,16 +419,6 @@ static void dce_v10_0_hpd_init(struct am
+       list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+               struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
+-              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+-                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
+-                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
+-                       * aux dp channel on imac and help (but not completely fix)
+-                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
+-                       * also avoid interrupt storms during dpms.
+-                       */
+-                      continue;
+-              }
+-
+               switch (amdgpu_connector->hpd.hpd) {
+               case AMDGPU_HPD_1:
+                       idx = 0;
+@@ -452,6 +442,19 @@ static void dce_v10_0_hpd_init(struct am
+                       continue;
+               }
++              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
++                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
++                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
++                       * aux dp channel on imac and help (but not completely fix)
++                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
++                       * also avoid interrupt storms during dpms.
++                       */
++                      tmp = RREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx]);
++                      tmp = REG_SET_FIELD(tmp, DC_HPD_INT_CONTROL, DC_HPD_INT_EN, 0);
++                      WREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx], tmp);
++                      continue;
++              }
++
+               tmp = RREG32(mmDC_HPD_CONTROL + hpd_offsets[idx]);
+               tmp = REG_SET_FIELD(tmp, DC_HPD_CONTROL, DC_HPD_EN, 1);
+               WREG32(mmDC_HPD_CONTROL + hpd_offsets[idx], tmp);
diff --git a/queue-4.4/drm-amdgpu-dce11-add-missing-drm_mode_config_cleanup-call.patch b/queue-4.4/drm-amdgpu-dce11-add-missing-drm_mode_config_cleanup-call.patch
new file mode 100644 (file)
index 0000000..d650ead
--- /dev/null
@@ -0,0 +1,31 @@
+From 140c94da3c3338c0ff4cc127cf9bec87905ca83c Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Mon, 3 Oct 2016 00:06:45 +0300
+Subject: drm/amdgpu/dce11: add missing drm_mode_config_cleanup call
+
+From: Grazvydas Ignotas <notasas@gmail.com>
+
+commit 140c94da3c3338c0ff4cc127cf9bec87905ca83c upstream.
+
+All other amdgpu/dce_v* files have this call, it's only mysteriously
+missing from dce_v11_0.c since the file was added and causes leaks.
+
+Fixes: aaa36a976bbb ("drm/amdgpu: Add initial VI support")
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+@@ -3033,6 +3033,7 @@ static int dce_v11_0_sw_fini(void *handl
+       dce_v11_0_afmt_fini(adev);
++      drm_mode_config_cleanup(adev->ddev);
+       adev->mode_info.mode_config_initialized = false;
+       return 0;
diff --git a/queue-4.4/drm-amdgpu-dce11-disable-hpd-on-local-panels.patch b/queue-4.4/drm-amdgpu-dce11-disable-hpd-on-local-panels.patch
new file mode 100644 (file)
index 0000000..ad29a08
--- /dev/null
@@ -0,0 +1,62 @@
+From 3a9d993ee9809c217f4322623a9b78c8d17fdd1f Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 28 Sep 2016 12:43:33 -0400
+Subject: drm/amdgpu/dce11: disable hpd on local panels
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 3a9d993ee9809c217f4322623a9b78c8d17fdd1f upstream.
+
+Otherwise we can get a hotplug interrupt storm when
+we turn the panel off if hpd interrupts were enabled
+by the bios.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=97471
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c |   23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+@@ -409,16 +409,6 @@ static void dce_v11_0_hpd_init(struct am
+       list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+               struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
+-              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+-                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
+-                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
+-                       * aux dp channel on imac and help (but not completely fix)
+-                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
+-                       * also avoid interrupt storms during dpms.
+-                       */
+-                      continue;
+-              }
+-
+               switch (amdgpu_connector->hpd.hpd) {
+               case AMDGPU_HPD_1:
+                       idx = 0;
+@@ -442,6 +432,19 @@ static void dce_v11_0_hpd_init(struct am
+                       continue;
+               }
++              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
++                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
++                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
++                       * aux dp channel on imac and help (but not completely fix)
++                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
++                       * also avoid interrupt storms during dpms.
++                       */
++                      tmp = RREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx]);
++                      tmp = REG_SET_FIELD(tmp, DC_HPD_INT_CONTROL, DC_HPD_INT_EN, 0);
++                      WREG32(mmDC_HPD_INT_CONTROL + hpd_offsets[idx], tmp);
++                      continue;
++              }
++
+               tmp = RREG32(mmDC_HPD_CONTROL + hpd_offsets[idx]);
+               tmp = REG_SET_FIELD(tmp, DC_HPD_CONTROL, DC_HPD_EN, 1);
+               WREG32(mmDC_HPD_CONTROL + hpd_offsets[idx], tmp);
diff --git a/queue-4.4/drm-amdgpu-dce8-disable-hpd-on-local-panels.patch b/queue-4.4/drm-amdgpu-dce8-disable-hpd-on-local-panels.patch
new file mode 100644 (file)
index 0000000..317eeb1
--- /dev/null
@@ -0,0 +1,87 @@
+From 324082586cc5918e3230f0b2f326656c653201eb Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 28 Sep 2016 12:44:20 -0400
+Subject: drm/amdgpu/dce8: disable hpd on local panels
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 324082586cc5918e3230f0b2f326656c653201eb upstream.
+
+Otherwise we can get a hotplug interrupt storm when
+we turn the panel off if hpd interrupts were enabled
+by the bios.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=97471
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c |   48 +++++++++++++++++++++++++++-------
+ 1 file changed, 39 insertions(+), 9 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+@@ -392,15 +392,6 @@ static void dce_v8_0_hpd_init(struct amd
+       list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+               struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
+-              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+-                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
+-                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
+-                       * aux dp channel on imac and help (but not completely fix)
+-                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
+-                       * also avoid interrupt storms during dpms.
+-                       */
+-                      continue;
+-              }
+               switch (amdgpu_connector->hpd.hpd) {
+               case AMDGPU_HPD_1:
+                       WREG32(mmDC_HPD1_CONTROL, tmp);
+@@ -423,6 +414,45 @@ static void dce_v8_0_hpd_init(struct amd
+               default:
+                       break;
+               }
++
++              if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
++                  connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
++                      /* don't try to enable hpd on eDP or LVDS avoid breaking the
++                       * aux dp channel on imac and help (but not completely fix)
++                       * https://bugzilla.redhat.com/show_bug.cgi?id=726143
++                       * also avoid interrupt storms during dpms.
++                       */
++                      u32 dc_hpd_int_cntl_reg, dc_hpd_int_cntl;
++
++                      switch (amdgpu_connector->hpd.hpd) {
++                      case AMDGPU_HPD_1:
++                              dc_hpd_int_cntl_reg = mmDC_HPD1_INT_CONTROL;
++                              break;
++                      case AMDGPU_HPD_2:
++                              dc_hpd_int_cntl_reg = mmDC_HPD2_INT_CONTROL;
++                              break;
++                      case AMDGPU_HPD_3:
++                              dc_hpd_int_cntl_reg = mmDC_HPD3_INT_CONTROL;
++                              break;
++                      case AMDGPU_HPD_4:
++                              dc_hpd_int_cntl_reg = mmDC_HPD4_INT_CONTROL;
++                              break;
++                      case AMDGPU_HPD_5:
++                              dc_hpd_int_cntl_reg = mmDC_HPD5_INT_CONTROL;
++                              break;
++                      case AMDGPU_HPD_6:
++                              dc_hpd_int_cntl_reg = mmDC_HPD6_INT_CONTROL;
++                              break;
++                      default:
++                              continue;
++                      }
++
++                      dc_hpd_int_cntl = RREG32(dc_hpd_int_cntl_reg);
++                      dc_hpd_int_cntl &= ~DC_HPD1_INT_CONTROL__DC_HPD1_INT_EN_MASK;
++                      WREG32(dc_hpd_int_cntl_reg, dc_hpd_int_cntl);
++                      continue;
++              }
++
+               dce_v8_0_hpd_set_polarity(adev, amdgpu_connector->hpd.hpd);
+               amdgpu_irq_get(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
+       }
diff --git a/queue-4.4/drm-amdgpu-fix-ib-alignment-for-uvd.patch b/queue-4.4/drm-amdgpu-fix-ib-alignment-for-uvd.patch
new file mode 100644 (file)
index 0000000..8428afd
--- /dev/null
@@ -0,0 +1,30 @@
+From c4795ca642b8bd76b5b6ffba41ba909543273d43 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 22 Aug 2016 16:31:36 -0400
+Subject: drm/amdgpu: fix IB alignment for UVD
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit c4795ca642b8bd76b5b6ffba41ba909543273d43 upstream.
+
+According to the hw team, it should be 16, not 8.
+
+Cc: Peter Fang <peter.fang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+@@ -227,7 +227,7 @@ static int amdgpu_info_ioctl(struct drm_
+                       type = AMD_IP_BLOCK_TYPE_UVD;
+                       ring_mask = adev->uvd.ring.ready ? 1 : 0;
+                       ib_start_alignment = AMDGPU_GPU_PAGE_SIZE;
+-                      ib_size_alignment = 8;
++                      ib_size_alignment = 16;
+                       break;
+               case AMDGPU_HW_IP_VCE:
+                       type = AMD_IP_BLOCK_TYPE_VCE;
diff --git a/queue-4.4/drm-radeon-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch b/queue-4.4/drm-radeon-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
new file mode 100644 (file)
index 0000000..aae9695
--- /dev/null
@@ -0,0 +1,48 @@
+From 02cfb5fccb0f9f968f0e208d89d9769aa16267bc Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 12 Oct 2016 15:28:55 -0400
+Subject: drm/radeon: change vblank_time's calculation method to reduce computational error.
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 02cfb5fccb0f9f968f0e208d89d9769aa16267bc upstream.
+
+Ported from Rex's amdgpu change.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/r600_dpm.c |   15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/r600_dpm.c
++++ b/drivers/gpu/drm/radeon/r600_dpm.c
+@@ -156,19 +156,20 @@ u32 r600_dpm_get_vblank_time(struct rade
+       struct drm_device *dev = rdev->ddev;
+       struct drm_crtc *crtc;
+       struct radeon_crtc *radeon_crtc;
+-      u32 line_time_us, vblank_lines;
++      u32 vblank_in_pixels;
+       u32 vblank_time_us = 0xffffffff; /* if the displays are off, vblank time is max */
+       if (rdev->num_crtc && rdev->mode_info.mode_config_initialized) {
+               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+                       radeon_crtc = to_radeon_crtc(crtc);
+                       if (crtc->enabled && radeon_crtc->enabled && radeon_crtc->hw_mode.clock) {
+-                              line_time_us = (radeon_crtc->hw_mode.crtc_htotal * 1000) /
+-                                      radeon_crtc->hw_mode.clock;
+-                              vblank_lines = radeon_crtc->hw_mode.crtc_vblank_end -
+-                                      radeon_crtc->hw_mode.crtc_vdisplay +
+-                                      (radeon_crtc->v_border * 2);
+-                              vblank_time_us = vblank_lines * line_time_us;
++                              vblank_in_pixels =
++                                      radeon_crtc->hw_mode.crtc_htotal *
++                                      (radeon_crtc->hw_mode.crtc_vblank_end -
++                                       radeon_crtc->hw_mode.crtc_vdisplay +
++                                       (radeon_crtc->v_border * 2));
++
++                              vblank_time_us = vblank_in_pixels * 1000 / radeon_crtc->hw_mode.clock;
+                               break;
+                       }
+               }
diff --git a/queue-4.4/drm-radeon-narrow-asic_init-for-virtualization.patch b/queue-4.4/drm-radeon-narrow-asic_init-for-virtualization.patch
new file mode 100644 (file)
index 0000000..a5bdadf
--- /dev/null
@@ -0,0 +1,33 @@
+From 884031f0aacf57dad1575f96714efc80de9b19cc Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 19 Sep 2016 12:35:22 -0400
+Subject: drm/radeon: narrow asic_init for virtualization
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 884031f0aacf57dad1575f96714efc80de9b19cc upstream.
+
+Only needed on CIK+ due to the way pci reset is handled
+by the GPU.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_device.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_device.c
++++ b/drivers/gpu/drm/radeon/radeon_device.c
+@@ -660,8 +660,9 @@ bool radeon_card_posted(struct radeon_de
+ {
+       uint32_t reg;
+-      /* for pass through, always force asic_init */
+-      if (radeon_device_is_virtual())
++      /* for pass through, always force asic_init for CI */
++      if (rdev->family >= CHIP_BONAIRE &&
++          radeon_device_is_virtual())
+               return false;
+       /* required for EFI mode on macbook2,1 which uses an r5xx asic */
diff --git a/queue-4.4/drm-radeon-si-dpm-fix-phase-shedding-setup.patch b/queue-4.4/drm-radeon-si-dpm-fix-phase-shedding-setup.patch
new file mode 100644 (file)
index 0000000..26bc118
--- /dev/null
@@ -0,0 +1,40 @@
+From 427920292b00474d978d632bc03a8e4e50029af3 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 27 Sep 2016 14:51:53 -0400
+Subject: drm/radeon/si/dpm: fix phase shedding setup
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 427920292b00474d978d632bc03a8e4e50029af3 upstream.
+
+Used the wrong index to setup the phase shedding mask.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/si_dpm.c       |    2 +-
+ drivers/gpu/drm/radeon/sislands_smc.h |    1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/si_dpm.c
++++ b/drivers/gpu/drm/radeon/si_dpm.c
+@@ -4112,7 +4112,7 @@ static int si_populate_smc_voltage_table
+                                                             &rdev->pm.dpm.dyn_state.phase_shedding_limits_table)) {
+                               si_populate_smc_voltage_table(rdev, &si_pi->vddc_phase_shed_table, table);
+-                              table->phaseMaskTable.lowMask[SISLANDS_SMC_VOLTAGEMASK_VDDC] =
++                              table->phaseMaskTable.lowMask[SISLANDS_SMC_VOLTAGEMASK_VDDC_PHASE_SHEDDING] =
+                                       cpu_to_be32(si_pi->vddc_phase_shed_table.mask_low);
+                               si_write_smc_soft_register(rdev, SI_SMC_SOFT_REGISTER_phase_shedding_delay,
+--- a/drivers/gpu/drm/radeon/sislands_smc.h
++++ b/drivers/gpu/drm/radeon/sislands_smc.h
+@@ -194,6 +194,7 @@ typedef struct SISLANDS_SMC_SWSTATE SISL
+ #define SISLANDS_SMC_VOLTAGEMASK_VDDC  0
+ #define SISLANDS_SMC_VOLTAGEMASK_MVDD  1
+ #define SISLANDS_SMC_VOLTAGEMASK_VDDCI 2
++#define SISLANDS_SMC_VOLTAGEMASK_VDDC_PHASE_SHEDDING 3
+ #define SISLANDS_SMC_VOLTAGEMASK_MAX   4
+ struct SISLANDS_SMC_VOLTAGEMASKTABLE
diff --git a/queue-4.4/drm-vmwgfx-limit-the-user-space-command-buffer-size.patch b/queue-4.4/drm-vmwgfx-limit-the-user-space-command-buffer-size.patch
new file mode 100644 (file)
index 0000000..a190569
--- /dev/null
@@ -0,0 +1,42 @@
+From 51ab70bed997f64f091a639dbe22b629725a7faf Mon Sep 17 00:00:00 2001
+From: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Mon, 10 Oct 2016 10:51:24 -0700
+Subject: drm/vmwgfx: Limit the user-space command buffer size
+
+From: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 51ab70bed997f64f091a639dbe22b629725a7faf upstream.
+
+With older hardware versions, the user could specify arbitrarily large
+command buffer sizes, causing a vmalloc / vmap space exhaustion.
+
+Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Sinclair Yeh <syeh@vmware.com>
+Signed-off-by: Sinclair Yeh <syeh@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+@@ -3830,14 +3830,14 @@ static void *vmw_execbuf_cmdbuf(struct v
+       int ret;
+       *header = NULL;
+-      if (!dev_priv->cman || kernel_commands)
+-              return kernel_commands;
+-
+       if (command_size > SVGA_CB_MAX_SIZE) {
+               DRM_ERROR("Command buffer is too large.\n");
+               return ERR_PTR(-EINVAL);
+       }
++      if (!dev_priv->cman || kernel_commands)
++              return kernel_commands;
++
+       /* If possible, add a little space for fencing. */
+       cmdbuf_size = command_size + 512;
+       cmdbuf_size = min_t(size_t, cmdbuf_size, SVGA_CB_MAX_SIZE);
index ffbe5938ee2e9fab534c8aeee23d20b178b258ee..9e542a8ef9f1120ade2c4a75bc84e6f9aa7e3f8f 100644 (file)
@@ -1 +1,11 @@
 drm-prime-pass-the-right-module-owner-through-to-dma_buf_export.patch
+drm-amdgpu-fix-ib-alignment-for-uvd.patch
+drm-amdgpu-dce10-disable-hpd-on-local-panels.patch
+drm-amdgpu-dce8-disable-hpd-on-local-panels.patch
+drm-amdgpu-dce11-disable-hpd-on-local-panels.patch
+drm-amdgpu-dce11-add-missing-drm_mode_config_cleanup-call.patch
+drm-amdgpu-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
+drm-radeon-narrow-asic_init-for-virtualization.patch
+drm-radeon-si-dpm-fix-phase-shedding-setup.patch
+drm-radeon-change-vblank_time-s-calculation-method-to-reduce-computational-error.patch
+drm-vmwgfx-limit-the-user-space-command-buffer-size.patch