• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Alyssa Rosenzweig
3  * Copyright 2018 Broadcom
4  * SPDX-License-Identifier: MIT
5  */
6 
7 #include "drm-shim/drm_shim.h"
8 
9 bool drm_shim_driver_prefers_first_render_node = true;
10 
11 static ioctl_fn_t driver_ioctls[] = {
12    /* The Asahi Linux UAPI is not yet upstream */
13 };
14 
15 void
drm_shim_driver_init(void)16 drm_shim_driver_init(void)
17 {
18    shim_device.bus_type = DRM_BUS_PLATFORM;
19    shim_device.driver_name = "asahi";
20    shim_device.driver_ioctls = driver_ioctls;
21    shim_device.driver_ioctl_count = ARRAY_SIZE(driver_ioctls);
22 
23    drm_shim_override_file("DRIVER=asahi\n"
24                           "OF_FULLNAME=/soc/agx\n"
25                           "OF_COMPATIBLE_0=apple,gpu-g13g\n"
26                           "OF_COMPATIBLE_N=1\n",
27                           "/sys/dev/char/%d:%d/device/uevent", DRM_MAJOR,
28                           render_node_minor);
29 }
30