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.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e13518252007..d6cc9861e0a1 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -184,6 +184,8 @@ typedef struct drm_i915_private {
184 unsigned int lvds_dither:1; 184 unsigned int lvds_dither:1;
185 unsigned int lvds_vbt:1; 185 unsigned int lvds_vbt:1;
186 unsigned int int_crt_support:1; 186 unsigned int int_crt_support:1;
187 unsigned int lvds_use_ssc:1;
188 int lvds_ssc_freq;
187 189
188 struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */ 190 struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */
189 int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ 191 int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
@@ -277,13 +279,13 @@ typedef struct drm_i915_private {
277 u8 saveAR_INDEX; 279 u8 saveAR_INDEX;
278 u8 saveAR[21]; 280 u8 saveAR[21];
279 u8 saveDACMASK; 281 u8 saveDACMASK;
280 u8 saveDACDATA[256*3]; /* 256 3-byte colors */
281 u8 saveCR[37]; 282 u8 saveCR[37];
282 283
283 struct { 284 struct {
284 struct drm_mm gtt_space; 285 struct drm_mm gtt_space;
285 286
286 struct io_mapping *gtt_mapping; 287 struct io_mapping *gtt_mapping;
288 int gtt_mtrr;
287 289
288 /** 290 /**
289 * List of objects currently involved in rendering from the 291 * List of objects currently involved in rendering from the
@@ -454,6 +456,12 @@ struct drm_i915_gem_object {
454 456
455 /** for phy allocated objects */ 457 /** for phy allocated objects */
456 struct drm_i915_gem_phys_object *phys_obj; 458 struct drm_i915_gem_phys_object *phys_obj;
459
460 /**
461 * Used for checking the object doesn't appear more than once
462 * in an execbuffer object list.
463 */
464 int in_execbuffer;
457}; 465};
458 466
459/** 467/**
@@ -534,6 +542,7 @@ extern int i915_vblank_pipe_get(struct drm_device *dev, void *data,
534extern int i915_enable_vblank(struct drm_device *dev, int crtc); 542extern int i915_enable_vblank(struct drm_device *dev, int crtc);
535extern void i915_disable_vblank(struct drm_device *dev, int crtc); 543extern void i915_disable_vblank(struct drm_device *dev, int crtc);
536extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc); 544extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc);
545extern u32 gm45_get_vblank_counter(struct drm_device *dev, int crtc);
537extern int i915_vblank_swap(struct drm_device *dev, void *data, 546extern int i915_vblank_swap(struct drm_device *dev, void *data,
538 struct drm_file *file_priv); 547 struct drm_file *file_priv);
539extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask); 548extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask);
@@ -601,6 +610,7 @@ int i915_gem_init_object(struct drm_gem_object *obj);
601void i915_gem_free_object(struct drm_gem_object *obj); 610void i915_gem_free_object(struct drm_gem_object *obj);
602int i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment); 611int i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment);
603void i915_gem_object_unpin(struct drm_gem_object *obj); 612void i915_gem_object_unpin(struct drm_gem_object *obj);
613int i915_gem_object_unbind(struct drm_gem_object *obj);
604void i915_gem_lastclose(struct drm_device *dev); 614void i915_gem_lastclose(struct drm_device *dev);
605uint32_t i915_get_gem_seqno(struct drm_device *dev); 615uint32_t i915_get_gem_seqno(struct drm_device *dev);
606void i915_gem_retire_requests(struct drm_device *dev); 616void i915_gem_retire_requests(struct drm_device *dev);
@@ -613,6 +623,7 @@ int i915_gem_init_ringbuffer(struct drm_device *dev);
613void i915_gem_cleanup_ringbuffer(struct drm_device *dev); 623void i915_gem_cleanup_ringbuffer(struct drm_device *dev);
614int i915_gem_do_init(struct drm_device *dev, unsigned long start, 624int i915_gem_do_init(struct drm_device *dev, unsigned long start,
615 unsigned long end); 625 unsigned long end);
626int i915_gem_idle(struct drm_device *dev);
616int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); 627int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
617int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, 628int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj,
618 int write); 629 int write);
@@ -784,6 +795,11 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
784 IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev)) 795 IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
785 796
786#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev)) 797#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
798/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
799 * rows, which changed the alignment requirements and fence programming.
800 */
801#define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \
802 IS_I915GM(dev)))
787#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev)) 803#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev))
788 804
789#define PRIMARY_RINGBUFFER_SIZE (128*1024) 805#define PRIMARY_RINGBUFFER_SIZE (128*1024)