diff options
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_irq.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index 1e1b7f4d..eea00ac8 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -117,18 +117,18 @@ int drm_vblank_init(drm_device_t *dev, int num_crtcs) if (!dev->vblank_refcount) goto err; - dev->last_vblank = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->last_vblank = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->last_vblank) goto err; - dev->vblank_premodeset = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->vblank_premodeset = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->vblank_premodeset) goto err; - dev->vblank_offset = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->vblank_offset = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->vblank_offset) goto err; @@ -138,9 +138,6 @@ int drm_vblank_init(drm_device_t *dev, int num_crtcs) INIT_LIST_HEAD(&dev->vbl_sigs[i]); atomic_set(&dev->_vblank_count[i], 0); atomic_set(&dev->vblank_refcount[i], 0); - dev->last_vblank[i] = 0; - dev->vblank_premodeset[i] = 0; - dev->vblank_offset[i] = 0; } return 0; @@ -570,7 +567,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) return ret; DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, (((cur_vblank = drm_vblank_count(dev, crtc)) - - seq) <= (1 << 23))); + - vblwait.request.sequence) <= (1 << 23))); drm_vblank_put(dev, crtc); do_gettimeofday(&now); vblwait.reply.tval_sec = now.tv_sec; |