Skip to content

Commit 0866f60

Browse files
author
Alain Volmat
committed
dcmipp: allow PIPE_SetConfig when pipe state is READY
Allow to call HAL_DCMIPP_PIPE_SetConfig when the pipe state is READY. Currently it is only possible to use this function if the pipe state is RESET and ERROR states. Indeed, it is possible to reconfigure the PIPE as soon as the pipe is not currently being used, aka in the READY state. With that done, it becomes possible to change the PIPE configuration between two use-cases without having to DeInit / Init the HAL_DCMIPP or use the unitary pixel packer functions. Signed-off-by: Alain Volmat <[email protected]>
1 parent 1e75326 commit 0866f60

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

stm32cube/stm32h7rsxx/drivers/src/stm32h7rsxx_hal_dcmipp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,8 @@ HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, uint3
490490

491491
if (hdcmipp->State == HAL_DCMIPP_STATE_READY)
492492
{
493-
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) || (pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
493+
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_READY) || (pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) ||
494+
(pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
494495
{
495496
/* Update the DCMIPP PIPE state */
496497
hdcmipp->PipeState[Pipe] = HAL_DCMIPP_PIPE_STATE_BUSY;

stm32cube/stm32mp13xx/drivers/src/stm32mp13xx_hal_dcmipp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ HAL_StatusTypeDef HAL_DCMIPP_PIPE_Config(DCMIPP_HandleTypeDef *phdcmipp, uint32_
484484

485485
if (phdcmipp->State == HAL_DCMIPP_STATE_READY)
486486
{
487-
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) || \
487+
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_READY) ||
488+
(pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) ||
488489
(pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
489490
{
490491
/* Update the DCMIPP PIPE state */

stm32cube/stm32mp2xx/drivers/src/stm32mp2xx_hal_dcmipp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,8 @@ HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, uint3
14141414

14151415
if (hdcmipp->State == HAL_DCMIPP_STATE_READY)
14161416
{
1417-
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) || (pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
1417+
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_READY) || (pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) ||
1418+
(pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
14181419
{
14191420
/* Update the DCMIPP PIPE state */
14201421
hdcmipp->PipeState[Pipe] = HAL_DCMIPP_PIPE_STATE_BUSY;

stm32cube/stm32n6xx/drivers/src/stm32n6xx_hal_dcmipp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,8 @@ HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, uint3
10411041

10421042
if (hdcmipp->State == HAL_DCMIPP_STATE_READY)
10431043
{
1044-
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) || (pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
1044+
if ((pipe_state == HAL_DCMIPP_PIPE_STATE_READY) || (pipe_state == HAL_DCMIPP_PIPE_STATE_RESET) ||
1045+
(pipe_state == HAL_DCMIPP_PIPE_STATE_ERROR))
10451046
{
10461047
/* Update the DCMIPP PIPE state */
10471048
hdcmipp->PipeState[Pipe] = HAL_DCMIPP_PIPE_STATE_BUSY;

0 commit comments

Comments
 (0)