Changeset 565 for trunk/kernel/devices/dev_fbf.c
- Timestamp:
- Oct 4, 2018, 11:48:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_fbf.c
r492 r565 55 55 if( impl == IMPL_FBF_SCL ) 56 56 { 57 // TODO57 printk("\n[WARNING] Soclib FBF driver not implemented yet\n"); 58 58 } 59 59 else … … 78 78 79 79 // return values 80 *width = hal_remote_l w( XPTR( dev_cxy , &dev_ptr->ext.fbf.width ) );81 *height = hal_remote_l w( XPTR( dev_cxy , &dev_ptr->ext.fbf.height ) );80 *width = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->ext.fbf.width ) ); 81 *height = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->ext.fbf.height ) ); 82 82 83 83 } // end dev_fbf_get_size() 84 84 85 /////////////////////// 85 ///////////////////////////// 86 86 error_t dev_fbf_alloc( void ) 87 87 { 88 88 // get extended pointer on FBF chdev descriptor 89 xptr_t dev_xp = chdev_dir.fbf[0];90 91 assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );92 93 // get FBF chdev cluster and local pointer 94 cxy_t dev_cxy = GET_CXY( dev_xp );95 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );89 // xptr_t dev_xp = chdev_dir.fbf[0]; 90 91 // assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 92 93 // get FBF chdev cluster and local pointer 94 // cxy_t dev_cxy = GET_CXY( dev_xp ); 95 // chdev_t * dev_ptr = GET_PTR( dev_xp ); 96 96 97 97 // try to get FBF ownership 98 return remote_spinlock_trylock( XPTR( dev_cxy , &dev_ptr->wait_lock ) ); 98 99 assert( false , "not implemented yet" ); 99 100 100 101 } // end dev_fbf_alloc() 101 102 102 /////////////////// 103 ///////////////////////// 103 104 void dev_fbf_free( void ) 104 105 { 105 106 // get extended pointer on FBF chdev descriptor 106 xptr_t dev_xp = chdev_dir.fbf[0];107 108 assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );109 110 // get FBF chdev cluster and local pointer 111 cxy_t dev_cxy = GET_CXY( dev_xp );112 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );107 // xptr_t dev_xp = chdev_dir.fbf[0]; 108 109 // assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 110 111 // get FBF chdev cluster and local pointer 112 // cxy_t dev_cxy = GET_CXY( dev_xp ); 113 // chdev_t * dev_ptr = (GET_PTR( dev_xp ); 113 114 114 115 // release FBF ownership 115 remote_spinlock_unlock( XPTR( dev_cxy , &dev_ptr->wait_lock ) ); 116 117 assert( false , "not implemented yet" ); 116 118 117 119 } // end dev_fbf_free() … … 139 141 140 142 // get frame buffer base address, width and height 141 xptr_t base = hal_remote_l wd( XPTR( fbf_cxy , &fbf_ptr->base ) );142 uint32_t width = hal_remote_l w( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.width ) );143 uint32_t height = hal_remote_l w( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.height ) );143 xptr_t base = hal_remote_l64( XPTR( fbf_cxy , &fbf_ptr->base ) ); 144 uint32_t width = hal_remote_l32 ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.width ) ); 145 uint32_t height = hal_remote_l32 ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.height ) ); 144 146 145 147 // check offset and length versus FBF size
Note: See TracChangeset
for help on using the changeset viewer.