[Intel-xe] [drm-xe:drm-xe-next 3/15] drivers/gpu/drm/i915/display/intel_fbdev_fb.c:13:25: warning: no previous prototype for 'intel_fbdev_fb_alloc'

kernel test robot lkp at intel.com
Wed Nov 15 13:04:03 UTC 2023


tree:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
head:   14d1d786caacdb3438d07ab86fabf2e36c8151cc
commit: 9eb20bf3156f1a9e1c73e857be09c042deb2b5a0 [3/15] drm/i915/display: split i915 specific code from intel_fbdev
config: x86_64-randconfig-004-20231115 (https://download.01.org/0day-ci/archive/20231115/202311152128.2R0TGUKs-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231115/202311152128.2R0TGUKs-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311152128.2R0TGUKs-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_fbdev_fb.c:13:25: warning: no previous prototype for 'intel_fbdev_fb_alloc' [-Wmissing-prototypes]
      13 | struct drm_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
         |                         ^~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_fbdev_fb.c:68:5: warning: no previous prototype for 'intel_fbdev_fb_fill_info' [-Wmissing-prototypes]
      68 | int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, struct fb_info *info,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/intel_fbdev_fb_alloc +13 drivers/gpu/drm/i915/display/intel_fbdev_fb.c

    12	
  > 13	struct drm_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
    14						     struct drm_fb_helper_surface_size *sizes)
    15	{
    16		struct drm_framebuffer *fb;
    17		struct drm_device *dev = helper->dev;
    18		struct drm_i915_private *dev_priv = to_i915(dev);
    19		struct drm_mode_fb_cmd2 mode_cmd = {};
    20		struct drm_i915_gem_object *obj;
    21		int size;
    22	
    23		/* we don't do packed 24bpp */
    24		if (sizes->surface_bpp == 24)
    25			sizes->surface_bpp = 32;
    26	
    27		mode_cmd.width = sizes->surface_width;
    28		mode_cmd.height = sizes->surface_height;
    29	
    30		mode_cmd.pitches[0] = ALIGN(mode_cmd.width *
    31					    DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
    32		mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
    33								  sizes->surface_depth);
    34	
    35		size = mode_cmd.pitches[0] * mode_cmd.height;
    36		size = PAGE_ALIGN(size);
    37	
    38		obj = ERR_PTR(-ENODEV);
    39		if (HAS_LMEM(dev_priv)) {
    40			obj = i915_gem_object_create_lmem(dev_priv, size,
    41							  I915_BO_ALLOC_CONTIGUOUS |
    42							  I915_BO_ALLOC_USER);
    43		} else {
    44			/*
    45			 * If the FB is too big, just don't use it since fbdev is not very
    46			 * important and we should probably use that space with FBC or other
    47			 * features.
    48			 *
    49			 * Also skip stolen on MTL as Wa_22018444074 mitigation.
    50			 */
    51			if (!(IS_METEORLAKE(dev_priv)) && size * 2 < dev_priv->dsm.usable_size)
    52				obj = i915_gem_object_create_stolen(dev_priv, size);
    53			if (IS_ERR(obj))
    54				obj = i915_gem_object_create_shmem(dev_priv, size);
    55		}
    56	
    57		if (IS_ERR(obj)) {
    58			drm_err(&dev_priv->drm, "failed to allocate framebuffer (%pe)\n", obj);
    59			return ERR_PTR(-ENOMEM);
    60		}
    61	
    62		fb = intel_framebuffer_create(obj, &mode_cmd);
    63		i915_gem_object_put(obj);
    64	
    65		return fb;
    66	}
    67	
  > 68	int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, struct fb_info *info,

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


More information about the Intel-xe mailing list