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

TOMOYO Linux Cross Reference
Linux/include/drm/drm_util.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_util.h (Version linux-6.12-rc7) and /include/drm/drm_util.h (Version policy-sample)


  1 /*                                                  1 
  2  * Internal Header for the Direct Rendering Ma    
  3  *                                                
  4  * Copyright 2018 Intel Corporation               
  5  *                                                
  6  * Permission is hereby granted, free of charg    
  7  * copy of this software and associated docume    
  8  * to deal in the Software without restriction    
  9  * the rights to use, copy, modify, merge, pub    
 10  * and/or sell copies of the Software, and to     
 11  * Software is furnished to do so, subject to     
 12  *                                                
 13  * The above copyright notice and this permiss    
 14  * paragraph) shall be included in all copies     
 15  * Software.                                      
 16  *                                                
 17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT W    
 18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE W    
 19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINF    
 20  * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LI    
 21  * OTHER LIABILITY, WHETHER IN AN ACTION OF CO    
 22  * ARISING FROM, OUT OF OR IN CONNECTION WITH     
 23  * OTHER DEALINGS IN THE SOFTWARE.                
 24  */                                               
 25                                                   
 26 #ifndef _DRM_UTIL_H_                              
 27 #define _DRM_UTIL_H_                              
 28                                                   
 29 /**                                               
 30  * DOC: drm utils                                 
 31  *                                                
 32  * Macros and inline functions that does not n    
 33  */                                               
 34                                                   
 35 #include <linux/interrupt.h>                      
 36 #include <linux/kgdb.h>                           
 37 #include <linux/preempt.h>                        
 38 #include <linux/smp.h>                            
 39                                                   
 40 /*                                                
 41  * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for func    
 42  * only be visible for drmselftests.              
 43  */                                               
 44 #if defined(CONFIG_DRM_EXPORT_FOR_TESTS)          
 45 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT    
 46 #else                                             
 47 #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)           
 48 #endif                                            
 49                                                   
 50 /**                                               
 51  * for_each_if - helper for handling condition    
 52  * @condition: The condition to check             
 53  *                                                
 54  * Typical use::                                  
 55  *                                                
 56  *      #define for_each_foo_bar(x, y) \'         
 57  *              list_for_each_entry(x, y->list    
 58  *                      for_each_if(x->somethi    
 59  *                                                
 60  * The for_each_if() macro makes the use of fo    
 61  * prone.                                         
 62  */                                               
 63 #define for_each_if(condition) if (!(condition    
 64                                                   
 65 /**                                               
 66  * drm_can_sleep - returns true if currently o    
 67  *                                                
 68  * This function shall not be used in new code    
 69  * The check for running in atomic context may    
 70  *                                                
 71  * FIXME: All users of drm_can_sleep should be    
 72  *                                                
 73  * Returns:                                       
 74  * False if kgdb is active, we are in atomic c    
 75  */                                               
 76 static inline bool drm_can_sleep(void)            
 77 {                                                 
 78         if (in_atomic() || in_dbg_master() ||     
 79                 return false;                     
 80         return true;                              
 81 }                                                 
 82                                                   
 83 #endif                                            
 84                                                   

~ [ 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