#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <drm/drm_ioctl.h>
#include <drm/drm_drv.h>
#include <drm/drm_prime.h>
#include <drm/lima_drm.h>
#include "lima_device.h"
#include "lima_drv.h"
#include "lima_gem.h"
#include "lima_vm.h"
int lima_sched_timeout_ms;
uint lima_heap_init_nr_pages = …;
uint lima_max_error_tasks;
uint lima_job_hang_limit;
MODULE_PARM_DESC(…) …;
module_param_named(sched_timeout_ms, lima_sched_timeout_ms, int, 0444);
MODULE_PARM_DESC(…) …;
module_param_named(heap_init_nr_pages, lima_heap_init_nr_pages, uint, 0444);
MODULE_PARM_DESC(…) …;
module_param_named(max_error_tasks, lima_max_error_tasks, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param_named(job_hang_limit, lima_job_hang_limit, uint, 0444);
static int lima_ioctl_get_param(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_gem_create(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_gem_info(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_gem_submit(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_gem_wait(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_ctx_create(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_ioctl_ctx_free(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static int lima_drm_driver_open(struct drm_device *dev, struct drm_file *file)
{ … }
static void lima_drm_driver_postclose(struct drm_device *dev, struct drm_file *file)
{ … }
static const struct drm_ioctl_desc lima_drm_driver_ioctls[] = …;
DEFINE_DRM_GEM_FOPS(lima_drm_driver_fops);
static const struct drm_driver lima_drm_driver = …;
struct lima_block_reader { … };
static bool lima_read_block(struct lima_block_reader *reader,
void *src, size_t src_size)
{ … }
static ssize_t lima_error_state_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
{ … }
static ssize_t lima_error_state_write(struct file *file, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
{ … }
static const struct bin_attribute lima_error_state_attr = …;
static int lima_pdev_probe(struct platform_device *pdev)
{ … }
static void lima_pdev_remove(struct platform_device *pdev)
{ … }
static const struct lima_compatible lima_mali400_data = …;
static const struct lima_compatible lima_mali450_data = …;
static const struct of_device_id dt_match[] = …;
MODULE_DEVICE_TABLE(of, dt_match);
static const struct dev_pm_ops lima_pm_ops = …;
static struct platform_driver lima_platform_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_SOFTDEP(…) …;