Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163969
b: refs/heads/master
c: 553bd14
h: refs/heads/master
i:
  163967: 45012aa
v: v3
  • Loading branch information
Zhenyu Wang authored and Eric Anholt committed Sep 4, 2009
1 parent e8b0af8 commit 38125a6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65655d4ab72456c4c3e503fead55fabf8211a79d
refs/heads/master: 553bd149bb2de7848b2b84642876f27202421368
15 changes: 7 additions & 8 deletions trunk/drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
bool need_disable;

if (!IS_I9XX(dev)) {
if (IS_IGDNG(dev)) {
/* On IGDNG whatever DRAM config, GPU always do
* same swizzling setup.
*/
swizzle_x = I915_BIT_6_SWIZZLE_9_10;
swizzle_y = I915_BIT_6_SWIZZLE_9;
} else if (!IS_I9XX(dev)) {
/* As far as we know, the 865 doesn't have these bit 6
* swizzling issues.
*/
Expand Down Expand Up @@ -317,13 +323,6 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
}
}

/* FIXME: check with memory config on IGDNG */
if (IS_IGDNG(dev)) {
DRM_ERROR("disable tiling on IGDNG...\n");
swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
}

dev_priv->mm.bit_6_swizzle_x = swizzle_x;
dev_priv->mm.bit_6_swizzle_y = swizzle_y;
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@
#define DISPPLANE_NO_LINE_DOUBLE 0
#define DISPPLANE_STEREO_POLARITY_FIRST 0
#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
#define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* IGDNG */
#define DISPPLANE_TILED (1<<10)
#define DSPAADDR 0x70184
#define DSPASTRIDE 0x70188
Expand Down Expand Up @@ -2044,6 +2045,9 @@
#define GTIIR 0x44018
#define GTIER 0x4401c

#define DISP_ARB_CTL 0x45000
#define DISP_TILE_SURFACE_SWIZZLING (1<<13)

/* PCH */

/* south display engine interrupt */
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
dspcntr &= ~DISPPLANE_TILED;
}

if (IS_IGDNG(dev))
/* must disable */
dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;

I915_WRITE(dspcntr_reg, dspcntr);

Start = obj_priv->gtt_offset;
Expand Down Expand Up @@ -2719,6 +2723,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,

intel_wait_for_vblank(dev);

if (IS_IGDNG(dev)) {
/* enable address swizzle for tiling buffer */
temp = I915_READ(DISP_ARB_CTL);
I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING);
}

I915_WRITE(dspcntr_reg, dspcntr);

/* Flush the plane changes */
Expand Down

0 comments on commit 38125a6

Please sign in to comment.