summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/atomicreq.cpp7
-rw-r--r--libkms++/atomicreq.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/libkms++/atomicreq.cpp b/libkms++/atomicreq.cpp
index a11d382..f2aa322 100644
--- a/libkms++/atomicreq.cpp
+++ b/libkms++/atomicreq.cpp
@@ -76,4 +76,11 @@ int AtomicReq::commit(void* data)
return drmModeAtomicCommit(m_card.fd(), m_req, flags, data);
}
+
+int AtomicReq::commit_sync()
+{
+ uint32_t flags = 0;
+
+ return drmModeAtomicCommit(m_card.fd(), m_req, flags, 0);
+}
}
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
index 94b506d..54740c2 100644
--- a/libkms++/atomicreq.h
+++ b/libkms++/atomicreq.h
@@ -26,6 +26,7 @@ public:
int commit();
int commit(void* data);
int commit(PageFlipHandlerBase* data) { return commit((void*)data); }
+ int commit_sync();
private:
Card& m_card;
href='#n140'>140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
/* i810_drv.h -- Private header for the Matrox g200/g400 driver -*- linux-c -*-
 * Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
 *
 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
 * All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
 * 	    Jeff Hartmann <jhartmann@valinux.com>
 *
 */

#ifndef _I810_DRV_H_
#define _I810_DRV_H_

typedef struct drm_i810_buf_priv {
   	u32 *in_use;
   	int my_use_idx;
	int currently_mapped;
	void *virtual;
	void *kernel_virtual;
	int map_count;
   	struct vm_area_struct *vma;
} drm_i810_buf_priv_t;

typedef struct _drm_i810_ring_buffer{
	int tail_mask;
	unsigned long Start;
	unsigned long End;
	unsigned long Size;
	u8 *virtual_start;
	int head;
	int tail;
	int space;
} drm_i810_ring_buffer_t;

typedef struct drm_i810_private {
   	int ring_map_idx;
   	int buffer_map_idx;

   	drm_i810_ring_buffer_t ring;
	drm_i810_sarea_t *sarea_priv;

      	unsigned long hw_status_page;
   	unsigned long counter;

   	atomic_t flush_done;
   	wait_queue_head_t flush_queue;	/* Processes waiting until flush    */
	drm_buf_t *mmap_buffer;

	
	u32 front_di1, back_di1, zi1;
	
	int back_offset;
	int depth_offset;
	int w, h;
	int pitch;
} drm_i810_private_t;

				/* i810_drv.c */
extern int  i810_version(struct inode *inode, struct file *filp,
			  unsigned int cmd, unsigned long arg);
extern int  i810_open(struct inode *inode, struct file *filp);
extern int  i810_release(struct inode *inode, struct file *filp);
extern int  i810_ioctl(struct inode *inode, struct file *filp,
			unsigned int cmd, unsigned long arg);
extern int  i810_unlock(struct inode *inode, struct file *filp,
			 unsigned int cmd, unsigned long arg);

				/* i810_dma.c */
extern int  i810_dma_schedule(drm_device_t *dev, int locked);
extern int  i810_getbuf(struct inode *inode, struct file *filp,
			unsigned int cmd, unsigned long arg);
extern int  i810_irq_install(drm_device_t *dev, int irq);
extern int  i810_irq_uninstall(drm_device_t *dev);
extern int  i810_control(struct inode *inode, struct file *filp,
			  unsigned int cmd, unsigned long arg);
extern int  i810_lock(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_dma_init(struct inode *inode, struct file *filp,
			  unsigned int cmd, unsigned long arg);
extern int  i810_flush_ioctl(struct inode *inode, struct file *filp,
			     unsigned int cmd, unsigned long arg);
extern void i810_reclaim_buffers(drm_device_t *dev, pid_t pid);
extern int  i810_getage(struct inode *inode, struct file *filp, unsigned int cmd,
			unsigned long arg);
extern int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma);
extern int i810_copybuf(struct inode *inode, struct file *filp, 
			unsigned int cmd, unsigned long arg);
extern int i810_docopy(struct inode *inode, struct file *filp, 
		       unsigned int cmd, unsigned long arg);

				/* i810_bufs.c */
extern int  i810_addbufs(struct inode *inode, struct file *filp, 
			unsigned int cmd, unsigned long arg);
extern int  i810_infobufs(struct inode *inode, struct file *filp, 
			 unsigned int cmd, unsigned long arg);
extern int  i810_markbufs(struct inode *inode, struct file *filp,
			 unsigned int cmd, unsigned long arg);
extern int  i810_freebufs(struct inode *inode, struct file *filp,
			 unsigned int cmd, unsigned long arg);
extern int  i810_addmap(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);

				/* i810_context.c */
extern int  i810_resctx(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_addctx(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_modctx(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_getctx(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_switchctx(struct inode *inode, struct file *filp,
			  unsigned int cmd, unsigned long arg);
extern int  i810_newctx(struct inode *inode, struct file *filp,
		       unsigned int cmd, unsigned long arg);
extern int  i810_rmctx(struct inode *inode, struct file *filp,
		      unsigned int cmd, unsigned long arg);

extern int  i810_context_switch(drm_device_t *dev, int old, int new);
extern int  i810_context_switch_complete(drm_device_t *dev, int new);

#define I810_VERBOSE 0


int i810_dma_vertex(struct inode *inode, struct file *filp,
		    unsigned int cmd, unsigned long arg);