linux-stable/drivers/gpu/drm/qxl
Frediano Ziglio e07154e28c drm/qxl: Move main reference counter to GEM object instead of TTM ones
qxl_bo structure has two reference counters, one in the GEM object and
another in the TTM object. The GEM object keep a counter to the TTM object
so when GEM counter reached zero the TTM counter (using qxl_bo_unref) was
decremented. The qxl object is fully freed (both GEM and TTM part are cleaned)
when the TTM counter reach zero.
One issue was that surface idr structure has no owning on qxl_bo objects however
it contains a pointer to qxl_bo object. This caused some nasty race condition
for instance qxl_bo object was reaped even after counter was already zero.
This patch fix these races moving main counter (the one used by qxl_bo_(un)ref)
to GEM object which cleanup routine (qxl_gem_object_free) remove the idr pointer
(using qxl_surface_evict) when the counters are still valid.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:51 +10:00
..
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-01-22 21:21:55 -08:00
Makefile drm/qxl: enables gem prime helpers for qxl using dummy driver callbacks 2014-09-03 15:36:52 +10:00
qxl_cmd.c drm/qxl: Remove format string errors 2015-06-05 11:00:51 +10:00
qxl_debugfs.c drm/qxl: Remove release_lock stupidity 2014-09-03 17:09:11 +02:00
qxl_dev.h
qxl_display.c drm/qxl: Remove format string errors 2015-06-05 11:00:51 +10:00
qxl_draw.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_drv.c drm/qxl: Fix qxl_noop_get_vblank_counter() 2015-05-04 11:14:55 +02:00
qxl_drv.h drm/qxl: Remove format string errors 2015-06-05 11:00:51 +10:00
qxl_dumb.c drm/gem: create drm_gem_dumb_destroy 2013-08-07 09:59:24 +10:00
qxl_fb.c drm/qxl: rewrite framebuffer support 2015-05-07 13:09:25 +10:00
qxl_gem.c drm/qxl: Move main reference counter to GEM object instead of TTM ones 2015-06-05 11:00:51 +10:00
qxl_image.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_ioctl.c drm/qxl: Avoid double free on error 2015-06-05 11:00:49 +10:00
qxl_irq.c drm/qxl: return IRQ_NONE if it was not our irq 2014-07-17 08:08:06 +10:00
qxl_kms.c drm/qxl: simple crtc page flipping emulated using buffer copy 2014-09-03 15:35:27 +10:00
qxl_object.c drm/qxl: Move main reference counter to GEM object instead of TTM ones 2015-06-05 11:00:51 +10:00
qxl_object.h drm/ttm: flip the switch, and convert to dma_fence 2014-09-02 16:41:50 +02:00
qxl_prime.c drm: Pass dma-buf as argument to gem_prime_import_sg_table 2014-09-30 14:04:00 +02:00
qxl_release.c drm/qxl: Remove format string errors 2015-06-05 11:00:51 +10:00
qxl_ttm.c drm/<ttm-based-drivers>: Don't call drm_mmap 2014-09-24 11:42:51 +10:00