lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210232247.dAHqmaZ2-lkp@intel.com>
Date:   Sun, 23 Oct 2022 22:56:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alyssa Rosenzweig <alyssa@...enzweig.io>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Janne Grunau <j@...nau.net>
Subject: [asahilinux:gpu/rust-wip 1707/2025]
 drivers/gpu/drm/apple/apple_drv.c:116:19: warning: no previous prototype for
 'apple_plane_init'

tree:   https://github.com/AsahiLinux/linux gpu/rust-wip
head:   723f96051316cedeab48d9c03f26eadf5b2d0180
commit: b739fa9a51bf3066a8e3c4fb68ddd8b0576ef012 [1707/2025] WIP: drm/apple: Add DCP display driver
config: arm64-allyesconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/AsahiLinux/linux/commit/b739fa9a51bf3066a8e3c4fb68ddd8b0576ef012
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux gpu/rust-wip
        git checkout b739fa9a51bf3066a8e3c4fb68ddd8b0576ef012
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/apple/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/apple/apple_drv.c:47:9: error: 'DRM_GEM_CMA_DRIVER_OPS' undeclared here (not in a function); did you mean 'DRM_GEM_DMA_DRIVER_OPS'?
      47 |         DRM_GEM_CMA_DRIVER_OPS,
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         DRM_GEM_DMA_DRIVER_OPS
>> drivers/gpu/drm/apple/apple_drv.c:116:19: warning: no previous prototype for 'apple_plane_init' [-Wmissing-prototypes]
     116 | struct drm_plane *apple_plane_init(struct drm_device *dev,
         |                   ^~~~~~~~~~~~~~~~
--
>> drivers/gpu/drm/apple/parser.c:172:5: warning: no previous prototype for 'iterator_begin' [-Wmissing-prototypes]
     172 | int iterator_begin(struct dcp_parse_ctx *handle, struct iterator *it, bool dict)
         |     ^~~~~~~~~~~~~~


vim +/apple_plane_init +116 drivers/gpu/drm/apple/apple_drv.c

    45	
    46	static const struct drm_driver apple_drm_driver = {
  > 47		DRM_GEM_CMA_DRIVER_OPS,
    48		.name			= DRIVER_NAME,
    49		.desc			= DRIVER_DESC,
    50		.date			= "20210901",
    51		.major			= 1,
    52		.minor			= 0,
    53		.driver_features	= DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
    54		.fops			= &apple_fops,
    55	};
    56	
    57	static int apple_plane_atomic_check(struct drm_plane *plane,
    58					    struct drm_atomic_state *state)
    59	{
    60		struct drm_plane_state *new_plane_state;
    61		struct drm_crtc_state *crtc_state;
    62	
    63		new_plane_state = drm_atomic_get_new_plane_state(state, plane);
    64	
    65		if (!new_plane_state->crtc)
    66			return 0;
    67	
    68		crtc_state = drm_atomic_get_crtc_state(state, new_plane_state->crtc);
    69		if (IS_ERR(crtc_state))
    70			return PTR_ERR(crtc_state);
    71	
    72		/*
    73		 * DCP limits downscaling to 2x and upscaling to 4x. Attempting to
    74		 * scale outside these bounds errors out when swapping.
    75		 *
    76		 * This function also takes care of clipping the src/dest rectangles,
    77		 * which is required for correct operation. Partially off-screen
    78		 * surfaces may appear corrupted.
    79		 *
    80		 * DCP does not distinguish plane types in the hardware, so we set
    81		 * can_position. If the primary plane does not fill the screen, the
    82		 * hardware will fill in zeroes (black).
    83		 */
    84		return drm_atomic_helper_check_plane_state(new_plane_state,
    85							   crtc_state,
    86							   FRAC_16_16(1, 4),
    87							   FRAC_16_16(2, 1),
    88							   true, true);
    89	}
    90	
    91	static void apple_plane_atomic_update(struct drm_plane *plane,
    92					      struct drm_atomic_state *state)
    93	{
    94		/* Handled in atomic_flush */
    95	}
    96	
    97	static const struct drm_plane_helper_funcs apple_plane_helper_funcs = {
    98		.atomic_check	= apple_plane_atomic_check,
    99		.atomic_update	= apple_plane_atomic_update,
   100	};
   101	
   102	static const struct drm_plane_funcs apple_plane_funcs = {
   103		.update_plane		= drm_atomic_helper_update_plane,
   104		.disable_plane		= drm_atomic_helper_disable_plane,
   105		.destroy		= drm_plane_cleanup,
   106		.reset			= drm_atomic_helper_plane_reset,
   107		.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
   108		.atomic_destroy_state	= drm_atomic_helper_plane_destroy_state,
   109	};
   110	
   111	u64 apple_format_modifiers[] = {
   112		DRM_FORMAT_MOD_LINEAR,
   113		DRM_FORMAT_MOD_INVALID
   114	};
   115	
 > 116	struct drm_plane *apple_plane_init(struct drm_device *dev,
   117					   enum drm_plane_type type)
   118	{
   119		int ret;
   120		struct drm_plane *plane;
   121	
   122		plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL);
   123	
   124		ret = drm_universal_plane_init(dev, plane, 0x1, &apple_plane_funcs,
   125					       dcp_formats, ARRAY_SIZE(dcp_formats),
   126					       apple_format_modifiers, type, NULL);
   127		if (ret)
   128			return ERR_PTR(ret);
   129	
   130		drm_plane_helper_add(plane, &apple_plane_helper_funcs);
   131	
   132		return plane;
   133	}
   134	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (363092 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ