OpenCloudOS-Kernel/drivers/gpu/drm
Gabriel Krisman Bertazi 4fa13dbe8c drm: bochs: Don't remove uninitialized fbdev framebuffer
In the same spirit of the fix for QXL in commit 861078381b ("drm: qxl:
Don't alloc fbdev if emulation is not supported"), prevent the Oops in
the unbind path of Bochs if fbdev emulation is disabled.

[  112.176009] Oops: 0002 [#1] SMP
[  112.176009] Modules linked in: bochs_drm
[  112.176009] CPU: 0 PID: 3002 Comm: bash Not tainted 4.11.0-rc1+ #111
[  112.176009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[  112.176009] task: ffff8800743bbac0 task.stack: ffffc90000b5c000
[  112.176009] RIP: 0010:mutex_lock+0x18/0x30
[  112.176009] RSP: 0018:ffffc90000b5fc78 EFLAGS: 00010246
[  112.176009] RAX: 0000000000000000 RBX: 0000000000000260 RCX: 0000000000000000
[  112.176009] RDX: ffff8800743bbac0 RSI: ffff8800787176e0 RDI: 0000000000000260
[  112.176009] RBP: ffffc90000b5fc80 R08: ffffffff00000000 R09: 00000000ffffffff
[  112.176009] R10: ffff88007b463650 R11: 0000000000000000 R12: 0000000000000260
[  112.176009] R13: ffff8800787176e0 R14: ffffffffa0003068 R15: 0000000000000060
[  112.176009] FS:  00007f20564c7b40(0000) GS:ffff88007ce00000(0000) knlGS:0000000000000000
[  112.176009] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  112.176009] CR2: 0000000000000260 CR3: 000000006b89c000 CR4: 00000000000006f0
[  112.176009] Call Trace:
[  112.176009]  drm_mode_object_unregister+0x1e/0x50
[  112.176009]  drm_framebuffer_unregister_private+0x15/0x20
[  112.176009]  bochs_fbdev_fini+0x57/0x70 [bochs_drm]
[  112.176009]  bochs_unload+0x16/0x50 [bochs_drm]
[  112.176009]  drm_dev_unregister+0x37/0xd0
[  112.176009]  drm_put_dev+0x31/0x60
[  112.176009]  bochs_pci_remove+0x10/0x20 [bochs_drm]
[  112.176009]  pci_device_remove+0x34/0xb0
[  112.176009]  device_release_driver_internal+0x150/0x200
[  112.176009]  device_release_driver+0xd/0x10
[  112.176009]  unbind_store+0x108/0x150
[  112.176009]  drv_attr_store+0x20/0x30
[  112.176009]  sysfs_kf_write+0x32/0x40
[  112.176009]  kernfs_fop_write+0x10b/0x190
[  112.176009]  __vfs_write+0x23/0x120
[  112.176009]  ? security_file_permission+0x36/0xb0
[  112.176009]  ? rw_verify_area+0x49/0xb0
[  112.176009]  vfs_write+0xb0/0x190
[  112.176009]  SyS_write+0x41/0xa0
[  112.176009]  entry_SYSCALL_64_fastpath+0x1a/0xa9
[  112.176009] RIP: 0033:0x7f2055bd5620
[  112.176009] RSP: 002b:00007ffed2f487d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  112.176009] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2055bd5620
[  112.176009] RDX: 000000000000000d RSI: 0000000000ee0008 RDI: 0000000000000001
[  112.176009] RBP: 0000000000000001 R08: 00007f2055e94760 R09: 00007f20564c7b40
[  112.176009] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000000
[  112.176009] R13: 00007ffed2f48d70 R14: 0000000000000000 R15: 0000000000000000
[  112.176009] Code: 00 00 00 55 be 02 00 00 00 48 89 e5 e8 62 fb ff ff 5d c3 55 48 89 e5 53 48 89 fb e8 53 e9 ff ff 65 48 8b 14 25 40 c4 00 00 31 c0 <f0> 48 0f b1 13 48 85 c0 74 08 48 89 df e8c6 ff ff ff 5b 5d c3
[  112.176009] RIP: mutex_lock+0x18/0x30 RSP: ffffc90000b5fc78
[  112.176009] CR2: 0000000000000260
[  112.205622] ---[ end trace 76189cd7a9bdd155 ]---

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317181409.4183-1-krisman@collabora.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-03-20 10:51:39 +01:00
..
amd Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
arc drm: remove drm_vblank_no_hw_counter assignment from driver code 2017-02-07 21:43:55 +01:00
arm drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
armada Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
ast Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
atmel-hlcdc drm/atmel-hlcdc: Fix suspend/resume implementation 2017-03-16 11:23:59 +01:00
bochs drm: bochs: Don't remove uninitialized fbdev framebuffer 2017-03-20 10:51:39 +01:00
bridge drm: bridge: dw-hdmi: Move the driver to a separate directory. 2017-03-10 16:32:54 +05:30
cirrus drm/fb-helper: Automatically clean up fb_info 2017-02-07 21:36:28 +01:00
etnaviv sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:40 +01:00
exynos Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
fsl-dcu drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
gma500 Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
hisilicon drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
i2c
i810 drm/i810: drop device_is_agp callback 2017-01-26 10:44:43 +01:00
i915 Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
imx drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
lib drm: Add a simple generator of random permutations 2016-12-27 12:34:00 +01:00
mediatek drm: mediatek: use vblank hooks in struct drm_crtc_funcs 2017-02-21 11:17:54 -05:00
meson drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
mga lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
mgag200 gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-01 09:44:11 +01:00
msm Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
mxsfb drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
nouveau Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
omapdrm Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
panel drm/panel: simple: Specify bus width and flags for EDT displays 2017-01-26 10:57:18 +01:00
qxl Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
r128 gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-01 09:44:11 +01:00
radeon Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
rcar-du drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
rockchip Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
savage drm: Change the return type of the unload hook to void 2017-01-09 11:25:22 +01:00
selftests drm: kselftest: fix spelling mistake: "misalinged" -> "misaligned" 2017-02-26 22:54:47 +01:00
shmobile drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
sis drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
sti drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
sun4i drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
tdfx
tegra Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
tilcdc drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers 2017-03-14 14:38:34 +01:00
tinydrm Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
ttm Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
udl Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
vc4 drm: vc4: remove redundant check of plane being non-null 2017-03-17 16:44:14 -07:00
vgem Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
via drm/via: use get_user_pages_unlocked() 2017-02-28 10:00:50 +01:00
virtio Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
vmwgfx Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
zte Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
Kconfig drm/fb-helper: Add multi buffer support for cma fbdev 2017-02-26 22:11:37 +01:00
Makefile Merge branch 'drm/next/platform' of git://linuxtv.org/pinchartl/media into drm-misc-next 2017-03-11 11:46:03 +01:00
ati_pcigart.c
drm_agpsupport.c drm/i810: drop device_is_agp callback 2017-01-26 10:44:43 +01:00
drm_atomic.c drm/atomic: Convert get_existing_state callers to get_old/new_state, v4. 2017-03-06 11:43:05 +01:00
drm_atomic_helper.c drm/atomic: Convert get_existing_state callers to get_old/new_state, v4. 2017-03-06 11:43:05 +01:00
drm_auth.c drm/core: Use recommened kerneldoc for struct member refs 2017-01-25 16:22:42 +01:00
drm_blend.c drm/blend: Use new atomic iterator macros. 2017-03-06 11:43:43 +01:00
drm_bridge.c drm/bridge: Use recommened kerneldoc for struct member refs 2017-01-02 09:17:26 +01:00
drm_bufs.c
drm_cache.c gpu: drm: core: Convert printk(KERN_<LEVEL> to pr_<level> 2017-02-28 14:32:19 +01:00
drm_color_mgmt.c drm/color: un-inline drm_color_lut_extract() 2017-01-31 15:31:58 +02:00
drm_connector.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_context.c
drm_crtc.c drm: Introduce drm_framebuffer_{get,put}() 2017-02-28 16:15:03 +01:00
drm_crtc_helper.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_crtc_helper_internal.h
drm_crtc_internal.h drm: Rename drm_mode_object_get() 2017-02-28 16:14:53 +01:00
drm_debugfs.c drm/debugfs: Remove the drm_driver.debugfs_cleanup callback 2017-03-08 11:29:08 +01:00
drm_debugfs_crc.c drm: crc: Call wake_up_interruptible() each time there is a new CRC entry 2017-01-06 15:23:19 +01:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c drm: Add name for DRM_DP_DUAL_MODE_LSPCON 2017-02-23 11:06:12 -05:00
drm_dp_helper.c drm/dp: Add missing description to parameter 2017-03-07 16:38:16 -05:00
drm_dp_mst_topology.c Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
drm_drv.c Linux 4.10-rc8 2017-02-23 12:10:12 +10:00
drm_dumb_buffers.c drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_edid.c gpu: drm: core: Convert printk(KERN_<LEVEL> to pr_<level> 2017-02-28 14:32:19 +01:00
drm_edid_load.c drm: move edid property update and add modes out of edid firmware loader 2017-02-21 15:41:24 +02:00
drm_encoder.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_encoder_slave.c drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_fb_cma_helper.c drm: Update drm_fbdev_cma_init documentation 2017-03-01 23:52:35 +01:00
drm_fb_helper.c drm/fb-helper: implement ioctl FBIO_WAITFORVSYNC 2017-03-02 08:12:15 +01:00
drm_file.c drm/gem: Add DEFINE_DRM_GEM_FOPS 2017-03-14 14:38:34 +01:00
drm_flip_work.c
drm_fourcc.c
drm_framebuffer.c drm: Introduce drm_framebuffer_{get,put}() 2017-02-28 16:15:03 +01:00
drm_gem.c drm: Introduce drm_gem_object_{get,put}() 2017-02-28 16:16:43 +01:00
drm_gem_cma_helper.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_global.c drm: Update TTM initialization documentation 2016-12-30 12:52:10 +01:00
drm_hashtab.c
drm_info.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00
drm_internal.h drm: rename drm_fops.c to drm_file.c 2017-03-09 16:18:02 +01:00
drm_ioc32.c gpu: drm: core: Convert printk(KERN_<LEVEL> to pr_<level> 2017-02-28 14:32:19 +01:00
drm_ioctl.c drm: Export drm_ioctl_permit to kernel-doc 2016-12-30 12:40:48 +01:00
drm_irq.c drm: Skip the waitqueue setup for vblank queries 2017-03-16 09:51:55 +01:00
drm_kms_helper_common.c drm: Remove drmP.h include from drm_kms_helper_common.c 2017-03-09 16:18:02 +01:00
drm_legacy.h drm: compile drm_vm.c only when needed 2017-01-06 11:03:07 +01:00
drm_lock.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: Micro-optimise drm_mm_for_each_node_in_range() 2017-02-06 16:57:37 +01:00
drm_mode_config.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_mode_object.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_modes.c drm: Rename drm_mode_object_get() 2017-02-28 16:14:53 +01:00
drm_modeset_helper.c drm: Convert all helpers to drm_connector_list_iter 2016-12-18 14:33:22 +01:00
drm_modeset_lock.c drm/kms-core: Use recommened kerneldoc for struct member refs 2017-01-25 16:30:34 +01:00
drm_of.c drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> 2016-12-18 16:29:29 +05:30
drm_panel.c drm/panel: Constify device node argument to of_drm_find_panel() 2017-01-04 08:30:37 +01:00
drm_pci.c drm: Extract drm_pci.h 2017-03-09 16:18:02 +01:00
drm_plane.c drm: Introduce drm_framebuffer_{get,put}() 2017-02-28 16:15:03 +01:00
drm_plane_helper.c drm/atomic: Make drm_atomic_plane_disabling easier to understand. 2017-03-06 11:41:55 +01:00
drm_prime.c drm: Extract drm_prime.h 2017-03-09 16:18:02 +01:00
drm_print.c drm: drm_printer: add __printf validation 2017-02-26 21:43:08 +01:00
drm_probe_helper.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_property.c drm: Introduce drm_property_blob_{get,put}() 2017-02-28 16:16:46 +01:00
drm_rect.c drm/rect: Fix formatting of example code 2016-12-30 13:35:54 +01:00
drm_scatter.c
drm_simple_kms_helper.c drm/atomic: Convert get_existing_state callers to get_old/new_state, v4. 2017-03-06 11:43:05 +01:00
drm_sysfs.c drm/core: Use recommened kerneldoc for struct member refs 2017-01-25 16:22:42 +01:00
drm_trace.h drm: Remove drm_pending_event->pid 2017-03-14 14:38:33 +01:00
drm_trace_points.c
drm_vm.c drm: remove unnecessary fault wrappers 2017-02-24 17:46:55 -08:00
drm_vma_manager.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00