mirror of
				https://github.com/nyanmisaka/mpp.git
				synced 2025-10-31 12:36:44 +08:00 
			
		
		
		
	 16ce9d1f6b
			
		
	
	16ce9d1f6b
	
	
	
		
			
			Batch mode will send multiple task to kernel at one time. And its non-block poll is triggered by timer and looper. This mode will reduce the ioctl overhead on ultra multi-instance case. Main features and some notes: 1. Each client type has independence batch server. 2. Each mpp_device can attach or not attach to server independently. 3. When a device is attached to server all its tasks will be sent to kernel through the server session not original client session. 4. The tasks are sent non-block and wait in block or non-block. 5. The batch mode can only be switch on/off when hardware is not working. Change-Id: I07462d852cb002259d2873e13c12f6f8a489ba8e Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			971 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			971 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Copyright 2021 Rockchip Electronics Co. LTD
 | |
|  *
 | |
|  * Licensed under the Apache License, Version 2.0 (the "License");
 | |
|  * you may not use this file except in compliance with the License.
 | |
|  * You may obtain a copy of the License at
 | |
|  *
 | |
|  *      http://www.apache.org/licenses/LICENSE-2.0
 | |
|  *
 | |
|  * Unless required by applicable law or agreed to in writing, software
 | |
|  * distributed under the License is distributed on an "AS IS" BASIS,
 | |
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
|  * See the License for the specific language governing permissions and
 | |
|  * limitations under the License.
 | |
|  */
 | |
| 
 | |
| #ifndef __MPP_SERVER_H__
 | |
| #define __MPP_SERVER_H__
 | |
| 
 | |
| #include "mpp_device.h"
 | |
| 
 | |
| #ifdef  __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| MPP_RET mpp_server_attach(MppDev ctx);
 | |
| MPP_RET mpp_server_detach(MppDev ctx);
 | |
| 
 | |
| MPP_RET mpp_server_send_task(MppDev ctx);
 | |
| MPP_RET mpp_server_wait_task(MppDev ctx, RK_S64 timeout);
 | |
| 
 | |
| #ifdef  __cplusplus
 | |
| }
 | |
| #endif
 | |
| 
 | |
| #endif /* __MPP_SERVER_H__ */
 |