at commit 6eff1d69
| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* Copyright 2024-2025 Tomeu Vizoso <tomeu@tomeuvizoso.net> */ |
| 3 | |
| 4 | #ifndef __ROCKET_DEVICE_H__ |
| 5 | #define __ROCKET_DEVICE_H__ |
| 6 | |
| 7 | #include <drm/drm_device.h> |
| 8 | #include <linux/clk.h> |
| 9 | #include <linux/container_of.h> |
| 10 | #include <linux/iommu.h> |
| 11 | #include <linux/platform_device.h> |
| 12 | |
| 13 | #include "rocket_core.h" |
| 14 | |
| 15 | struct rocket_device { |
| 16 | struct drm_device ddev; |
| 17 | |
| 18 | struct mutex sched_lock; |
| 19 | |
| 20 | struct rocket_core *cores; |
| 21 | unsigned int num_cores; |
| 22 | unsigned int max_cores; |
| 23 | }; |
| 24 | |
| 25 | struct rocket_device *rocket_device_init(struct platform_device *pdev, |
| 26 | const struct drm_driver *rocket_drm_driver); |
| 27 | void rocket_device_fini(struct rocket_device *rdev); |
| 28 | #define to_rocket_device(drm_dev) \ |
| 29 | ((struct rocket_device *)(container_of((drm_dev), struct rocket_device, ddev))) |
| 30 | |
| 31 | #endif /* __ROCKET_DEVICE_H__ */ |