2 * Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
7 * Alexander von Gluck IV, kallisti5@unixzen.com
13 #include "accelerant.h"
14 #include "accelerant_protos.h"
21 # define TRACE(x...) _sPrintf("radeon_hd: " x)
23 # define TRACE(x...) ;
27 static engine_token sEngineToken
= {1, 0 /*B_2D_ACCELERATION*/, NULL
};
30 // #pragma mark - engine management
34 radeon_accelerant_engine_count(void)
36 TRACE("%s\n", __func__
);
42 radeon_acquire_engine(uint32 capabilities
, uint32 maxWait
,
43 sync_token
* syncToken
, engine_token
** _engineToken
)
45 TRACE("%s\n", __func__
);
46 *_engineToken
= &sEngineToken
;
48 if (acquire_lock(&gInfo
->shared_info
->engine_lock
) != B_OK
)
56 radeon_release_engine(engine_token
* engineToken
, sync_token
* syncToken
)
58 TRACE("%s\n", __func__
);
59 if (syncToken
!= NULL
)
60 syncToken
->engine_id
= engineToken
->engine_id
;
62 release_lock(&gInfo
->shared_info
->engine_lock
);