blob: 268aac3efe686b2d1ba12a2740e0dd7240608df1 [file] [log] [blame]
Duy Truonge833aca2013-02-12 13:35:08 -08001/* Copyright (c) 2008-2012, The Linux Foundation. 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
Jordan Crousea29a2e02012-08-14 09:09:23 -060031/* Wait a maximum of 10 seconds when trying to idle the core */
32#define Z180_IDLE_TIMEOUT (10 * 1000)
33
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070034struct z180_ringbuffer {
35 unsigned int prevctx;
36 struct kgsl_memdesc cmdbufdesc;
37};
38
39struct z180_device {
40 struct kgsl_device dev; /* Must be first field in this struct */
41 int current_timestamp;
42 int timestamp;
43 struct z180_ringbuffer ringbuffer;
44 spinlock_t cmdwin_lock;
45};
46
Harsh Vardhan Dwivedi715fb832012-05-18 00:24:18 -060047int z180_dump(struct kgsl_device *, int);
48
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070049#endif /* __Z180_H */