1450N/A/*
1450N/A * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
1450N/A */
1450N/A
1450N/A/*
1450N/A * Copyright (c) 2012 Intel Corporation. All rights reserved.
1450N/A */
1450N/A
1450N/A/*
1450N/A * \file drm_sarea.h
1450N/A * \brief SAREA definitions
1450N/A *
1450N/A * \author Michel D�zer <michel@daenzer.net>
1450N/A */
1450N/A
1450N/A/*
1450N/A * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
1450N/A * All Rights Reserved.
1450N/A *
1450N/A * Permission is hereby granted, free of charge, to any person obtaining a
1450N/A * copy of this software and associated documentation files (the "Software"),
1450N/A * to deal in the Software without restriction, including without limitation
1450N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1450N/A * and/or sell copies of the Software, and to permit persons to whom the
1450N/A * Software is furnished to do so, subject to the following conditions:
1450N/A *
1450N/A * The above copyright notice and this permission notice (including the next
1450N/A * paragraph) shall be included in all copies or substantial portions of the
1450N/A * Software.
1450N/A *
1450N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1450N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1450N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1450N/A * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
1450N/A * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1450N/A * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1450N/A * OTHER DEALINGS IN THE SOFTWARE.
1450N/A */
1450N/A
1450N/A#ifndef _DRM_SAREA_H_
1450N/A#define _DRM_SAREA_H_
1450N/A
1450N/A#include "drm.h"
1450N/A
1450N/A/* SAREA area needs to be at least a page */
1450N/A#if defined(__alpha__)
1450N/A#define SAREA_MAX 0x2000U
1450N/A#elif defined(__ia64__)
1450N/A#define SAREA_MAX 0x10000U /* 64kB */
1450N/A#else
1450N/A/* Intel 830M driver needs at least 8k SAREA */
1450N/A#define SAREA_MAX 0x2000UL
1450N/A#endif
1450N/A
1450N/A/** Maximum number of drawables in the SAREA */
1450N/A#define SAREA_MAX_DRAWABLES 256
1450N/A
1450N/A#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
1450N/A
1450N/A/** SAREA drawable */
1450N/Astruct drm_sarea_drawable {
1450N/A unsigned int stamp;
1450N/A unsigned int flags;
1450N/A};
1450N/A
1450N/A/** SAREA frame */
1450N/Astruct drm_sarea_frame {
1450N/A unsigned int x;
1450N/A unsigned int y;
1450N/A unsigned int width;
1450N/A unsigned int height;
1450N/A unsigned int fullscreen;
1450N/A};
1450N/A
1450N/A/** SAREA */
1450N/Astruct drm_sarea {
1450N/A /** first thing is always the DRM locking structure */
1450N/A struct drm_hw_lock lock;
1450N/A /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
1450N/A struct drm_hw_lock drawable_lock;
1450N/A struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
1450N/A struct drm_sarea_frame frame; /**< frame */
1450N/A drm_context_t dummy_context;
1450N/A};
1450N/A
1450N/Atypedef struct drm_sarea_drawable drm_sarea_drawable_t;
1450N/Atypedef struct drm_sarea_frame drm_sarea_frame_t;
1450N/Atypedef struct drm_sarea drm_sarea_t;
1450N/A#endif /* _DRM_SAREA_H_ */