gbm-sdl2-example

diff src/drmtest.h @ 0:665119a0580e

example program that uses gbm buffers
author Eleni Maria Stea <eleni@mutantstargoat.com>
date Wed, 04 Jul 2018 22:16:23 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/drmtest.h	Wed Jul 04 22:16:23 2018 +0300
     1.3 @@ -0,0 +1,40 @@
     1.4 +/*
     1.5 + * Copyright © 2007 Intel Corporation
     1.6 + *
     1.7 + * Permission is hereby granted, free of charge, to any person obtaining a
     1.8 + * copy of this software and associated documentation files (the "Software"),
     1.9 + * to deal in the Software without restriction, including without limitation
    1.10 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    1.11 + * and/or sell copies of the Software, and to permit persons to whom the
    1.12 + * Software is furnished to do so, subject to the following conditions:
    1.13 + *
    1.14 + * The above copyright notice and this permission notice (including the next
    1.15 + * paragraph) shall be included in all copies or substantial portions of the
    1.16 + * Software.
    1.17 + *
    1.18 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.19 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.20 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    1.21 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.22 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    1.23 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    1.24 + * IN THE SOFTWARE.
    1.25 + *
    1.26 + * Authors:
    1.27 + *    Eric Anholt <eric@anholt.net>
    1.28 + *
    1.29 + */
    1.30 +
    1.31 +#include <stdio.h>
    1.32 +#include <stdlib.h>
    1.33 +#include <unistd.h>
    1.34 +#include <assert.h>
    1.35 +#include <errno.h>
    1.36 +
    1.37 +#include <xf86drm.h>
    1.38 +
    1.39 +#define DRM_TEST_MASTER 0x01
    1.40 +
    1.41 +int drm_open_any(void);
    1.42 +int drm_open_any_master(void);
    1.43 +int drm_open_matching(const char *pci_glob, int flags);