/*
* Copyright © 2007 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Dave Airlie <airlied@redhat.com>
*
*/
#ifndef DRMMODE_DISPLAY_H
#define DRMMODE_DISPLAY_H
#include "xf86drmMode.h"
#ifdef CONFIG_UDEV_KMS
#include "libudev.h"
#endif
#include "dumb_bo.h"
struct gbm_device;
typedef struct {
#ifdef GLAMOR_HAS_GBM
#endif
} drmmode_bo;
typedef struct {
int fd;
unsigned fb_id;
unsigned old_fb_id;
int cpp;
#ifdef CONFIG_UDEV_KMS
#endif
void *shadow_fb;
/**
* A screen-sized pixmap when we're doing triple-buffered DRI2
* pageflipping.
*
* One is shared between all drawables that flip to the front
* buffer, and it only gets reallocated when root pixmap size
* changes.
*/
/** The GEM name for triple_buffer_pixmap */
typedef struct {
int dpms_mode;
unsigned rotate_fb_id;
/**
* @{ MSC (vblank count) handling for the PRESENT extension.
*
* The kernel's vblank counters are 32 bits and apparently full of
* lies, and we need to give a reliable 64-bit msc for GL, so we
* have to track and convert to a userland-tracked 64-bit msc.
*/
/** @} */
typedef struct {
typedef struct {
int output_id;
int dpms_enum_id;
int num_props;
int enc_mask;
int enc_clone_mask;
typedef struct _msPixmapPriv {
#define msGetPixmapPriv(drmmode, p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &(drmmode)->pixmapPrivateKeyRec))
#ifndef DRM_CAP_DUMB_PREFERRED_DEPTH
#endif
#ifndef DRM_CAP_DUMB_PREFER_SHADOW
#endif
#define MS_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#endif