Hi all, This patch series is inspired by a WIP patch from Rob Clark to consolidate the drm_event handling a bit. I've went a bit further and also moved the pending event handling and unlinking into the core, which allows us to nuke a bunch of code from drivers who all copypasted this themselves. Plus fix up all the others who failed to handle this correctly. Net -500 lines of code, plus kerneldoc for drm_fops.c and all the new functions as bonus. Comments and review highly welcome as usual. Cheers, Daniel Daniel Vetter (21): 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/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 | 259 ++++++++++++++++++++++--- 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_drv.c | 29 --- 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 | 10 - drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 73 +------ drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 2 - include/drm/drmP.h | 26 ++- 45 files changed, 299 insertions(+), 582 deletions(-) -- 2.6.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx