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_handle_deferred(xf86CrtcPtr crtc); 44uintptr_t radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client, 45 uint64_t id, void *data, 46 radeon_drm_handler_proc handler, 47 radeon_drm_abort_proc abort, 48 Bool is_flip); 49void radeon_drm_abort_client(ClientPtr client); 50void radeon_drm_abort_entry(uintptr_t seq); 51void radeon_drm_abort_id(uint64_t id); 52int radeon_drm_handle_event(int fd, drmEventContext *event_context); 53void radeon_drm_wait_pending_flip(xf86CrtcPtr crtc); 54void radeon_drm_queue_init(ScrnInfoPtr scrn); 55void radeon_drm_queue_close(ScrnInfoPtr scrn); 56 57#endif /* _RADEON_DRM_QUEUE_H_ */ 58