3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-01-31 07:12:18 +00:00
Brooklyn/drivers/gpu/drm/lib/drm_random.h
crowetic a94b3d14aa Brooklyn+ (PLUS) changes
Changes included (and more):

1. Dynamic RAM merge

2. Real-time page scan and allocation

3. Cache compression

4. Real-time IRQ checks

5. Dynamic I/O allocation for Java heap

6. Java page migration

7. Contiguous memory allocation

8. Idle pages tracking

9. Per CPU RAM usage tracking

10. ARM NEON scalar multiplication library

11. NEON/ARMv8 crypto extensions

12. NEON SHA, Blake, RIPEMD crypto extensions

13. Parallel NEON crypto engine for multi-algo based CPU stress reduction
2022-05-12 10:47:00 -07:00

29 lines
795 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __DRM_RANDOM_H__
#define __DRM_RANDOM_H__
/* This is a temporary home for a couple of utility functions that should
* be transposed to lib/ at the earliest convenience.
*/
#include <linux/random.h>
#define DRM_RND_STATE_INITIALIZER(seed__) ({ \
struct rnd_state state__; \
prandom_seed_state(&state__, (seed__)); \
state__; \
})
#define DRM_RND_STATE(name__, seed__) \
struct rnd_state name__ = DRM_RND_STATE_INITIALIZER(seed__)
unsigned int *drm_random_order(unsigned int count,
struct rnd_state *state);
void drm_random_reorder(unsigned int *order,
unsigned int count,
struct rnd_state *state);
u32 drm_prandom_u32_max_state(u32 ep_ro,
struct rnd_state *state);
#endif /* !__DRM_RANDOM_H__ */