disp: msm: dsi: add pre and post DSI command transfer controller APIs

To transfer a command on the DSI lanes, the following programming needs
to happen prior and post a command transfer:
- Vote/Unvote for clocks
- Enable/Disable command engine
- Mask/Unmask overflow and underflow errors.
These operations are done from the display context currently. This can
lead to issues during an ASYNC command wait, where in we queue the
dma_wait_for_done rather than wait in the same display thread.

The following change adds new DSI controller API that does the above
programming from the controller context. This way, post command transfer
operations can only happen once command is successfully transferred and
dma_wait_for_done completes.

Change-Id: I61db0d8a2656dc6e0e56864dbef01283b813d7c6
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:
Satya Rama Aditya Pinapala
2021-04-15 11:46:50 -07:00
förälder 72f7dfe428
incheckning aecc86dfb2
4 ändrade filer med 348 tillägg och 322 borttagningar

Visa fil

@@ -188,8 +188,7 @@ struct dsi_display_ext_bridge {
* @te_source vsync source pin information
* @clk_gating_config Clocks for which clock gating needs to be enabled
* @queue_cmd_waits Indicates if wait for dma commands done has to be queued.
* @dma_cmd_workq: Pointer to the workqueue of DMA command transfer done
* wait sequence.
* @post_cmd_tx_workq: Pointer to the workqueue of post command transfer work.
* @is_active: status of the display
* @trusted_vm_env: Set to true, it the executing VM is Trusted VM.
* Set to false, otherwise.
@@ -287,7 +286,7 @@ struct dsi_display {
u32 te_source;
u32 clk_gating_config;
bool queue_cmd_waits;
struct workqueue_struct *dma_cmd_workq;
struct workqueue_struct *post_cmd_tx_workq;
/* panel id of the display */
u64 panel_id;