Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2008-2012, The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 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 Dwivedi | 715fb83 | 2012-05-18 00:24:18 -0600 | [diff] [blame] | 22 | #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 Sylvester | 808eca2 | 2011-11-03 10:26:29 -0700 | [diff] [blame] | 29 | #define Z180_DEFAULT_PWRSCALE_POLICY NULL |
| 30 | |
Jordan Crouse | a29a2e0 | 2012-08-14 09:09:23 -0600 | [diff] [blame] | 31 | /* Wait a maximum of 10 seconds when trying to idle the core */ |
| 32 | #define Z180_IDLE_TIMEOUT (10 * 1000) |
| 33 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 34 | struct z180_ringbuffer { |
| 35 | unsigned int prevctx; |
| 36 | struct kgsl_memdesc cmdbufdesc; |
| 37 | }; |
| 38 | |
| 39 | struct 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 Dwivedi | 715fb83 | 2012-05-18 00:24:18 -0600 | [diff] [blame] | 47 | int z180_dump(struct kgsl_device *, int); |
| 48 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 49 | #endif /* __Z180_H */ |