diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4f2831aa5fed..f511fa2f4168 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1217,6 +1217,7 @@ extern int i915_enable_rc6 __read_mostly; | |||
1217 | extern int i915_enable_fbc __read_mostly; | 1217 | extern int i915_enable_fbc __read_mostly; |
1218 | extern bool i915_enable_hangcheck __read_mostly; | 1218 | extern bool i915_enable_hangcheck __read_mostly; |
1219 | extern int i915_enable_ppgtt __read_mostly; | 1219 | extern int i915_enable_ppgtt __read_mostly; |
1220 | extern unsigned int i915_preliminary_hw_support __read_mostly; | ||
1220 | 1221 | ||
1221 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); | 1222 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); |
1222 | extern int i915_resume(struct drm_device *dev); | 1223 | extern int i915_resume(struct drm_device *dev); |
@@ -1341,9 +1342,14 @@ int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj); | |||
1341 | static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n) | 1342 | static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n) |
1342 | { | 1343 | { |
1343 | struct scatterlist *sg = obj->pages->sgl; | 1344 | struct scatterlist *sg = obj->pages->sgl; |
1344 | while (n >= SG_MAX_SINGLE_ALLOC) { | 1345 | int nents = obj->pages->nents; |
1346 | while (nents > SG_MAX_SINGLE_ALLOC) { | ||
1347 | if (n < SG_MAX_SINGLE_ALLOC - 1) | ||
1348 | break; | ||
1349 | |||
1345 | sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1); | 1350 | sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1); |
1346 | n -= SG_MAX_SINGLE_ALLOC - 1; | 1351 | n -= SG_MAX_SINGLE_ALLOC - 1; |
1352 | nents -= SG_MAX_SINGLE_ALLOC - 1; | ||
1347 | } | 1353 | } |
1348 | return sg_page(sg+n); | 1354 | return sg_page(sg+n); |
1349 | } | 1355 | } |
@@ -1427,7 +1433,7 @@ int __must_check i915_gpu_idle(struct drm_device *dev); | |||
1427 | int __must_check i915_gem_idle(struct drm_device *dev); | 1433 | int __must_check i915_gem_idle(struct drm_device *dev); |
1428 | int i915_add_request(struct intel_ring_buffer *ring, | 1434 | int i915_add_request(struct intel_ring_buffer *ring, |
1429 | struct drm_file *file, | 1435 | struct drm_file *file, |
1430 | struct drm_i915_gem_request *request); | 1436 | u32 *seqno); |
1431 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, | 1437 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, |
1432 | uint32_t seqno); | 1438 | uint32_t seqno); |
1433 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); | 1439 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); |