at master 794 B view raw
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 15struct 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}; 23 24struct rocket_device *rocket_device_init(struct platform_device *pdev, 25 const struct drm_driver *rocket_drm_driver); 26void rocket_device_fini(struct rocket_device *rdev); 27#define to_rocket_device(drm_dev) \ 28 ((struct rocket_device *)(container_of((drm_dev), struct rocket_device, ddev))) 29 30#endif /* __ROCKET_DEVICE_H__ */