diff options
author | Dennis Munsie <dmunsie@cecropia.com> | 2006-05-27 04:17:52 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-05-27 04:17:52 -0400 |
commit | df7df8ab7b38ca80bbaf5ffafd401d6c739fd45f (patch) | |
tree | 83f7f6768ac730231386fdbf70f30c165d3cb134 /drivers/video/intelfb | |
parent | 51d797474f87b375819d084f7583a2864c5656c4 (diff) |
intelfb -- uses stride alignment of 64 on the 9xx chipsets.
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/video/intelfb')
-rw-r--r-- | drivers/video/intelfb/intelfb.h | 1 | ||||
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 5 | ||||
-rw-r--r-- | drivers/video/intelfb/intelfbhw.c | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index 631a3a95de40..469b06c29180 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #define INTEL_REG_SIZE 0x80000 | 59 | #define INTEL_REG_SIZE 0x80000 |
60 | 60 | ||
61 | #define STRIDE_ALIGNMENT 16 | 61 | #define STRIDE_ALIGNMENT 16 |
62 | #define STRIDE_ALIGNMENT_I9XX 64 | ||
62 | 63 | ||
63 | #define PALETTE_8_ENTRIES 256 | 64 | #define PALETTE_8_ENTRIES 256 |
64 | 65 | ||
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 2aba6a4a9eae..b92bc908335e 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -1141,7 +1141,10 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) | |||
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | /* Make sure the line length is a aligned correctly. */ | 1143 | /* Make sure the line length is a aligned correctly. */ |
1144 | dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT); | 1144 | if (IS_I9XX(dinfo)) |
1145 | dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT_I9XX); | ||
1146 | else | ||
1147 | dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT); | ||
1145 | 1148 | ||
1146 | if (FIXED_MODE(dinfo)) | 1149 | if (FIXED_MODE(dinfo)) |
1147 | dinfo->pitch = dinfo->initial_pitch; | 1150 | dinfo->pitch = dinfo->initial_pitch; |
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 05f0a3c9440f..eba8f8f6a4d4 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -1005,6 +1005,7 @@ intelfbhw_mode_to_hw(struct intelfb_info *dinfo, struct intelfb_hwstate *hw, | |||
1005 | u32 vsync_start, vsync_end, vblank_start, vblank_end, vtotal, vactive; | 1005 | u32 vsync_start, vsync_end, vblank_start, vblank_end, vtotal, vactive; |
1006 | u32 vsync_pol, hsync_pol; | 1006 | u32 vsync_pol, hsync_pol; |
1007 | u32 *vs, *vb, *vt, *hs, *hb, *ht, *ss, *pipe_conf; | 1007 | u32 *vs, *vb, *vt, *hs, *hb, *ht, *ss, *pipe_conf; |
1008 | u32 stride_alignment; | ||
1008 | 1009 | ||
1009 | DBG_MSG("intelfbhw_mode_to_hw\n"); | 1010 | DBG_MSG("intelfbhw_mode_to_hw\n"); |
1010 | 1011 | ||
@@ -1216,9 +1217,11 @@ intelfbhw_mode_to_hw(struct intelfb_info *dinfo, struct intelfb_hwstate *hw, | |||
1216 | hw->disp_a_base += dinfo->fb.offset << 12; | 1217 | hw->disp_a_base += dinfo->fb.offset << 12; |
1217 | 1218 | ||
1218 | /* Check stride alignment. */ | 1219 | /* Check stride alignment. */ |
1219 | if (hw->disp_a_stride % STRIDE_ALIGNMENT != 0) { | 1220 | stride_alignment = IS_I9XX(dinfo) ? STRIDE_ALIGNMENT_I9XX : |
1221 | STRIDE_ALIGNMENT; | ||
1222 | if (hw->disp_a_stride % stride_alignment != 0) { | ||
1220 | WRN_MSG("display stride %d has bad alignment %d\n", | 1223 | WRN_MSG("display stride %d has bad alignment %d\n", |
1221 | hw->disp_a_stride, STRIDE_ALIGNMENT); | 1224 | hw->disp_a_stride, stride_alignment); |
1222 | return 1; | 1225 | return 1; |
1223 | } | 1226 | } |
1224 | 1227 | ||