7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync/*
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Copyright © 2007 Intel Corporation
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync *
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * copy of this software and associated documentation files (the "Software"),
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * to deal in the Software without restriction, including without limitation
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * and/or sell copies of the Software, and to permit persons to whom the
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Software is furnished to do so, subject to the following conditions:
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync *
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * The above copyright notice and this permission notice (including the next
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * paragraph) shall be included in all copies or substantial portions of the
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Software.
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync *
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * IN THE SOFTWARE.
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync *
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Authors:
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync * Eric Anholt <eric@anholt.net>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync *
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync */
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include <stdio.h>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include <stdlib.h>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include <unistd.h>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include <assert.h>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include <errno.h>
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#include "xf86drm.h"
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync#define DRM_TEST_MASTER 0x01
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsync
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsyncint drm_open_any(void);
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsyncint drm_open_any_master(void);
7a0d67332f33bc21290d63bc7c8150b0cf0a4b21vboxsyncint drm_open_matching(const char *pci_glob, int flags);