drm: Replace pitch with pitches[] in drm_framebuffer
[deliverable/linux.git] / drivers / gpu / drm / drm_crtc_helper.c
index 2ce61d72d416f8539b49227ed3da1a1c606232fa..ccbdc0b5854c357772846bae4a3939299dfb2c08 100644 (file)
@@ -814,9 +814,14 @@ EXPORT_SYMBOL(drm_helper_connector_dpms);
 int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
                                   struct drm_mode_fb_cmd2 *mode_cmd)
 {
+       int i;
+
        fb->width = mode_cmd->width;
        fb->height = mode_cmd->height;
-       fb->pitch = mode_cmd->pitches[0];
+       for (i = 0; i < 4; i++) {
+               fb->pitches[i] = mode_cmd->pitches[i];
+               fb->offsets[i] = mode_cmd->offsets[i];
+       }
        drm_fb_get_bpp_depth(mode_cmd->pixel_format, &fb->depth,
                                    &fb->bits_per_pixel);
        fb->pixel_format = mode_cmd->pixel_format;
This page took 0.024878 seconds and 5 git commands to generate.