[staging:staging-next 433/443] drivers/staging/vboxvideo/vbox_mode.c:386:2-8: preceding lock on line 378 (fwd)

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

 



Hello,

Please check whether an unlock is needed before line 386.

thanks,
julia

---------- Forwarded message ----------
Date: Sun, 30 Sep 2018 01:57:53 +0800
From: kbuild test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxx
Cc: Julia Lawall <julia.lawall@xxxxxxx>
Subject: [staging:staging-next 433/443]
    drivers/staging/vboxvideo/vbox_mode.c:386:2-8: preceding lock on line 378

CC: kbuild-all@xxxxxx
CC: devel@xxxxxxxxxxxxxxxxxxxx
TO: Hans de Goede <hdegoede@xxxxxxxxxx>
CC: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
head:   e2c3860ba27d21f991bf9b81d64589f7c9e087c1
commit: 35f3288c453e25201a5de4d4b3dfb0fb37025de1 [433/443] staging: vboxvideo: Atomic phase 1: convert cursor to universal plane
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago

>> drivers/staging/vboxvideo/vbox_mode.c:386:2-8: preceding lock on line 378

# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=35f3288c453e25201a5de4d4b3dfb0fb37025de1
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 35f3288c453e25201a5de4d4b3dfb0fb37025de1
vim +386 drivers/staging/vboxvideo/vbox_mode.c

35f3288c Hans de Goede 2018-09-29  356
35f3288c Hans de Goede 2018-09-29  357  static void vbox_cursor_atomic_update(struct drm_plane *plane,
35f3288c Hans de Goede 2018-09-29  358  				      struct drm_plane_state *old_state)
35f3288c Hans de Goede 2018-09-29  359  {
35f3288c Hans de Goede 2018-09-29  360  	struct vbox_private *vbox =
35f3288c Hans de Goede 2018-09-29  361  		container_of(plane->dev, struct vbox_private, ddev);
35f3288c Hans de Goede 2018-09-29  362  	struct vbox_crtc *vbox_crtc = to_vbox_crtc(plane->state->crtc);
35f3288c Hans de Goede 2018-09-29  363  	struct drm_framebuffer *fb = plane->state->fb;
35f3288c Hans de Goede 2018-09-29  364  	struct vbox_bo *bo = gem_to_vbox_bo(to_vbox_framebuffer(fb)->obj);
35f3288c Hans de Goede 2018-09-29  365  	u32 width = plane->state->crtc_w;
35f3288c Hans de Goede 2018-09-29  366  	u32 height = plane->state->crtc_h;
35f3288c Hans de Goede 2018-09-29  367  	size_t data_size, mask_size;
35f3288c Hans de Goede 2018-09-29  368  	u32 flags;
35f3288c Hans de Goede 2018-09-29  369  	u8 *src;
35f3288c Hans de Goede 2018-09-29  370
35f3288c Hans de Goede 2018-09-29  371  	/*
35f3288c Hans de Goede 2018-09-29  372  	 * VirtualBox uses the host windowing system to draw the cursor so
35f3288c Hans de Goede 2018-09-29  373  	 * moves are a no-op, we only need to upload new cursor sprites.
35f3288c Hans de Goede 2018-09-29  374  	 */
35f3288c Hans de Goede 2018-09-29  375  	if (fb == old_state->fb)
35f3288c Hans de Goede 2018-09-29  376  		return;
35f3288c Hans de Goede 2018-09-29  377
35f3288c Hans de Goede 2018-09-29 @378  	mutex_lock(&vbox->hw_mutex);
35f3288c Hans de Goede 2018-09-29  379
35f3288c Hans de Goede 2018-09-29  380  	vbox_crtc->cursor_enabled = true;
35f3288c Hans de Goede 2018-09-29  381
35f3288c Hans de Goede 2018-09-29  382  	/* pinning is done in prepare/cleanup framebuffer */
35f3288c Hans de Goede 2018-09-29  383  	src = vbox_bo_kmap(bo);
35f3288c Hans de Goede 2018-09-29  384  	if (IS_ERR(src)) {
35f3288c Hans de Goede 2018-09-29  385  		DRM_WARN("Could not kmap cursor bo, skipping update\n");
35f3288c Hans de Goede 2018-09-29 @386  		return;
35f3288c Hans de Goede 2018-09-29  387  	}
35f3288c Hans de Goede 2018-09-29  388
35f3288c Hans de Goede 2018-09-29  389  	/*
35f3288c Hans de Goede 2018-09-29  390  	 * The mask must be calculated based on the alpha
35f3288c Hans de Goede 2018-09-29  391  	 * channel, one bit per ARGB word, and must be 32-bit
35f3288c Hans de Goede 2018-09-29  392  	 * padded.
35f3288c Hans de Goede 2018-09-29  393  	 */
35f3288c Hans de Goede 2018-09-29  394  	mask_size = ((width + 7) / 8 * height + 3) & ~3;
35f3288c Hans de Goede 2018-09-29  395  	data_size = width * height * 4 + mask_size;
35f3288c Hans de Goede 2018-09-29  396
35f3288c Hans de Goede 2018-09-29  397  	copy_cursor_image(src, vbox->cursor_data, width, height, mask_size);
35f3288c Hans de Goede 2018-09-29  398  	vbox_bo_kunmap(bo);
35f3288c Hans de Goede 2018-09-29  399
35f3288c Hans de Goede 2018-09-29  400  	flags = VBOX_MOUSE_POINTER_VISIBLE | VBOX_MOUSE_POINTER_SHAPE |
35f3288c Hans de Goede 2018-09-29  401  		VBOX_MOUSE_POINTER_ALPHA;
35f3288c Hans de Goede 2018-09-29  402  	hgsmi_update_pointer_shape(vbox->guest_pool, flags,
35f3288c Hans de Goede 2018-09-29  403  				   min_t(u32, max(fb->hot_x, 0), width),
35f3288c Hans de Goede 2018-09-29  404  				   min_t(u32, max(fb->hot_y, 0), height),
35f3288c Hans de Goede 2018-09-29  405  				   width, height, vbox->cursor_data, data_size);
35f3288c Hans de Goede 2018-09-29  406
35f3288c Hans de Goede 2018-09-29  407  	mutex_unlock(&vbox->hw_mutex);
35f3288c Hans de Goede 2018-09-29  408  }
35f3288c Hans de Goede 2018-09-29  409

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux