diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2011-12-19 17:06:49 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-20 05:06:27 -0500 |
commit | 01f2c7730e188077026c5f766f85f329c7000c54 (patch) | |
tree | 1b7ad10bd70c25ccaefa2a03aeedaeb20ac2c336 /drivers/gpu/drm/gma500 | |
parent | 935b59774012d11e3012c909cdd0c3cba0adf219 (diff) |
drm: Replace pitch with pitches[] in drm_framebuffer
Otherwise each driver would need to keep the information inside
their own framebuffer object structure. Also add offsets[]. BOs
on the other hand are driver specific, so those can be kept in
driver specific structures.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/accel_2d.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_display.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_display.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c index f0ce82aed654..d5ef1a5793c8 100644 --- a/drivers/gpu/drm/gma500/accel_2d.c +++ b/drivers/gpu/drm/gma500/accel_2d.c | |||
@@ -253,7 +253,7 @@ static void psbfb_copyarea_accel(struct fb_info *info, | |||
253 | return; | 253 | return; |
254 | 254 | ||
255 | offset = psbfb->gtt->offset; | 255 | offset = psbfb->gtt->offset; |
256 | stride = fb->pitch; | 256 | stride = fb->pitches[0]; |
257 | 257 | ||
258 | switch (fb->depth) { | 258 | switch (fb->depth) { |
259 | case 8: | 259 | case 8: |
diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index 7b97c600eff0..c63a32776a9e 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c | |||
@@ -507,9 +507,9 @@ int cdv_intel_pipe_set_base(struct drm_crtc *crtc, | |||
507 | if (ret < 0) | 507 | if (ret < 0) |
508 | goto psb_intel_pipe_set_base_exit; | 508 | goto psb_intel_pipe_set_base_exit; |
509 | start = psbfb->gtt->offset; | 509 | start = psbfb->gtt->offset; |
510 | offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); | 510 | offset = y * crtc->fb->pitches[0] + x * (crtc->fb->bits_per_pixel / 8); |
511 | 511 | ||
512 | REG_WRITE(dspstride, crtc->fb->pitch); | 512 | REG_WRITE(dspstride, crtc->fb->pitches[0]); |
513 | 513 | ||
514 | dspcntr = REG_READ(dspcntr_reg); | 514 | dspcntr = REG_READ(dspcntr_reg); |
515 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; | 515 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; |
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 9ec167600d04..75cfafe2ff81 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -500,7 +500,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, | |||
500 | info->apertures->ranges[0].size = dev_priv->gtt.stolen_size; | 500 | info->apertures->ranges[0].size = dev_priv->gtt.stolen_size; |
501 | } | 501 | } |
502 | 502 | ||
503 | drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); | 503 | drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); |
504 | drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, | 504 | drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, |
505 | sizes->fb_width, sizes->fb_height); | 505 | sizes->fb_width, sizes->fb_height); |
506 | 506 | ||
diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c index 8e15b5af1213..fe17e1f000bf 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c | |||
@@ -543,9 +543,9 @@ int oaktrail_pipe_set_base(struct drm_crtc *crtc, | |||
543 | return 0; | 543 | return 0; |
544 | 544 | ||
545 | start = psbfb->gtt->offset; | 545 | start = psbfb->gtt->offset; |
546 | offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); | 546 | offset = y * crtc->fb->pitches[0] + x * (crtc->fb->bits_per_pixel / 8); |
547 | 547 | ||
548 | REG_WRITE(dspstride, crtc->fb->pitch); | 548 | REG_WRITE(dspstride, crtc->fb->pitches[0]); |
549 | 549 | ||
550 | dspcntr = REG_READ(dspcntr_reg); | 550 | dspcntr = REG_READ(dspcntr_reg); |
551 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; | 551 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; |
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index ab650765a647..7bc0edee9c0d 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c | |||
@@ -365,9 +365,9 @@ int psb_intel_pipe_set_base(struct drm_crtc *crtc, | |||
365 | goto psb_intel_pipe_set_base_exit; | 365 | goto psb_intel_pipe_set_base_exit; |
366 | start = psbfb->gtt->offset; | 366 | start = psbfb->gtt->offset; |
367 | 367 | ||
368 | offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); | 368 | offset = y * crtc->fb->pitches[0] + x * (crtc->fb->bits_per_pixel / 8); |
369 | 369 | ||
370 | REG_WRITE(dspstride, crtc->fb->pitch); | 370 | REG_WRITE(dspstride, crtc->fb->pitches[0]); |
371 | 371 | ||
372 | dspcntr = REG_READ(dspcntr_reg); | 372 | dspcntr = REG_READ(dspcntr_reg); |
373 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; | 373 | dspcntr &= ~DISPPLANE_PIXFORMAT_MASK; |