~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/drm_accel.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/drm/drm_accel.h (Version linux-6.12-rc7) and /include/drm/drm_accel.h (Version linux-6.4.16)


  1 /* SPDX-License-Identifier: GPL-2.0                 1 /* SPDX-License-Identifier: GPL-2.0
  2  *                                                  2  *
  3  * Copyright 2022 HabanaLabs, Ltd.                  3  * Copyright 2022 HabanaLabs, Ltd.
  4  * All Rights Reserved.                             4  * All Rights Reserved.
  5  *                                                  5  *
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef DRM_ACCEL_H_                                8 #ifndef DRM_ACCEL_H_
  9 #define DRM_ACCEL_H_                                9 #define DRM_ACCEL_H_
 10                                                    10 
 11 #include <drm/drm_file.h>                          11 #include <drm/drm_file.h>
 12                                                    12 
 13 #define ACCEL_MAJOR             261                13 #define ACCEL_MAJOR             261
 14 #define ACCEL_MAX_MINORS        256                14 #define ACCEL_MAX_MINORS        256
 15                                                    15 
 16 /**                                                16 /**
 17  * DRM_ACCEL_FOPS - Default drm accelerators f     17  * DRM_ACCEL_FOPS - Default drm accelerators file operations
 18  *                                                 18  *
 19  * This macro provides a shorthand for setting     19  * This macro provides a shorthand for setting the accelerator file ops in the
 20  * &file_operations structure.  If all you nee     20  * &file_operations structure.  If all you need are the default ops, use
 21  * DEFINE_DRM_ACCEL_FOPS instead.                  21  * DEFINE_DRM_ACCEL_FOPS instead.
 22  */                                                22  */
 23 #define DRM_ACCEL_FOPS \                           23 #define DRM_ACCEL_FOPS \
 24         .open           = accel_open,\             24         .open           = accel_open,\
 25         .release        = drm_release,\            25         .release        = drm_release,\
 26         .unlocked_ioctl = drm_ioctl,\              26         .unlocked_ioctl = drm_ioctl,\
 27         .compat_ioctl   = drm_compat_ioctl,\       27         .compat_ioctl   = drm_compat_ioctl,\
 28         .poll           = drm_poll,\               28         .poll           = drm_poll,\
 29         .read           = drm_read,\               29         .read           = drm_read,\
 30         .llseek         = noop_llseek, \           30         .llseek         = noop_llseek, \
 31         .mmap           = drm_gem_mmap, \      !!  31         .mmap           = drm_gem_mmap
 32         .fop_flags      = FOP_UNSIGNED_OFFSET  << 
 33                                                    32 
 34 /**                                                33 /**
 35  * DEFINE_DRM_ACCEL_FOPS() - macro to generate     34  * DEFINE_DRM_ACCEL_FOPS() - macro to generate file operations for accelerators drivers
 36  * @name: name for the generated structure         35  * @name: name for the generated structure
 37  *                                                 36  *
 38  * This macro autogenerates a suitable &struct     37  * This macro autogenerates a suitable &struct file_operations for accelerators based
 39  * drivers, which can be assigned to &drm_driv     38  * drivers, which can be assigned to &drm_driver.fops. Note that this structure
 40  * cannot be shared between drivers, because i     39  * cannot be shared between drivers, because it contains a reference to the
 41  * current module using THIS_MODULE.               40  * current module using THIS_MODULE.
 42  *                                                 41  *
 43  * Note that the declaration is already marked     42  * Note that the declaration is already marked as static - if you need a
 44  * non-static version of this you're probably      43  * non-static version of this you're probably doing it wrong and will break the
 45  * THIS_MODULE reference by accident.              44  * THIS_MODULE reference by accident.
 46  */                                                45  */
 47 #define DEFINE_DRM_ACCEL_FOPS(name) \              46 #define DEFINE_DRM_ACCEL_FOPS(name) \
 48         static const struct file_operations na     47         static const struct file_operations name = {\
 49                 .owner          = THIS_MODULE,     48                 .owner          = THIS_MODULE,\
 50                 DRM_ACCEL_FOPS,\                   49                 DRM_ACCEL_FOPS,\
 51         }                                          50         }
 52                                                    51 
 53 #if IS_ENABLED(CONFIG_DRM_ACCEL)                   52 #if IS_ENABLED(CONFIG_DRM_ACCEL)
 54                                                    53 
 55 extern struct xarray accel_minors_xa;          << 
 56                                                << 
 57 void accel_core_exit(void);                        54 void accel_core_exit(void);
 58 int accel_core_init(void);                         55 int accel_core_init(void);
                                                   >>  56 void accel_minor_remove(int index);
                                                   >>  57 int accel_minor_alloc(void);
                                                   >>  58 void accel_minor_replace(struct drm_minor *minor, int index);
 59 void accel_set_device_instance_params(struct d     59 void accel_set_device_instance_params(struct device *kdev, int index);
 60 int accel_open(struct inode *inode, struct fil     60 int accel_open(struct inode *inode, struct file *filp);
 61 void accel_debugfs_init(struct drm_device *dev !!  61 void accel_debugfs_init(struct drm_minor *minor, int minor_id);
 62 void accel_debugfs_register(struct drm_device  << 
 63                                                    62 
 64 #else                                              63 #else
 65                                                    64 
 66 static inline void accel_core_exit(void)           65 static inline void accel_core_exit(void)
 67 {                                                  66 {
 68 }                                                  67 }
 69                                                    68 
 70 static inline int __init accel_core_init(void)     69 static inline int __init accel_core_init(void)
 71 {                                                  70 {
 72         /* Return 0 to allow drm_core_init to      71         /* Return 0 to allow drm_core_init to complete successfully */
 73         return 0;                                  72         return 0;
 74 }                                                  73 }
 75                                                    74 
 76 static inline void accel_set_device_instance_p !!  75 static inline void accel_minor_remove(int index)
                                                   >>  76 {
                                                   >>  77 }
                                                   >>  78 
                                                   >>  79 static inline int accel_minor_alloc(void)
 77 {                                                  80 {
                                                   >>  81         return -EOPNOTSUPP;
 78 }                                                  82 }
 79                                                    83 
 80 static inline void accel_debugfs_init(struct d !!  84 static inline void accel_minor_replace(struct drm_minor *minor, int index)
                                                   >>  85 {
                                                   >>  86 }
                                                   >>  87 
                                                   >>  88 static inline void accel_set_device_instance_params(struct device *kdev, int index)
 81 {                                                  89 {
 82 }                                                  90 }
 83                                                    91 
 84 static inline void accel_debugfs_register(stru !!  92 static inline void accel_debugfs_init(struct drm_minor *minor, int minor_id)
 85 {                                                  93 {
 86 }                                                  94 }
 87                                                    95 
 88 #endif /* IS_ENABLED(CONFIG_DRM_ACCEL) */          96 #endif /* IS_ENABLED(CONFIG_DRM_ACCEL) */
 89                                                    97 
 90 #endif /* DRM_ACCEL_H_ */                          98 #endif /* DRM_ACCEL_H_ */
 91                                                    99 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php