diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2013-07-05 17:41:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-08 16:04:34 -0400 |
commit | f343c5f6477354967ee1e331a68a56b9fece2f36 (patch) | |
tree | 71bcf1f5c511b3fa13369badf81e074d8d603543 /drivers/gpu/drm/i915/intel_pm.c | |
parent | 338710e7aff3428dc8170a03704a8ae981b58dcd (diff) |
drm/i915: Getter/setter for object attributes
Soon we want to gut a lot of our existing assumptions how many address
spaces an object can live in, and in doing so, embed the drm_mm_node in
the object (and later the VMA).
It's possible in the future we'll want to add more getter/setter
methods, but for now this is enough to enable the VMAs.
v2: Reworked commit message (Ben)
Added comments to the main functions (Ben)
sed -i "s/i915_gem_obj_set_color/i915_gem_obj_ggtt_set_color/" drivers/gpu/drm/i915/*.[ch]
sed -i "s/i915_gem_obj_bound/i915_gem_obj_ggtt_bound/" drivers/gpu/drm/i915/*.[ch]
sed -i "s/i915_gem_obj_size/i915_gem_obj_ggtt_size/" drivers/gpu/drm/i915/*.[ch]
sed -i "s/i915_gem_obj_offset/i915_gem_obj_ggtt_offset/" drivers/gpu/drm/i915/*.[ch]
(Daniel)
v3: Rebased on new reserve_node patch
Changed DRM_DEBUG_KMS to actually work (will need fixing later)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 0eed35da3ea5..125a741eed86 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -218,7 +218,7 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval) | |||
218 | (stall_watermark << DPFC_RECOMP_STALL_WM_SHIFT) | | 218 | (stall_watermark << DPFC_RECOMP_STALL_WM_SHIFT) | |
219 | (interval << DPFC_RECOMP_TIMER_COUNT_SHIFT)); | 219 | (interval << DPFC_RECOMP_TIMER_COUNT_SHIFT)); |
220 | I915_WRITE(ILK_DPFC_FENCE_YOFF, crtc->y); | 220 | I915_WRITE(ILK_DPFC_FENCE_YOFF, crtc->y); |
221 | I915_WRITE(ILK_FBC_RT_BASE, obj->gtt_offset | ILK_FBC_RT_VALID); | 221 | I915_WRITE(ILK_FBC_RT_BASE, i915_gem_obj_ggtt_offset(obj) | ILK_FBC_RT_VALID); |
222 | /* enable it... */ | 222 | /* enable it... */ |
223 | I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN); | 223 | I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN); |
224 | 224 | ||
@@ -275,7 +275,7 @@ static void gen7_enable_fbc(struct drm_crtc *crtc, unsigned long interval) | |||
275 | struct drm_i915_gem_object *obj = intel_fb->obj; | 275 | struct drm_i915_gem_object *obj = intel_fb->obj; |
276 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 276 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
277 | 277 | ||
278 | I915_WRITE(IVB_FBC_RT_BASE, obj->gtt_offset); | 278 | I915_WRITE(IVB_FBC_RT_BASE, i915_gem_obj_ggtt_offset(obj)); |
279 | 279 | ||
280 | I915_WRITE(ILK_DPFC_CONTROL, DPFC_CTL_EN | DPFC_CTL_LIMIT_1X | | 280 | I915_WRITE(ILK_DPFC_CONTROL, DPFC_CTL_EN | DPFC_CTL_LIMIT_1X | |
281 | IVB_DPFC_CTL_FENCE_EN | | 281 | IVB_DPFC_CTL_FENCE_EN | |
@@ -3700,7 +3700,7 @@ static void ironlake_enable_rc6(struct drm_device *dev) | |||
3700 | 3700 | ||
3701 | intel_ring_emit(ring, MI_SUSPEND_FLUSH | MI_SUSPEND_FLUSH_EN); | 3701 | intel_ring_emit(ring, MI_SUSPEND_FLUSH | MI_SUSPEND_FLUSH_EN); |
3702 | intel_ring_emit(ring, MI_SET_CONTEXT); | 3702 | intel_ring_emit(ring, MI_SET_CONTEXT); |
3703 | intel_ring_emit(ring, dev_priv->ips.renderctx->gtt_offset | | 3703 | intel_ring_emit(ring, i915_gem_obj_ggtt_offset(dev_priv->ips.renderctx) | |
3704 | MI_MM_SPACE_GTT | | 3704 | MI_MM_SPACE_GTT | |
3705 | MI_SAVE_EXT_STATE_EN | | 3705 | MI_SAVE_EXT_STATE_EN | |
3706 | MI_RESTORE_EXT_STATE_EN | | 3706 | MI_RESTORE_EXT_STATE_EN | |
@@ -3723,7 +3723,7 @@ static void ironlake_enable_rc6(struct drm_device *dev) | |||
3723 | return; | 3723 | return; |
3724 | } | 3724 | } |
3725 | 3725 | ||
3726 | I915_WRITE(PWRCTXA, dev_priv->ips.pwrctx->gtt_offset | PWRCTX_EN); | 3726 | I915_WRITE(PWRCTXA, i915_gem_obj_ggtt_offset(dev_priv->ips.pwrctx) | PWRCTX_EN); |
3727 | I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT); | 3727 | I915_WRITE(RSTDBYCTL, I915_READ(RSTDBYCTL) & ~RCX_SW_EXIT); |
3728 | } | 3728 | } |
3729 | 3729 | ||