diff options
author | Dave Airlie <airlied@redhat.com> | 2015-10-20 01:01:49 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-10-20 01:01:49 +0200 |
commit | affa0e033b04996700434312c76df3c78f683870 (patch) | |
tree | 4d67cd508404360dccd4dbd0f7bf71059eb7624c /include/drm/drm_gem.h | |
parent | Merge tag 'drm-intel-next-2015-10-10' of git://anongit.freedesktop.org/drm-in... (diff) | |
parent | drm/fb-helper: Fix fb refcounting in pan_display_atomic (diff) | |
download | linux-affa0e033b04996700434312c76df3c78f683870.tar.xz linux-affa0e033b04996700434312c76df3c78f683870.zip |
Merge tag 'topic/drm-misc-2015-10-19' of git://anongit.freedesktop.org/drm-intel into drm-next
More drm-misc for 4.4.
- fb refcount fix in atomic fbdev
- various locking reworks to reduce drm_global_mutex and dev->struct_mutex
- rename docbook to gpu.tmpl and include vga_switcheroo stuff, plus more
vga_switcheroo (Lukas Wunner)
- viewport check fixes for atomic drivers from Ville
- DRM_DEBUG_VBL from Ville
- non-contentious header fixes from Mikko Rapeli
- small things all over
* tag 'topic/drm-misc-2015-10-19' of git://anongit.freedesktop.org/drm-intel: (31 commits)
drm/fb-helper: Fix fb refcounting in pan_display_atomic
drm/fb-helper: Set plane rotation directly
drm: fix mutex leak in drm_dp_get_mst_branch_device
drm: Check plane src coordinates correctly during page flip for atomic drivers
drm: Check crtc viewport correctly with rotated primary plane on atomic drivers
drm: Refactor plane src coordinate checks
drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane
drm: Don't leak fb when plane crtc coodinates are bad
ALSA: hda - Spell vga_switcheroo consistently
drm/gem: Use kref_get_unless_zero for the weak mmap references
drm/vgem: Drop vgem_drm_gem_mmap
drm: Fix return value of drm_framebuffer_init()
drm/gem: Use container_of in drm_gem_object_free
drm/gem: Check locking in drm_gem_object_unreference
drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj
drm/i810_drm.h: include drm/drm.h
r128_drm.h: include drm/drm.h
savage_drm.h: include <drm/drm.h>
gpu/doc: Convert to markdown harder
gpu/doc: Add vga_switcheroo documentation
...
Diffstat (limited to 'include/drm/drm_gem.h')
-rw-r--r-- | include/drm/drm_gem.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index 7a592d7e398b..15e7f007380f 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -142,8 +142,11 @@ drm_gem_object_reference(struct drm_gem_object *obj) static inline void drm_gem_object_unreference(struct drm_gem_object *obj) { - if (obj != NULL) + if (obj != NULL) { + WARN_ON(!mutex_is_locked(&obj->dev->struct_mutex)); + kref_put(&obj->refcount, drm_gem_object_free); + } } static inline void |