feat(ppa): add PPA driver support for ESP32P4

Remove the check for in_accepting_trans_state
Add color_pixel_xxxx_data_t structures to color_types.h
Fix PM lock protection (Tested, now works well)
* CPU_MAX, PM lock and semaphore order
* Remove ppa_driver PM lock
Modify concurrency (queue, trans recycle, semaphore, ...)
Add programming guide
Add test apps
This commit is contained in:
Song Ruo Jing
2024-05-23 16:40:56 +08:00
parent 916c0ef8d1
commit 8464fac845
27 changed files with 906 additions and 132 deletions
+1 -5
View File
@@ -78,7 +78,6 @@ struct ppa_client_t {
ppa_engine_t *engine; // Pointer to the PPA engine that in charge of performing the PPA operation
uint32_t trans_cnt; // Number of pending PPA transactions
portMUX_TYPE spinlock; // Client level spinlock
bool in_accepting_trans_state; // Indicates whether the client can accept new PPA transaction requests now
ppa_event_callback_t done_cb; // Transaction done callback
QueueHandle_t trans_elm_ptr_queue; // Queue that contains the pointers to the allocated memory to save the transaction contexts
};
@@ -141,7 +140,7 @@ typedef struct {
uint32_t fg_alpha_fix_val;
float fg_alpha_scale_ratio;
};
uint32_t fg_fix_rgb_val;
color_pixel_rgb888_data_t fg_fix_rgb_val;
// color-keying
bool bg_ck_en;
@@ -209,9 +208,6 @@ struct ppa_platform_t {
uint32_t blend_engine_ref_count; // Reference count used to protect PPA blending engine acquire and release
size_t buf_alignment_size; // Alignment requirement for the outgoing buffer addr and size to satisfy cache line size
uint32_t dma_desc_mem_size; // Alignment requirement for the 2D-DMA descriptor to satisfy cache line size
#if CONFIG_PM_ENABLE
esp_pm_lock_handle_t pm_lock; // Power management lock
#endif
};
#ifdef __cplusplus