Skip to content

Commit

Permalink
drm/i915: implement WaDisableEarlyCull for VLV and IVB
Browse files Browse the repository at this point in the history
Workaround for a culling optimization.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: Also apply to haswell, spotted by Damien.]
Reviewed-by: "Lespiau, Damien" <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Jesse Barnes authored and Daniel Vetter committed Oct 4, 2012
1 parent 61939d9 commit 87f8020
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@
*/
# define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14)
#define _3D_CHICKEN3 0x02090
#define _3D_CHICKEN_SF_DISABLE_OBJEND_CULL (1 << 10)
#define _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL (1 << 5)

#define MI_MODE 0x0209c
Expand Down
12 changes: 12 additions & 0 deletions drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3475,6 +3475,10 @@ static void haswell_init_clock_gating(struct drm_device *dev)

I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE);

/* WaDisableEarlyCull */
I915_WRITE(_3D_CHICKEN3,
_MASKED_BIT_ENABLE(_3D_CHICKEN_SF_DISABLE_OBJEND_CULL));

I915_WRITE(IVB_CHICKEN3,
CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
CHICKEN3_DGMG_DONE_FIX_DISABLE);
Expand Down Expand Up @@ -3533,6 +3537,10 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)

I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE);

/* WaDisableEarlyCull */
I915_WRITE(_3D_CHICKEN3,
_MASKED_BIT_ENABLE(_3D_CHICKEN_SF_DISABLE_OBJEND_CULL));

I915_WRITE(IVB_CHICKEN3,
CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
CHICKEN3_DGMG_DONE_FIX_DISABLE);
Expand Down Expand Up @@ -3609,6 +3617,10 @@ static void valleyview_init_clock_gating(struct drm_device *dev)

I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE);

/* WaDisableEarlyCull */
I915_WRITE(_3D_CHICKEN3,
_MASKED_BIT_ENABLE(_3D_CHICKEN_SF_DISABLE_OBJEND_CULL));

I915_WRITE(IVB_CHICKEN3,
CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
CHICKEN3_DGMG_DONE_FIX_DISABLE);
Expand Down

0 comments on commit 87f8020

Please sign in to comment.