radeon_drm_queue.h revision 7314432e
1/* 2 * Copyright © 2007 Red Hat, Inc. 3 * Copyright © 2015 Advanced Micro Devices, Inc. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice (including the next 13 * paragraph) shall be included in all copies or substantial portions of the 14 * Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 * SOFTWARE. 23 * 24 * Authors: 25 * Dave Airlie <airlied@redhat.com> 26 * 27 */ 28 29#ifndef _RADEON_DRM_QUEUE_H_ 30#define _RADEON_DRM_QUEUE_H_ 31 32#define RADEON_DRM_QUEUE_ERROR 0 33 34#define RADEON_DRM_QUEUE_CLIENT_DEFAULT serverClient 35#define RADEON_DRM_QUEUE_ID_DEFAULT ~0ULL 36 37struct radeon_drm_queue_entry; 38 39typedef void (*radeon_drm_handler_proc)(xf86CrtcPtr crtc, uint32_t seq, 40 uint64_t usec, void *data); 41typedef void (*radeon_drm_abort_proc)(xf86CrtcPtr crtc, void *data); 42 43void radeon_drm_queue_handler(int fd, unsigned int frame, 44 unsigned int tv_sec, unsigned int tv_usec, 45 void *user_ptr); 46uintptr_t radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client, 47 uint64_t id, void *data, 48 radeon_drm_handler_proc handler, 49 radeon_drm_abort_proc abort); 50void radeon_drm_abort_client(ClientPtr client); 51void radeon_drm_abort_entry(uintptr_t seq); 52void radeon_drm_abort_id(uint64_t id); 53void radeon_drm_queue_init(); 54void radeon_drm_queue_close(ScrnInfoPtr scrn); 55 56#endif /* _RADEON_DRM_QUEUE_H_ */ 57