diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 19dbdd7dd564..d33d02d13c96 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1955,11 +1955,12 @@ i915_gem_next_request_seqno(struct intel_ring_buffer *ring) | |||
1955 | int | 1955 | int |
1956 | i915_add_request(struct intel_ring_buffer *ring, | 1956 | i915_add_request(struct intel_ring_buffer *ring, |
1957 | struct drm_file *file, | 1957 | struct drm_file *file, |
1958 | struct drm_i915_gem_request *request) | 1958 | u32 *out_seqno) |
1959 | { | 1959 | { |
1960 | drm_i915_private_t *dev_priv = ring->dev->dev_private; | 1960 | drm_i915_private_t *dev_priv = ring->dev->dev_private; |
1961 | uint32_t seqno; | 1961 | struct drm_i915_gem_request *request; |
1962 | u32 request_ring_position; | 1962 | u32 request_ring_position; |
1963 | u32 seqno; | ||
1963 | int was_empty; | 1964 | int was_empty; |
1964 | int ret; | 1965 | int ret; |
1965 | 1966 | ||
@@ -1974,11 +1975,9 @@ i915_add_request(struct intel_ring_buffer *ring, | |||
1974 | if (ret) | 1975 | if (ret) |
1975 | return ret; | 1976 | return ret; |
1976 | 1977 | ||
1977 | if (request == NULL) { | 1978 | request = kmalloc(sizeof(*request), GFP_KERNEL); |
1978 | request = kmalloc(sizeof(*request), GFP_KERNEL); | 1979 | if (request == NULL) |
1979 | if (request == NULL) | 1980 | return -ENOMEM; |
1980 | return -ENOMEM; | ||
1981 | } | ||
1982 | 1981 | ||
1983 | seqno = i915_gem_next_request_seqno(ring); | 1982 | seqno = i915_gem_next_request_seqno(ring); |
1984 | 1983 | ||
@@ -2030,6 +2029,8 @@ i915_add_request(struct intel_ring_buffer *ring, | |||
2030 | } | 2029 | } |
2031 | } | 2030 | } |
2032 | 2031 | ||
2032 | if (out_seqno) | ||
2033 | *out_seqno = seqno; | ||
2033 | return 0; | 2034 | return 0; |
2034 | } | 2035 | } |
2035 | 2036 | ||
@@ -3959,6 +3960,9 @@ i915_gem_init_hw(struct drm_device *dev) | |||
3959 | if (!intel_enable_gtt()) | 3960 | if (!intel_enable_gtt()) |
3960 | return -EIO; | 3961 | return -EIO; |
3961 | 3962 | ||
3963 | if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) | ||
3964 | I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); | ||
3965 | |||
3962 | i915_gem_l3_remap(dev); | 3966 | i915_gem_l3_remap(dev); |
3963 | 3967 | ||
3964 | i915_gem_init_swizzling(dev); | 3968 | i915_gem_init_swizzling(dev); |
@@ -4098,7 +4102,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, | |||
4098 | } | 4102 | } |
4099 | 4103 | ||
4100 | BUG_ON(!list_empty(&dev_priv->mm.active_list)); | 4104 | BUG_ON(!list_empty(&dev_priv->mm.active_list)); |
4101 | BUG_ON(!list_empty(&dev_priv->mm.inactive_list)); | ||
4102 | mutex_unlock(&dev->struct_mutex); | 4105 | mutex_unlock(&dev->struct_mutex); |
4103 | 4106 | ||
4104 | ret = drm_irq_install(dev); | 4107 | ret = drm_irq_install(dev); |