aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h10
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;
1217extern int i915_enable_fbc __read_mostly; 1217extern int i915_enable_fbc __read_mostly;
1218extern bool i915_enable_hangcheck __read_mostly; 1218extern bool i915_enable_hangcheck __read_mostly;
1219extern int i915_enable_ppgtt __read_mostly; 1219extern int i915_enable_ppgtt __read_mostly;
1220extern unsigned int i915_preliminary_hw_support __read_mostly;
1220 1221
1221extern int i915_suspend(struct drm_device *dev, pm_message_t state); 1222extern int i915_suspend(struct drm_device *dev, pm_message_t state);
1222extern int i915_resume(struct drm_device *dev); 1223extern 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);
1341static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n) 1342static 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);
1427int __must_check i915_gem_idle(struct drm_device *dev); 1433int __must_check i915_gem_idle(struct drm_device *dev);
1428int i915_add_request(struct intel_ring_buffer *ring, 1434int 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);
1431int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, 1437int __must_check i915_wait_seqno(struct intel_ring_buffer *ring,
1432 uint32_t seqno); 1438 uint32_t seqno);
1433int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); 1439int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);