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: <202210240336.R8OueKBT-lkp@intel.com>
Date:   Mon, 24 Oct 2022 03:39:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Janne Grunau <j@...nau.net>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [asahilinux:gpu/rust-wip 1721/2027]
 drivers/gpu/drm/apple/apple_drv.c:192:6: warning: no previous prototype for
 'dcp_atomic_commit_tail'

tree:   https://github.com/AsahiLinux/linux gpu/rust-wip
head:   b7b1866d75e6b48630820b15ccc67dc198f8666f
commit: 5f18e9319ad268c5d72f39a5e5fdfa725941b99b [1721/2027] drm/apple: Switch to nonblocking commit handling
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/5f18e9319ad268c5d72f39a5e5fdfa725941b99b
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux gpu/rust-wip
        git checkout 5f18e9319ad268c5d72f39a5e5fdfa725941b99b
        # 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/apple_drv.c:192:6: warning: no previous prototype for 'dcp_atomic_commit_tail' [-Wmissing-prototypes]
     192 | void dcp_atomic_commit_tail(struct drm_atomic_state *old_state)
         |      ^~~~~~~~~~~~~~~~~~~~~~


vim +/dcp_atomic_commit_tail +192 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	
   135	static int apple_enable_vblank(struct drm_crtc *crtc)
   136	{
   137		to_apple_crtc(crtc)->vsync_disabled = false;
   138	
   139		return 0;
   140	}
   141	
   142	static void apple_disable_vblank(struct drm_crtc *crtc)
   143	{
   144		to_apple_crtc(crtc)->vsync_disabled = true;
   145	}
   146	
   147	static enum drm_connector_status
   148	apple_connector_detect(struct drm_connector *connector, bool force)
   149	{
   150		struct apple_connector *apple_connector = to_apple_connector(connector);
   151	
   152		return apple_connector->connected ? connector_status_connected :
   153							  connector_status_disconnected;
   154	}
   155	
   156	static void apple_crtc_atomic_enable(struct drm_crtc *crtc,
   157					     struct drm_atomic_state *state)
   158	{
   159		drm_crtc_vblank_on(crtc);
   160	}
   161	
   162	static void apple_crtc_atomic_disable(struct drm_crtc *crtc,
   163					      struct drm_atomic_state *state)
   164	{
   165		drm_crtc_vblank_off(crtc);
   166	
   167		if (crtc->state->event && !crtc->state->active) {
   168			spin_lock_irq(&crtc->dev->event_lock);
   169			drm_crtc_send_vblank_event(crtc, crtc->state->event);
   170			spin_unlock_irq(&crtc->dev->event_lock);
   171	
   172			crtc->state->event = NULL;
   173		}
   174	}
   175	
   176	static void apple_crtc_atomic_begin(struct drm_crtc *crtc,
   177					    struct drm_atomic_state *state)
   178	{
   179		struct apple_crtc *apple_crtc = to_apple_crtc(crtc);
   180		unsigned long flags;
   181	
   182		if (crtc->state->event) {
   183			WARN_ON(drm_crtc_vblank_get(crtc) != 0);
   184	
   185			spin_lock_irqsave(&crtc->dev->event_lock, flags);
   186			apple_crtc->event = crtc->state->event;
   187			spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
   188			crtc->state->event = NULL;
   189		}
   190	}
   191	
 > 192	void dcp_atomic_commit_tail(struct drm_atomic_state *old_state)
   193	{
   194		struct drm_device *dev = old_state->dev;
   195	
   196		drm_atomic_helper_commit_modeset_disables(dev, old_state);
   197	
   198		drm_atomic_helper_commit_modeset_enables(dev, old_state);
   199	
   200		drm_atomic_helper_commit_planes(dev, old_state,
   201						DRM_PLANE_COMMIT_ACTIVE_ONLY);
   202	
   203		drm_atomic_helper_fake_vblank(old_state);
   204	
   205		drm_atomic_helper_commit_hw_done(old_state);
   206	
   207		drm_atomic_helper_wait_for_flip_done(dev, old_state);
   208	
   209		drm_atomic_helper_cleanup_planes(dev, old_state);
   210	}
   211	

-- 
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