Hi all, Mostly just small changes from review feedback (plus a few misplaced hunks, silly me). Plus an attempt at better kerneldoc to explain how this works. Since that caused questions both from Thomas and Laurent let me explain things also here: Currently anyone using drm_events (vblank code, atomic/legacy flips, drivers like exynos) need to handle event setup, sending to the drm file and handling when the drm file disappears themselves. This patch series provides functions to encapsulate all these steps. Furthermore the file closing is handled differently: Events are no longer completely destroyed in preclose hooks like all current users do, but instead they're just unlinked from the file. The new drm_send_event can still be called, but instead of transmitting the event to the file it'll destroy it right away. This means that when the drm file disappears it's entirely transparent to drivers, and we can remove all the special tracking and cleanup code around preclose functions. The other consequence is that it's opt-in - drivers are still free to remove events explicitly when the file disappears, it's just needless code. Which means the patch series can be split up really nicely into core parts + driver patches. The only patch I didn't split up in this fashion is the one that creates drm_send_event - it's imo easier to review this way, and the driver changes are really simple. Cheers, Daniel Daniel Vetter (22): drm: kerneldoc for drm_fops.c drm: Add functions to setup/tear down drm_events. drm/exynos: Use the new event init/free functions drm/vmwgfx: Use the new event init/free functions drm: Create drm_send_event helpers drm/fsl: Remove preclose hook drm/armada: Remove NULL open/pre/postclose hooks drm/gma500: Remove empty preclose hook drm: Clean up pending events in the core drm: Nuke vblank event file cleanup code drm/i915: Nuke intel_modeset_preclose drm/atmel: Nuke preclose drm/exynos: Remove event cancelling from postclose drm/imx: Unconfuse preclose logic drm/msm: Nuke preclose hooks drm/omap: Nuke close hooks drm/rcar: Nuke preclose hook drm/shmob: Nuke preclose hook drm/tegra: Stop cancelling page flip events drm/tilcdc: Nuke preclose hook drm/vc4: Nuke preclose hook drm/vmwgfx: Nuke preclose hook Documentation/DocBook/gpu.tmpl | 48 +---- drivers/gpu/drm/armada/armada_drv.c | 3 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 18 -- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 10 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 3 - drivers/gpu/drm/drm_atomic.c | 44 +--- drivers/gpu/drm/drm_crtc.c | 36 +--- drivers/gpu/drm/drm_fops.c | 271 ++++++++++++++++++++++--- drivers/gpu/drm/drm_irq.c | 7 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 14 -- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 36 +--- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 28 +-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 5 - drivers/gpu/drm/gma500/psb_drv.c | 9 - drivers/gpu/drm/i915/i915_dma.c | 2 - drivers/gpu/drm/i915/intel_display.c | 21 -- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 13 -- drivers/gpu/drm/imx/ipuv3-crtc.c | 4 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 7 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 11 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 6 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 11 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 - drivers/gpu/drm/omapdrm/omap_crtc.c | 13 +- drivers/gpu/drm/omapdrm/omap_drv.c | 41 ---- drivers/gpu/drm/omapdrm/omap_drv.h | 1 - drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 20 -- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 2 - drivers/gpu/drm/rcar-du/rcar_du_drv.c | 10 - drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 20 -- drivers/gpu/drm/shmobile/shmob_drm_crtc.h | 2 - drivers/gpu/drm/shmobile/shmob_drm_drv.c | 8 - drivers/gpu/drm/tegra/dc.c | 17 -- drivers/gpu/drm/tegra/drm.c | 3 - drivers/gpu/drm/tegra/drm.h | 1 - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20 -- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 - drivers/gpu/drm/vc4/vc4_crtc.c | 20 -- drivers/gpu/drm/vc4/vc4_drv.c | 10 - drivers/gpu/drm/vc4/vc4_drv.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 11 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 87 +------- drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 2 - include/drm/drmP.h | 26 ++- 48 files changed, 312 insertions(+), 623 deletions(-) -- 2.6.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx