summaryrefslogtreecommitdiff
path: root/linux-core/intel_display.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-05-17 09:00:06 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-05-17 09:00:06 -0700
commita18b4befb9b76c4b2662ff6caa0e4f0975eb8e9c (patch)
tree3f4b00c8c4f11f0c78fa64fcf617ea33dede28b6 /linux-core/intel_display.c
parentb589b846e73bfe6235cd702bb8ae89701c85eaab (diff)
Fix FB pitch value (we had it wrong and were working around it in a few
places). Add new FB hooks to the drm driver structure and make i915 use them for an Intel specific FB driver. This will allow acceleration and better handling of the command stream.
Diffstat (limited to 'linux-core/intel_display.c')
-rw-r--r--linux-core/intel_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/intel_display.c b/linux-core/intel_display.c
index 7d581175..be2db912 100644
--- a/linux-core/intel_display.c
+++ b/linux-core/intel_display.c
@@ -370,7 +370,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y)
int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
Start = crtc->fb->offset;
- Offset = ((y * crtc->fb->pitch + x) * (crtc->fb->bits_per_pixel / 8));
+ Offset = y * crtc->fb->pitch + x;
DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y);
if (IS_I965G(dev)) {
@@ -911,7 +911,7 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc,
((adjusted_mode->crtc_vblank_end - 1) << 16));
I915_WRITE(vsync_reg, (adjusted_mode->crtc_vsync_start - 1) |
((adjusted_mode->crtc_vsync_end - 1) << 16));
- I915_WRITE(dspstride_reg, crtc->fb->pitch * (crtc->fb->bits_per_pixel / 8));
+ I915_WRITE(dspstride_reg, crtc->fb->pitch);
/* pipesrc and dspsize control the size that is scaled from, which should
* always be the user's requested size.
*/