D Dennis Munsie #
Message details and related content
Hi all, Quick patch to correct the stride alignment on the 9xx chipsets. This allows modes like 1366x768 to be displayed correctly. regards, dennis --- From: Dennis Munsie <redacted> intelfb -- uses stride alignment of 64 on the 9xx chipsets. Signed-off-by: Dennis Munsie <redacted> --- drivers/video/intelfb/intelfb.h | 1 + drivers/video/intelfb/intelfbdrv.c | 5 ++++- drivers/video/intelfb/intelfbhw.c | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff -Naurp -X linux-2.6.17-rc4-945-fix/Documentation/dontdiff linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfb.h linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfb.h
--- linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfb.h 2006-05-25 15:50:24.000000000 -0500
+++ linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfb.h 2006-05-25 15:55:09.000000000 -0500@@ -59,6 +59,7 @@#define INTEL_REG_SIZE 0x80000 #define STRIDE_ALIGNMENT 16 +#define STRIDE_ALIGNMENT_I9XX 64 #define PALETTE_8_ENTRIES 256 diff -Naurp -X linux-2.6.17-rc4-945-fix/Documentation/dontdiff linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfbdrv.c linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfbdrv.c
--- linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfbdrv.c 2006-05-25 15:50:24.000000000 -0500
+++ linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfbdrv.c 2006-05-25 15:54:03.000000000 -0500@@ -1171,7 +1171,10 @@ update_dinfo(struct intelfb_info *dinfo,} /* Make sure the line length is a aligned correctly. */ - dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT); + if (IS_I9XX(dinfo)) + dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT_I9XX); + else + dinfo->pitch = ROUND_UP_TO(dinfo->pitch, STRIDE_ALIGNMENT); if (FIXED_MODE(dinfo)) dinfo->pitch = dinfo->initial_pitch; diff -Naurp -X linux-2.6.17-rc4-945-fix/Documentation/dontdiff linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfbhw.c linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfbhw.c
--- linux-2.6.17-rc4-945-fix/drivers/video/intelfb/intelfbhw.c 2006-05-25 15:50:24.000000000 -0500
+++ linux-2.6.17-rc4-9xx-stride/drivers/video/intelfb/intelfbhw.c 2006-05-25 16:13:28.000000000 -0500@@ -1025,6 +1025,7 @@ intelfbhw_mode_to_hw(struct intelfb_info u32 vsync_start, vsync_end, vblank_start, vblank_end, vtotal, vactive;
u32 vsync_pol, hsync_pol;
u32 *vs, *vb, *vt, *hs, *hb, *ht, *ss, *pipe_conf;
+ u32 stride_alignment;
DBG_MSG("intelfbhw_mode_to_hw\n");@@ -1236,9 +1237,10 @@ intelfbhw_mode_to_hw(struct intelfb_info hw->disp_a_base += dinfo->fb.offset << 12;
/* Check stride alignment. */
- if (hw->disp_a_stride % STRIDE_ALIGNMENT != 0) {
+ stride_alignment = IS_I9XX(dinfo) ? STRIDE_ALIGNMENT_I9XX : STRIDE_ALIGNMENT;
+ if (hw->disp_a_stride % stride_alignment != 0) {
WRN_MSG("display stride %d has bad alignment %d\n",
- hw->disp_a_stride, STRIDE_ALIGNMENT);
+ hw->disp_a_stride, stride_alignment);
return 1;
}
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642