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/vmwgfx | |
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/vmwgfx')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 760d04aee380..0585987f2945 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -605,7 +605,7 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv, | |||
605 | 605 | ||
606 | /* XXX get the first 3 from the surface info */ | 606 | /* XXX get the first 3 from the surface info */ |
607 | vfbs->base.base.bits_per_pixel = mode_cmd->bpp; | 607 | vfbs->base.base.bits_per_pixel = mode_cmd->bpp; |
608 | vfbs->base.base.pitch = mode_cmd->pitch; | 608 | vfbs->base.base.pitches[0] = mode_cmd->pitch; |
609 | vfbs->base.base.depth = mode_cmd->depth; | 609 | vfbs->base.base.depth = mode_cmd->depth; |
610 | vfbs->base.base.width = mode_cmd->width; | 610 | vfbs->base.base.width = mode_cmd->width; |
611 | vfbs->base.base.height = mode_cmd->height; | 611 | vfbs->base.base.height = mode_cmd->height; |
@@ -719,7 +719,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file *file_priv, | |||
719 | cmd->body.format.bitsPerPixel = framebuffer->base.bits_per_pixel; | 719 | cmd->body.format.bitsPerPixel = framebuffer->base.bits_per_pixel; |
720 | cmd->body.format.colorDepth = depth; | 720 | cmd->body.format.colorDepth = depth; |
721 | cmd->body.format.reserved = 0; | 721 | cmd->body.format.reserved = 0; |
722 | cmd->body.bytesPerLine = framebuffer->base.pitch; | 722 | cmd->body.bytesPerLine = framebuffer->base.pitches[0]; |
723 | cmd->body.ptr.gmrId = framebuffer->user_handle; | 723 | cmd->body.ptr.gmrId = framebuffer->user_handle; |
724 | cmd->body.ptr.offset = 0; | 724 | cmd->body.ptr.offset = 0; |
725 | 725 | ||
@@ -961,7 +961,7 @@ static int vmw_kms_new_framebuffer_dmabuf(struct vmw_private *dev_priv, | |||
961 | } | 961 | } |
962 | 962 | ||
963 | vfbd->base.base.bits_per_pixel = mode_cmd->bpp; | 963 | vfbd->base.base.bits_per_pixel = mode_cmd->bpp; |
964 | vfbd->base.base.pitch = mode_cmd->pitch; | 964 | vfbd->base.base.pitches[0] = mode_cmd->pitch; |
965 | vfbd->base.base.depth = mode_cmd->depth; | 965 | vfbd->base.base.depth = mode_cmd->depth; |
966 | vfbd->base.base.width = mode_cmd->width; | 966 | vfbd->base.base.width = mode_cmd->width; |
967 | vfbd->base.base.height = mode_cmd->height; | 967 | vfbd->base.base.height = mode_cmd->height; |
@@ -1243,7 +1243,7 @@ int vmw_kms_readback(struct vmw_private *dev_priv, | |||
1243 | cmd->body.format.bitsPerPixel = vfb->base.bits_per_pixel; | 1243 | cmd->body.format.bitsPerPixel = vfb->base.bits_per_pixel; |
1244 | cmd->body.format.colorDepth = vfb->base.depth; | 1244 | cmd->body.format.colorDepth = vfb->base.depth; |
1245 | cmd->body.format.reserved = 0; | 1245 | cmd->body.format.reserved = 0; |
1246 | cmd->body.bytesPerLine = vfb->base.pitch; | 1246 | cmd->body.bytesPerLine = vfb->base.pitches[0]; |
1247 | cmd->body.ptr.gmrId = vfb->user_handle; | 1247 | cmd->body.ptr.gmrId = vfb->user_handle; |
1248 | cmd->body.ptr.offset = 0; | 1248 | cmd->body.ptr.offset = 0; |
1249 | 1249 | ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c index 90c5e3928491..15a6805e48b0 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | |||
@@ -94,7 +94,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) | |||
94 | return 0; | 94 | return 0; |
95 | fb = entry->base.crtc.fb; | 95 | fb = entry->base.crtc.fb; |
96 | 96 | ||
97 | return vmw_kms_write_svga(dev_priv, w, h, fb->pitch, | 97 | return vmw_kms_write_svga(dev_priv, w, h, fb->pitches[0], |
98 | fb->bits_per_pixel, fb->depth); | 98 | fb->bits_per_pixel, fb->depth); |
99 | } | 99 | } |
100 | 100 | ||
@@ -102,7 +102,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) | |||
102 | entry = list_entry(lds->active.next, typeof(*entry), active); | 102 | entry = list_entry(lds->active.next, typeof(*entry), active); |
103 | fb = entry->base.crtc.fb; | 103 | fb = entry->base.crtc.fb; |
104 | 104 | ||
105 | vmw_kms_write_svga(dev_priv, fb->width, fb->height, fb->pitch, | 105 | vmw_kms_write_svga(dev_priv, fb->width, fb->height, fb->pitches[0], |
106 | fb->bits_per_pixel, fb->depth); | 106 | fb->bits_per_pixel, fb->depth); |
107 | } | 107 | } |
108 | 108 | ||