Skip to content
This repository was archived by the owner on Apr 23, 2019. It is now read-only.

Commit c12372d

Browse files
committed
Add latest VXD DRM APIs.
Signed-off-by: Sean V Kelley <sean.v.kelley@intel.com>
1 parent 770c41a commit c12372d

10 files changed

Lines changed: 769 additions & 6 deletions

src/pnw_cmdbuf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include <ttm/ttm_placement.h>
3939
#include <linux/psb_drm.h>
4040
#else
41-
#include <linux/vxd_drm.h>
41+
#include "vxd_drm.h"
4242
#endif
4343

4444
#include <stdint.h>

src/psb_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <wsbm/wsbm_manager.h>
3737

3838
#ifdef BAYTRAIL
39-
#include <linux/vxd_drm.h>
39+
#include "vxd_drm.h"
4040
#else
4141
#include <ttm/ttm_placement.h>
4242
#include <linux/psb_drm.h>

src/psb_drv_video.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
//#include "psb_drv_debug.h"
4646
#include "xf86drm.h"
4747
#ifdef BAYTRAIL
48-
#include <linux/vxd_drm.h>
48+
#include "vxd_drm.h"
4949
#else
5050
#include <linux/psb_drm.h>
5151
#endif

src/psb_ttm_fence_user.h

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/**************************************************************************
2+
*
3+
* Copyright 2006-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
4+
* All Rights Reserved.
5+
* Copyright (c) 2009 VMware, Inc., Palo Alto, CA., USA
6+
* All Rights Reserved.
7+
*
8+
* This program is free software; you can redistribute it and/or modify it
9+
* under the terms and conditions of the GNU General Public License,
10+
* version 2, as published by the Free Software Foundation.
11+
*
12+
* This program is distributed in the hope it will be useful, but WITHOUT
13+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15+
* more details.
16+
*
17+
* You should have received a copy of the GNU General Public License along with
18+
* this program; if not, write to the Free Software Foundation, Inc.,
19+
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
**************************************************************************/
22+
/*
23+
* Authors
24+
* Thomas Hellström <thomas-at-tungstengraphics-dot-com>
25+
*/
26+
27+
#ifndef TTM_FENCE_USER_H
28+
#define TTM_FENCE_USER_H
29+
30+
#if !defined(__KERNEL__) && !defined(_KERNEL)
31+
#include <stdint.h>
32+
#endif
33+
34+
#define TTM_FENCE_MAJOR 0
35+
#define TTM_FENCE_MINOR 1
36+
#define TTM_FENCE_PL 0
37+
#define TTM_FENCE_DATE "080819"
38+
39+
/**
40+
* struct ttm_fence_signaled_req
41+
*
42+
* @handle: Handle to the fence object. Input.
43+
*
44+
* @fence_type: Fence types we want to flush. Input.
45+
*
46+
* @flush: Boolean. Flush the indicated fence_types. Input.
47+
*
48+
* Argument to the TTM_FENCE_SIGNALED ioctl.
49+
*/
50+
51+
struct ttm_fence_signaled_req {
52+
uint32_t handle;
53+
uint32_t fence_type;
54+
int32_t flush;
55+
uint32_t pad64;
56+
};
57+
58+
/**
59+
* struct ttm_fence_rep
60+
*
61+
* @signaled_types: Fence type that has signaled.
62+
*
63+
* @fence_error: Command execution error.
64+
* Hardware errors that are consequences of the execution
65+
* of the command stream preceding the fence are reported
66+
* here.
67+
*
68+
* Output argument to the TTM_FENCE_SIGNALED and
69+
* TTM_FENCE_FINISH ioctls.
70+
*/
71+
72+
struct ttm_fence_rep {
73+
uint32_t signaled_types;
74+
uint32_t fence_error;
75+
};
76+
77+
union ttm_fence_signaled_arg {
78+
struct ttm_fence_signaled_req req;
79+
struct ttm_fence_rep rep;
80+
};
81+
82+
/*
83+
* Waiting mode flags for the TTM_FENCE_FINISH ioctl.
84+
*
85+
* TTM_FENCE_FINISH_MODE_LAZY: Allow for sleeps during polling
86+
* wait.
87+
*
88+
* TTM_FENCE_FINISH_MODE_NO_BLOCK: Don't block waiting for GPU,
89+
* but return -EBUSY if the buffer is busy.
90+
*/
91+
92+
#define TTM_FENCE_FINISH_MODE_LAZY (1 << 0)
93+
#define TTM_FENCE_FINISH_MODE_NO_BLOCK (1 << 1)
94+
95+
/**
96+
* struct ttm_fence_finish_req
97+
*
98+
* @handle: Handle to the fence object. Input.
99+
*
100+
* @fence_type: Fence types we want to finish.
101+
*
102+
* @mode: Wait mode.
103+
*
104+
* Input to the TTM_FENCE_FINISH ioctl.
105+
*/
106+
107+
struct ttm_fence_finish_req {
108+
uint32_t handle;
109+
uint32_t fence_type;
110+
uint32_t mode;
111+
uint32_t pad64;
112+
};
113+
114+
union ttm_fence_finish_arg {
115+
struct ttm_fence_finish_req req;
116+
struct ttm_fence_rep rep;
117+
};
118+
119+
/**
120+
* struct ttm_fence_unref_arg
121+
*
122+
* @handle: Handle to the fence object.
123+
*
124+
* Argument to the TTM_FENCE_UNREF ioctl.
125+
*/
126+
127+
struct ttm_fence_unref_arg {
128+
uint32_t handle;
129+
uint32_t pad64;
130+
};
131+
132+
/*
133+
* Ioctl offsets frome extenstion start.
134+
*/
135+
136+
#define TTM_FENCE_SIGNALED 0x01
137+
#define TTM_FENCE_FINISH 0x02
138+
#define TTM_FENCE_UNREF 0x03
139+
140+
#endif

0 commit comments

Comments
 (0)