93,7 → 93,7 |
struct drm_i915_private *dev_priv = dev->dev_private; |
struct fb_info *info; |
struct drm_framebuffer *fb; |
struct drm_mode_fb_cmd mode_cmd; |
struct drm_mode_fb_cmd2 mode_cmd; |
struct drm_i915_gem_object *obj; |
struct device *device = &dev->pdev->dev; |
int size, ret; |
105,11 → 105,12 |
mode_cmd.width = sizes->surface_width; |
mode_cmd.height = sizes->surface_height; |
|
mode_cmd.bpp = sizes->surface_bpp; |
mode_cmd.pitch = ALIGN(mode_cmd.width * ((mode_cmd.bpp + 7) / 8), 64); |
mode_cmd.depth = sizes->surface_depth; |
mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((sizes->surface_bpp + 7) / |
8), 64); |
mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, |
sizes->surface_depth); |
|
size = mode_cmd.pitch * mode_cmd.height; |
size = mode_cmd.pitches[0] * mode_cmd.height; |
size = ALIGN(size, PAGE_SIZE); |
obj = i915_gem_alloc_object(dev, size); |
if (!obj) { |
186,7 → 187,7 |
|
// memset(info->screen_base, 0, size); |
|
drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); |
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); |
drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); |
|
DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08x, bo %p\n", |
206,6 → 207,7 |
out: |
return ret; |
} |
|
static int intel_fb_find_or_create_single(struct drm_fb_helper *helper, |
struct drm_fb_helper_surface_size *sizes) |
{ |