diff options
author | John Stultz <john.stultz@linaro.org> | 2013-09-26 21:05:54 +0200 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-09-26 21:05:54 +0200 |
commit | 17deb9c2db01c7813611291d251d8c7dbdfd3c9d (patch) | |
tree | 6e023c0be7c64de84dd51a671eb09c5c82b56615 /drivers/gpu/drm/drm_dma.c | |
parent | clocksource: vf_pit_timer: Switch to sched_clock_register() (diff) | |
parent | Merge branch 'fortglx/3.12/time' into fortglx/3.13/time (diff) | |
download | linux-17deb9c2db01c7813611291d251d8c7dbdfd3c9d.tar.xz linux-17deb9c2db01c7813611291d251d8c7dbdfd3c9d.zip |
Merge remote-tracking branch 'tip/timers/core' into fordlezcano/3.13/sched-clock64-conversion
Update to tip/timers/core and resolve minor conflict.
Conflicts:
drivers/clocksource/samsung_pwm_timer.c
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/drm_dma.c')
-rw-r--r-- | drivers/gpu/drm/drm_dma.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c index 495b5fd2787c..8a140a953754 100644 --- a/drivers/gpu/drm/drm_dma.c +++ b/drivers/gpu/drm/drm_dma.c @@ -44,10 +44,18 @@ * * Allocate and initialize a drm_device_dma structure. */ -int drm_dma_setup(struct drm_device *dev) +int drm_legacy_dma_setup(struct drm_device *dev) { int i; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA) || + drm_core_check_feature(dev, DRIVER_MODESET)) { + return 0; + } + + dev->buf_use = 0; + atomic_set(&dev->buf_alloc, 0); + dev->dma = kzalloc(sizeof(*dev->dma), GFP_KERNEL); if (!dev->dma) return -ENOMEM; @@ -66,11 +74,16 @@ int drm_dma_setup(struct drm_device *dev) * Free all pages associated with DMA buffers, the buffers and pages lists, and * finally the drm_device::dma structure itself. */ -void drm_dma_takedown(struct drm_device *dev) +void drm_legacy_dma_takedown(struct drm_device *dev) { struct drm_device_dma *dma = dev->dma; int i, j; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA) || + drm_core_check_feature(dev, DRIVER_MODESET)) { + return; + } + if (!dma) return; |