From: dumbbell Date: Sun, 8 Nov 2015 19:29:34 +0000 (+0000) Subject: drm/i915: Reduce diff with Linux 3.8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=147f4bbc86406d9323d1a991cee21c88d5b7dfaa;p=people%2Fliuw%2Ffreebsd.git drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after: 2 months --- diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c index 130d87a60af..5ec2c170e84 100644 --- a/sys/dev/drm2/i915/intel_fb.c +++ b/sys/dev/drm2/i915/intel_fb.c @@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include static int intelfb_create(struct intel_fbdev *ifbdev, struct drm_fb_helper_surface_size *sizes) @@ -45,7 +45,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev, #endif struct fb_info *info; struct drm_framebuffer *fb; - struct drm_mode_fb_cmd2 mode_cmd; + struct drm_mode_fb_cmd2 mode_cmd = {}; struct drm_i915_gem_object *obj; int size, ret; @@ -57,7 +57,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev, mode_cmd.height = sizes->surface_height; mode_cmd.pitches[0] = roundup2(mode_cmd.width * ((sizes->surface_bpp + 7) / - 8), 64); + 8), 64); mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); @@ -143,6 +143,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev, drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ + DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb: 0x%08x, bo %p\n", fb->width, fb->height, fb->depth, obj->gtt_offset, obj); @@ -222,8 +223,7 @@ int intel_fbdev_init(struct drm_device *dev) drm_i915_private_t *dev_priv = dev->dev_private; int ret; - ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS, - M_WAITOK | M_ZERO); + ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS, M_WAITOK | M_ZERO); dev_priv->fbdev = ifbdev; ifbdev->helper.funcs = &intel_fb_helper_funcs;