blob: 6e81a9d27eb462dcd5d83e77f696b0e317744d85 [file] [log] [blame]
Harsh Vardhan Dwivedi715fb832012-05-18 00:24:18 -06001/* Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#ifndef __Z180_H
14#define __Z180_H
15
16#include "kgsl_device.h"
17
18#define DEVICE_2D_NAME "kgsl-2d"
19#define DEVICE_2D0_NAME "kgsl-2d0"
20#define DEVICE_2D1_NAME "kgsl-2d1"
21
Harsh Vardhan Dwivedi715fb832012-05-18 00:24:18 -060022#define Z180_PACKET_SIZE 15
23#define Z180_PACKET_COUNT 8
24#define Z180_RB_SIZE (Z180_PACKET_SIZE*Z180_PACKET_COUNT \
25 *sizeof(uint32_t))
26#define Z180_DEVICE(device) \
27 KGSL_CONTAINER_OF(device, struct z180_device, dev)
28
Lucille Sylvester808eca22011-11-03 10:26:29 -070029#define Z180_DEFAULT_PWRSCALE_POLICY NULL
30
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031struct z180_ringbuffer {
32 unsigned int prevctx;
33 struct kgsl_memdesc cmdbufdesc;
34};
35
36struct z180_device {
37 struct kgsl_device dev; /* Must be first field in this struct */
38 int current_timestamp;
39 int timestamp;
40 struct z180_ringbuffer ringbuffer;
41 spinlock_t cmdwin_lock;
42};
43
Harsh Vardhan Dwivedi715fb832012-05-18 00:24:18 -060044int z180_dump(struct kgsl_device *, int);
45
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070046#endif /* __Z180_H */