diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2017-09-24 15:15:19 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2017-10-10 11:45:39 +0200 |
commit | 355502e03ad26e3c872a0f5c408a4accca57ba7e (patch) | |
tree | c1327e81702aa186a5ea6be0a9279f0667315cc4 /drivers/gpu/drm/etnaviv/etnaviv_gpu.h | |
parent | 6eb3ecc33a6aaedda5ceb0824cafe34c47af2f55 (diff) | |
download | talos-obmc-linux-355502e03ad26e3c872a0f5c408a4accca57ba7e.tar.gz talos-obmc-linux-355502e03ad26e3c872a0f5c408a4accca57ba7e.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gpu.h')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h index 689cb8f3680c..70e6590aacdf 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h @@ -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; |