[linux-next:master 4991/7526] drivers/gpu/drm/i915/gvt/kvmgt.c:595:10: error: implicit declaration of function 'drm_edid_block_valid'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   196d330d7fb1e7cc0d85641c89ce4602cb36f12e
commit: 01b94a9361680d6582dcc2a73a9eb464e0e40888 [4991/7526] drm/i915: include some drm headers only where needed
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220224/202202240620.tqMKhkvP-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=01b94a9361680d6582dcc2a73a9eb464e0e40888
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 01b94a9361680d6582dcc2a73a9eb464e0e40888
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the linux-next/master HEAD 196d330d7fb1e7cc0d85641c89ce4602cb36f12e builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'handle_edid_regs':
>> drivers/gpu/drm/i915/gvt/kvmgt.c:595:10: error: implicit declaration of function 'drm_edid_block_valid' [-Werror=implicit-function-declaration]
     595 |     if (!drm_edid_block_valid(
         |          ^~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +/drm_edid_block_valid +595 drivers/gpu/drm/i915/gvt/kvmgt.c

b851adeac0858c Tina Zhang 2017-11-20  576  
39c68e87bc50a7 Hang Yuan  2019-01-30  577  static int handle_edid_regs(struct intel_vgpu *vgpu,
39c68e87bc50a7 Hang Yuan  2019-01-30  578  			struct vfio_edid_region *region, char *buf,
39c68e87bc50a7 Hang Yuan  2019-01-30  579  			size_t count, u16 offset, bool is_write)
39c68e87bc50a7 Hang Yuan  2019-01-30  580  {
39c68e87bc50a7 Hang Yuan  2019-01-30  581  	struct vfio_region_gfx_edid *regs = &region->vfio_edid_regs;
39c68e87bc50a7 Hang Yuan  2019-01-30  582  	unsigned int data;
39c68e87bc50a7 Hang Yuan  2019-01-30  583  
39c68e87bc50a7 Hang Yuan  2019-01-30  584  	if (offset + count > sizeof(*regs))
39c68e87bc50a7 Hang Yuan  2019-01-30  585  		return -EINVAL;
39c68e87bc50a7 Hang Yuan  2019-01-30  586  
39c68e87bc50a7 Hang Yuan  2019-01-30  587  	if (count != 4)
39c68e87bc50a7 Hang Yuan  2019-01-30  588  		return -EINVAL;
39c68e87bc50a7 Hang Yuan  2019-01-30  589  
39c68e87bc50a7 Hang Yuan  2019-01-30  590  	if (is_write) {
39c68e87bc50a7 Hang Yuan  2019-01-30  591  		data = *((unsigned int *)buf);
39c68e87bc50a7 Hang Yuan  2019-01-30  592  		switch (offset) {
39c68e87bc50a7 Hang Yuan  2019-01-30  593  		case offsetof(struct vfio_region_gfx_edid, link_state):
39c68e87bc50a7 Hang Yuan  2019-01-30  594  			if (data == VFIO_DEVICE_GFX_LINK_STATE_UP) {
39c68e87bc50a7 Hang Yuan  2019-01-30 @595  				if (!drm_edid_block_valid(
39c68e87bc50a7 Hang Yuan  2019-01-30  596  					(u8 *)region->edid_blob,
39c68e87bc50a7 Hang Yuan  2019-01-30  597  					0,
39c68e87bc50a7 Hang Yuan  2019-01-30  598  					true,
39c68e87bc50a7 Hang Yuan  2019-01-30  599  					NULL)) {
39c68e87bc50a7 Hang Yuan  2019-01-30  600  					gvt_vgpu_err("invalid EDID blob\n");
39c68e87bc50a7 Hang Yuan  2019-01-30  601  					return -EINVAL;
39c68e87bc50a7 Hang Yuan  2019-01-30  602  				}
39c68e87bc50a7 Hang Yuan  2019-01-30  603  				intel_gvt_ops->emulate_hotplug(vgpu, true);
39c68e87bc50a7 Hang Yuan  2019-01-30  604  			} else if (data == VFIO_DEVICE_GFX_LINK_STATE_DOWN)
39c68e87bc50a7 Hang Yuan  2019-01-30  605  				intel_gvt_ops->emulate_hotplug(vgpu, false);
39c68e87bc50a7 Hang Yuan  2019-01-30  606  			else {
39c68e87bc50a7 Hang Yuan  2019-01-30  607  				gvt_vgpu_err("invalid EDID link state %d\n",
39c68e87bc50a7 Hang Yuan  2019-01-30  608  					regs->link_state);
39c68e87bc50a7 Hang Yuan  2019-01-30  609  				return -EINVAL;
39c68e87bc50a7 Hang Yuan  2019-01-30  610  			}
39c68e87bc50a7 Hang Yuan  2019-01-30  611  			regs->link_state = data;
39c68e87bc50a7 Hang Yuan  2019-01-30  612  			break;
39c68e87bc50a7 Hang Yuan  2019-01-30  613  		case offsetof(struct vfio_region_gfx_edid, edid_size):
39c68e87bc50a7 Hang Yuan  2019-01-30  614  			if (data > regs->edid_max_size) {
39c68e87bc50a7 Hang Yuan  2019-01-30  615  				gvt_vgpu_err("EDID size is bigger than %d!\n",
39c68e87bc50a7 Hang Yuan  2019-01-30  616  					regs->edid_max_size);
39c68e87bc50a7 Hang Yuan  2019-01-30  617  				return -EINVAL;
39c68e87bc50a7 Hang Yuan  2019-01-30  618  			}
39c68e87bc50a7 Hang Yuan  2019-01-30  619  			regs->edid_size = data;
39c68e87bc50a7 Hang Yuan  2019-01-30  620  			break;
39c68e87bc50a7 Hang Yuan  2019-01-30  621  		default:
39c68e87bc50a7 Hang Yuan  2019-01-30  622  			/* read-only regs */
39c68e87bc50a7 Hang Yuan  2019-01-30  623  			gvt_vgpu_err("write read-only EDID region at offset %d\n",
39c68e87bc50a7 Hang Yuan  2019-01-30  624  				offset);
39c68e87bc50a7 Hang Yuan  2019-01-30  625  			return -EPERM;
39c68e87bc50a7 Hang Yuan  2019-01-30  626  		}
39c68e87bc50a7 Hang Yuan  2019-01-30  627  	} else {
39c68e87bc50a7 Hang Yuan  2019-01-30  628  		memcpy(buf, (char *)regs + offset, count);
39c68e87bc50a7 Hang Yuan  2019-01-30  629  	}
39c68e87bc50a7 Hang Yuan  2019-01-30  630  
39c68e87bc50a7 Hang Yuan  2019-01-30  631  	return count;
39c68e87bc50a7 Hang Yuan  2019-01-30  632  }
39c68e87bc50a7 Hang Yuan  2019-01-30  633  

:::::: The code at line 595 was first introduced by commit
:::::: 39c68e87bc50a71bcfe93582d9b0673ef30db418 drm/i915/gvt: add VFIO EDID region

:::::: TO: Hang Yuan <hang.yuan@xxxxxxxxxxxxxxx>
:::::: CC: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux