drm_sunmod.h revision 1450
40N/A/*
40N/A * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
40N/A *
40N/A * Permission is hereby granted, free of charge, to any person obtaining a
943N/A * copy of this software and associated documentation files (the "Software"),
40N/A * to deal in the Software without restriction, including without limitation
40N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A * and/or sell copies of the Software, and to permit persons to whom the
919N/A * Software is furnished to do so, subject to the following conditions:
919N/A *
919N/A * The above copyright notice and this permission notice (including the next
919N/A * paragraph) shall be included in all copies or substantial portions of the
919N/A * Software.
919N/A *
919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A * DEALINGS IN THE SOFTWARE.
919N/A */
919N/A
919N/A/*
40N/A * Copyright (c) 2012 Intel Corporation. All rights reserved.
40N/A */
40N/A
70N/A/*
493N/A * Common misc module interfaces of DRM under Solaris
40N/A */
40N/A
999N/A/*
40N/A * I915 DRM Driver for Solaris
911N/A *
999N/A * This driver provides the hardware 3D acceleration support for Intel
999N/A * integrated video devices (e.g. i8xx/i915/i945 series chipsets), under the
911N/A * DRI (Direct Rendering Infrastructure). DRM (Direct Rendering Manager) here
40N/A * means the kernel device driver in DRI.
40N/A *
40N/A * I915 driver is a device dependent driver only, it depends on a misc module
40N/A * named drm for generic DRM operations.
40N/A *
40N/A * This driver also calls into gfx and agpmaster misc modules respectively for
40N/A * generic graphics operations and AGP master device support.
40N/A */
493N/A
947N/A#ifndef _SYS_DRM_SUNMOD_H_
947N/A#define _SYS_DRM_SUNMOD_H_
969N/A
40N/A#ifdef __cplusplus
40N/Aextern "C" {
493N/A#endif
40N/A
920N/A#include <sys/types.h>
920N/A#include <sys/errno.h>
40N/A#include <sys/conf.h>
70N/A#include <sys/kmem.h>
70N/A#include <sys/visual_io.h>
40N/A#include <sys/fbio.h>
970N/A#include <sys/ddi.h>
970N/A#include <sys/sunddi.h>
970N/A#include <sys/stat.h>
70N/A#include <sys/file.h>
#include <sys/open.h>
#include <sys/modctl.h>
#include <sys/pci.h>
#include <sys/kd.h>
#include <sys/ddi_impldefs.h>
#include <sys/sunldi.h>
#include <sys/mkdev.h>
#include <sys/gfx_private.h>
#include <sys/agpgart.h>
#include <sys/agp/agpdefs.h>
#include <sys/agp/agpmaster_io.h>
#include "drmP.h"
#include <sys/modctl.h>
/* graphics name for the common graphics minor node */
#define GFX_NAME "gfx"
/*
* softstate for DRM module
*/
typedef struct drm_instance_state {
kmutex_t mis_lock;
kmutex_t dis_ctxlock;
major_t mis_major;
dev_info_t *mis_dip;
drm_device_t *mis_devp;
ddi_acc_handle_t mis_cfg_hdl;
agp_master_softc_t *mis_agpm; /* agpmaster softstate ptr */
gfxp_vgatext_softc_ptr_t mis_gfxp; /* gfx softstate */
} drm_inst_state_t;
struct drm_inst_state_list {
drm_inst_state_t disl_state;
struct drm_inst_state_list *disl_next;
};
typedef struct drm_inst_state_list drm_inst_list_t;
extern struct list_head drm_iomem_list;
static int drm_sun_open(dev_t *, int, int, cred_t *);
static int drm_sun_close(dev_t, int, int, cred_t *);
static int drm_sun_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
static int drm_sun_devmap(dev_t, devmap_cookie_t,
offset_t, size_t, size_t *, uint_t);
static int drm_sun_chpoll(dev_t, short, int, short *, struct pollhead **);
static int drm_sun_read(dev_t, struct uio *, cred_t *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DRM_SUNMOD_H_ */