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:

committed by
Lucas Stach

parent
6eb3ecc33a
commit
355502e03a
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user