1450N/A/*
1450N/A * Copyright (c) 2006, 2013, Oracle and/or its affiliates. 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 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1450N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1450N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1450N/A * DEALINGS IN THE SOFTWARE.
1450N/A */
1450N/A
1450N/A/*
1450N/A * Copyright (c) 2012 Intel Corporation. All rights reserved.
1450N/A */
1450N/A
1450N/A/*
1450N/A * Common misc module interfaces of DRM under Solaris
1450N/A */
1450N/A
1450N/A/*
1450N/A * I915 DRM Driver for Solaris
1450N/A *
1450N/A * This driver provides the hardware 3D acceleration support for Intel
1450N/A * integrated video devices (e.g. i8xx/i915/i945 series chipsets), under the
1450N/A * DRI (Direct Rendering Infrastructure). DRM (Direct Rendering Manager) here
1450N/A * means the kernel device driver in DRI.
1450N/A *
1450N/A * I915 driver is a device dependent driver only, it depends on a misc module
1450N/A * named drm for generic DRM operations.
1450N/A *
1450N/A * This driver also calls into gfx and agpmaster misc modules respectively for
1450N/A * generic graphics operations and AGP master device support.
1450N/A */
1450N/A
1450N/A#ifndef _SYS_DRM_SUNMOD_H_
1450N/A#define _SYS_DRM_SUNMOD_H_
1450N/A
1450N/A#ifdef __cplusplus
1450N/Aextern "C" {
1450N/A#endif
1450N/A
1450N/A#include <sys/types.h>
1450N/A#include <sys/errno.h>
1450N/A#include <sys/conf.h>
1450N/A#include <sys/kmem.h>
1450N/A#include <sys/visual_io.h>
1450N/A#include <sys/fbio.h>
1450N/A#include <sys/ddi.h>
1450N/A#include <sys/sunddi.h>
1450N/A#include <sys/stat.h>
1450N/A#include <sys/file.h>
1450N/A#include <sys/open.h>
1450N/A#include <sys/modctl.h>
1450N/A#include <sys/pci.h>
1450N/A#include <sys/kd.h>
1450N/A#include <sys/ddi_impldefs.h>
1450N/A#include <sys/sunldi.h>
1450N/A#include <sys/mkdev.h>
1450N/A#include <sys/gfx_private.h>
1450N/A#include <sys/agpgart.h>
1450N/A#include <sys/agp/agpdefs.h>
1450N/A#include <sys/agp/agpmaster_io.h>
1450N/A#include "drmP.h"
1450N/A#include <sys/modctl.h>
1450N/A
1450N/A
1450N/A/* graphics name for the common graphics minor node */
1450N/A#define GFX_NAME "gfx"
1450N/A
1450N/A/*
1450N/A * softstate for DRM module
1450N/A */
1450N/Atypedef struct drm_instance_state {
1450N/A kmutex_t mis_lock;
1450N/A kmutex_t dis_ctxlock;
1450N/A major_t mis_major;
1450N/A dev_info_t *mis_dip;
1450N/A drm_device_t *mis_devp;
1450N/A ddi_acc_handle_t mis_cfg_hdl;
1450N/A agp_master_softc_t *mis_agpm; /* agpmaster softstate ptr */
1450N/A gfxp_vgatext_softc_ptr_t mis_gfxp; /* gfx softstate */
1450N/A} drm_inst_state_t;
1450N/A
1450N/A
1450N/Astruct drm_inst_state_list {
1450N/A drm_inst_state_t disl_state;
1450N/A struct drm_inst_state_list *disl_next;
1450N/A
1450N/A};
1450N/Atypedef struct drm_inst_state_list drm_inst_list_t;
1450N/A
1450N/Aextern struct list_head drm_iomem_list;
1450N/A
1450N/Astatic int drm_sun_open(dev_t *, int, int, cred_t *);
1450N/Astatic int drm_sun_close(dev_t, int, int, cred_t *);
1450N/Astatic int drm_sun_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
1450N/Astatic int drm_sun_devmap(dev_t, devmap_cookie_t,
1450N/A offset_t, size_t, size_t *, uint_t);
1450N/Astatic int drm_sun_chpoll(dev_t, short, int, short *, struct pollhead **);
1450N/Astatic int drm_sun_read(dev_t, struct uio *, cred_t *);
1450N/A
1450N/A#ifdef __cplusplus
1450N/A}
1450N/A#endif
1450N/A
1450N/A#endif /* _SYS_DRM_SUNMOD_H_ */