Commit 8f4ce072 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "A smattering of fixes,

  mgag200:
      don't accept modes that aren't aligned properly as hw can't do it

  i915:
      two regression fixes

  radeon:
      one query to allow userspace fixes
      one oops fixer for older hw with new options enabled"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: don't probe MST on hw we don't support it on
  drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query
  drm/mgag200: Reject non-character-cell-aligned mode widths
  Revert "drm/i915: Don't skip request retirement if the active list is empty"
  drm/i915: Always reset vma->ggtt_view.pages cache on unbinding
parents bb16140a fcee3c73
...@@ -2656,6 +2656,9 @@ void i915_gem_reset(struct drm_device *dev) ...@@ -2656,6 +2656,9 @@ void i915_gem_reset(struct drm_device *dev)
void void
i915_gem_retire_requests_ring(struct intel_engine_cs *ring) i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
{ {
if (list_empty(&ring->request_list))
return;
WARN_ON(i915_verify_lists(ring->dev)); WARN_ON(i915_verify_lists(ring->dev));
/* Retire requests first as we use it above for the early return. /* Retire requests first as we use it above for the early return.
...@@ -3000,8 +3003,8 @@ int i915_vma_unbind(struct i915_vma *vma) ...@@ -3000,8 +3003,8 @@ int i915_vma_unbind(struct i915_vma *vma)
} else if (vma->ggtt_view.pages) { } else if (vma->ggtt_view.pages) {
sg_free_table(vma->ggtt_view.pages); sg_free_table(vma->ggtt_view.pages);
kfree(vma->ggtt_view.pages); kfree(vma->ggtt_view.pages);
vma->ggtt_view.pages = NULL;
} }
vma->ggtt_view.pages = NULL;
} }
drm_mm_remove_node(&vma->node); drm_mm_remove_node(&vma->node);
......
...@@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector, ...@@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
return MODE_BANDWIDTH; return MODE_BANDWIDTH;
} }
if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 ||
(mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) {
return MODE_H_ILLEGAL;
}
if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 || if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 || mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 || mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 ||
......
...@@ -663,12 +663,17 @@ int ...@@ -663,12 +663,17 @@ int
radeon_dp_mst_probe(struct radeon_connector *radeon_connector) radeon_dp_mst_probe(struct radeon_connector *radeon_connector)
{ {
struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv; struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;
struct drm_device *dev = radeon_connector->base.dev;
struct radeon_device *rdev = dev->dev_private;
int ret; int ret;
u8 msg[1]; u8 msg[1];
if (!radeon_mst) if (!radeon_mst)
return 0; return 0;
if (!ASIC_IS_DCE5(rdev))
return 0;
if (dig_connector->dpcd[DP_DPCD_REV] < 0x12) if (dig_connector->dpcd[DP_DPCD_REV] < 0x12)
return 0; return 0;
......
...@@ -576,6 +576,9 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file ...@@ -576,6 +576,9 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
if (radeon_get_allowed_info_register(rdev, *value, value)) if (radeon_get_allowed_info_register(rdev, *value, value))
return -EINVAL; return -EINVAL;
break; break;
case RADEON_INFO_VA_UNMAP_WORKING:
*value = true;
break;
default: default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request); DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL; return -EINVAL;
......
...@@ -1038,6 +1038,7 @@ struct drm_radeon_cs { ...@@ -1038,6 +1038,7 @@ struct drm_radeon_cs {
#define RADEON_INFO_CURRENT_GPU_SCLK 0x22 #define RADEON_INFO_CURRENT_GPU_SCLK 0x22
#define RADEON_INFO_CURRENT_GPU_MCLK 0x23 #define RADEON_INFO_CURRENT_GPU_MCLK 0x23
#define RADEON_INFO_READ_REG 0x24 #define RADEON_INFO_READ_REG 0x24
#define RADEON_INFO_VA_UNMAP_WORKING 0x25
struct drm_radeon_info { struct drm_radeon_info {
uint32_t request; uint32_t request;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment