aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/emgd/include/igd_gart.h
blob: ef5a8dde704606fdbabbb6a98d5cb44686084a3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* -*- pse-c -*-
 *-----------------------------------------------------------------------------
 * Filename: igd_gart.h
 * $Revision: 1.3 $
 *-----------------------------------------------------------------------------
 * Copyright © 2002-2010, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *-----------------------------------------------------------------------------
 * Description:
 *  
 *-----------------------------------------------------------------------------
 */

#ifndef _IGD_GART_H_
#define _IGD_GATR_H_

typedef struct _gtt_info {
	void* virt_mmadr;
	void* virt_gttadr;
	void* virt_gttadr_upper;

	unsigned long new_gtt;
	unsigned long gtt_phyadr;
	unsigned long is_virt_aperture;
	unsigned long reset_gtt_entries;
	unsigned long fb_phys_addr;
	unsigned long scratch_phys;
	
	unsigned long num_gtt_entries;
	unsigned long gtt_entry_start;
	unsigned long gtt_entry_end;
	unsigned long num_contig_allocs;
	unsigned char **cont_pages_virts;
	/* FIXME!!! - this cant handle 64-bit Architecture*/
	unsigned long *cont_pages_phys;
	unsigned long *cont_pages_sizes;
#ifdef D3D_DPM_ALLOC
   void* virt_gttadr_dpm;
#endif
}gtt_info_t;

/*
 * Note: Platforms extend this data structure so the pointer can be used
 * as either this DI dispatch or cast to the DD dipatch.
 */
typedef struct _init_gart_dispatch {
	int (*get_gtt_ctl)(void* gtt_info);
	int (*init_gtt_table)(void* gtt_info);
	int (*flush_gtt_tlb)(void* gtt_info);
	int (*shutdown_gtt)(void* gtt_info);
} init_gart_dispatch_t;

void* igd_get_gtt_dispatch(unsigned long dev_id);
int igd_get_gtt_ctl(void* gtt_info, unsigned long dev_id);
int igd_init_gtt(void* gtt_info, unsigned long dev_id);
int igd_flush_gtt(void* gtt_info, unsigned long dev_id);
int igd_shutdown_gtt(void* gtt_info, unsigned long dev_id);

#endif