drm/etnaviv: use bitmap to keep track of events

This is prep work to be able to allocate multiple events in one go.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
Christian Gmeiner
2017-09-24 15:15:19 +02:00
committed by Lucas Stach
parent 6eb3ecc33a
commit 355502e03a
2 changed files with 17 additions and 20 deletions

View File

@@ -88,13 +88,14 @@ struct etnaviv_chip_identity {
};
struct etnaviv_event {
bool used;
struct dma_fence *fence;
};
struct etnaviv_cmdbuf_suballoc;
struct etnaviv_cmdbuf;
#define ETNA_NR_EVENTS 30
struct etnaviv_gpu {
struct drm_device *drm;
struct thermal_cooling_device *cooling;
@@ -112,7 +113,8 @@ struct etnaviv_gpu {
u32 memory_base;
/* event management: */
struct etnaviv_event event[30];
DECLARE_BITMAP(event_bitmap, ETNA_NR_EVENTS);
struct etnaviv_event event[ETNA_NR_EVENTS];
struct completion event_free;
spinlock_t event_spinlock;