blob: 884613ee00ad88bd6d60a2393d4021c70ac97551 [file] [log] [blame]
Alan Cox5c49fd32011-11-03 18:22:04 +00001/**************************************************************************
2 * Copyright (c) 2007-2011, Intel Corporation.
3 * All Rights Reserved.
4 * Copyright (c) 2008, Tungsten Graphics Inc. Cedar Park, TX., USA.
5 * All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 **************************************************************************/
21
22#ifndef _PSB_DRM_H_
23#define _PSB_DRM_H_
24
Alan Cox5c49fd32011-11-03 18:22:04 +000025/*
Alan Cox61bedf72011-11-16 22:38:42 +000026 * Manage the LUT for an output
Alan Cox5c49fd32011-11-03 18:22:04 +000027 */
Alan Cox5c49fd32011-11-03 18:22:04 +000028struct drm_psb_dpst_lut_arg {
29 uint8_t lut[256];
30 int output_id;
31};
32
Alan Cox61bedf72011-11-16 22:38:42 +000033/*
34 * Validate modes
35 */
Alan Cox5c49fd32011-11-03 18:22:04 +000036struct drm_psb_mode_operation_arg {
37 u32 obj_id;
38 u16 operation;
39 struct drm_mode_modeinfo mode;
Alan Cox61bedf72011-11-16 22:38:42 +000040 u64 data;
Alan Cox5c49fd32011-11-03 18:22:04 +000041};
42
Alan Cox61bedf72011-11-16 22:38:42 +000043/*
44 * Query the stolen memory for smarter management of
45 * memory by the server
46 */
Alan Cox5c49fd32011-11-03 18:22:04 +000047struct drm_psb_stolen_memory_arg {
48 u32 base;
49 u32 size;
50};
51
Alan Cox5c49fd32011-11-03 18:22:04 +000052struct drm_psb_get_pipe_from_crtc_id_arg {
53 /** ID of CRTC being requested **/
54 u32 crtc_id;
Alan Cox5c49fd32011-11-03 18:22:04 +000055 /** pipe of requested CRTC **/
56 u32 pipe;
57};
58
Alan Cox5c49fd32011-11-03 18:22:04 +000059struct drm_psb_gem_create {
60 __u64 size;
61 __u32 handle;
62 __u32 flags;
Alan Cox770179d2011-11-16 22:39:18 +000063#define GMA_GEM_CREATE_STOLEN 1 /* Stolen memory can be used */
Alan Cox5c49fd32011-11-03 18:22:04 +000064};
65
66struct drm_psb_gem_mmap {
67 __u32 handle;
68 __u32 pad;
69 /**
70 * Fake offset to use for subsequent mmap call
71 *
72 * This is a fixed-size type for 32/64 compatibility.
73 */
74 __u64 offset;
75};
76
Alan Cox61bedf72011-11-16 22:38:42 +000077/* Controlling the kernel modesetting buffers */
78
Alan Cox770179d2011-11-16 22:39:18 +000079#define DRM_GMA_GEM_CREATE 0x00 /* Create a GEM object */
80#define DRM_GMA_GEM_MMAP 0x01 /* Map GEM memory */
81#define DRM_GMA_STOLEN_MEMORY 0x02 /* Report stolen memory */
82#define DRM_GMA_2D_OP 0x03 /* Will be merged later */
83#define DRM_GMA_GAMMA 0x04 /* Set gamma table */
84#define DRM_GMA_ADB 0x05 /* Get backlight */
85#define DRM_GMA_DPST_BL 0x06 /* Set backlight */
Alan Cox770179d2011-11-16 22:39:18 +000086#define DRM_GMA_MODE_OPERATION 0x07 /* Mode validation/DC set */
Alan Cox61bedf72011-11-16 22:38:42 +000087#define PSB_MODE_OPERATION_MODE_VALID 0x01
Kirill A. Shutemov699f0b42012-03-08 16:04:47 +000088#define DRM_GMA_GET_PIPE_FROM_CRTC_ID 0x08 /* CRTC to physical pipe# */
Alan Cox61bedf72011-11-16 22:38:42 +000089
90
Alan Cox5c49fd32011-11-03 18:22:04 +000091#endif