linux/drivers/gpu/drm/msm/adreno
Rob Clark 774449ebcb drm/msm: fix locking inconsistencies in gpu->destroy()
In error paths, this was being called without struct_mutex held.
Leading to panics like:

  msm 1a00000.qcom,mdss_mdp: No memory protection without IOMMU
  Kernel panic - not syncing: BUG!
  CPU: 0 PID: 1409 Comm: cat Not tainted 4.0.0-dirty #4
  Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
  Call trace:
  [<ffffffc000089c78>] dump_backtrace+0x0/0x118
  [<ffffffc000089da0>] show_stack+0x10/0x20
  [<ffffffc0006686d4>] dump_stack+0x84/0xc4
  [<ffffffc0006678b4>] panic+0xd0/0x210
  [<ffffffc0003e1ce4>] drm_gem_object_free+0x5c/0x60
  [<ffffffc000402870>] adreno_gpu_cleanup+0x60/0x80
  [<ffffffc0004035a0>] a3xx_destroy+0x20/0x70
  [<ffffffc0004036f4>] a3xx_gpu_init+0x84/0x108
  [<ffffffc0004018b8>] adreno_load_gpu+0x58/0x190
  [<ffffffc000419dac>] msm_open+0x74/0x88
  [<ffffffc0003e0a48>] drm_open+0x168/0x400
  [<ffffffc0003e7210>] drm_stub_open+0xa8/0x118
  [<ffffffc0001a0e84>] chrdev_open+0x94/0x198
  [<ffffffc000199f88>] do_dentry_open+0x208/0x310
  [<ffffffc00019a4c4>] vfs_open+0x44/0x50
  [<ffffffc0001aa26c>] do_last.isra.14+0x2c4/0xc10
  [<ffffffc0001aac38>] path_openat+0x80/0x5e8
  [<ffffffc0001ac354>] do_filp_open+0x2c/0x98
  [<ffffffc00019b60c>] do_sys_open+0x13c/0x228
  [<ffffffc00019b72c>] SyS_openat+0xc/0x18
  CPU1: stopping

But there isn't any particularly good reason to hold struct_mutex for
teardown, so just standardize on calling it without the mutex held and
use the _unlocked() versions for GEM obj unref'ing

Signed-off-by: Rob Clark <robdclark@gmail.com>
2015-05-15 09:28:27 -04:00
..
a2xx.xml.h drm/msm: update generated headers 2015-02-01 15:30:33 -05:00
a3xx_gpu.c drm/msm: Handle register offset differences between a3xx and a4xx 2014-11-16 14:27:39 -05:00
a3xx_gpu.h drm/msm: update generated headers 2014-08-04 11:55:28 -04:00
a3xx.xml.h drm/msm: update generated headers 2015-02-01 15:30:33 -05:00
a4xx_gpu.c drm/msm: a4xx support for msm-drm 2014-11-16 14:27:40 -05:00
a4xx_gpu.h drm/msm: a4xx support for msm-drm 2014-11-16 14:27:40 -05:00
a4xx.xml.h drm/msm: update generated headers 2015-02-01 15:30:33 -05:00
adreno_common.xml.h drm/msm: update generated headers 2015-02-01 15:30:33 -05:00
adreno_device.c drm/msm: a4xx support for msm-drm 2014-11-16 14:27:40 -05:00
adreno_gpu.c drm/msm: fix locking inconsistencies in gpu->destroy() 2015-05-15 09:28:27 -04:00
adreno_gpu.h drm/msm: a4xx support for msm-drm 2014-11-16 14:27:40 -05:00
adreno_pm4.xml.h drm/msm: update generated headers 2015-02-01 15:30:33 -05:00