drm/modesetting: overhaul the fb create/delete.
[profile/ivi/libdrm.git] / linux-core / drm_crtc_helper.c
index fcb1243..f35c0a4 100644 (file)
@@ -749,3 +749,17 @@ int drm_helper_hotplug_stage_two(struct drm_device *dev, struct drm_connector *c
 }
 EXPORT_SYMBOL(drm_helper_hotplug_stage_two);
 
+
+int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
+                                  struct drm_mode_fb_cmd *mode_cmd)
+{
+       fb->width = mode_cmd->width;
+       fb->height = mode_cmd->height;
+       fb->pitch = mode_cmd->pitch;
+       fb->bits_per_pixel = mode_cmd->bpp;
+       fb->depth = mode_cmd->depth;
+       fb->mm_handle = mode_cmd->handle;
+       
+       return 0;
+}
+EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct);