Skip to content

Commit

Permalink
Pipeline: relinquish CPU upon return
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Jan 15, 2025
1 parent f1e14b4 commit 8e46ced
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/develop/develop.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ void dt_dev_process_preview_job(dt_develop_t *dev)
dt_show_times(&thread_start, "[dev_process_preview] pixel pipeline thread");
dt_dev_average_delay_update(&thread_start, &dev->preview_average_delay);

dt_iop_nap(200);

if(ret && dev->preview_pipe->status == DT_DEV_PIXELPIPE_INVALID) finish_on_error = TRUE;
}
dev->preview_pipe->processing = 0;
Expand Down Expand Up @@ -487,6 +489,8 @@ void dt_dev_process_image_job(dt_develop_t *dev)

dt_dev_average_delay_update(&thread_start, &dev->average_delay);

dt_iop_nap(200);

if(ret && dev->pipe->status == DT_DEV_PIXELPIPE_INVALID) finish_on_error = TRUE;
}
dev->pipe->processing = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/develop/pixelpipe_hb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ static void collect_histogram_on_CPU(dt_dev_pixelpipe_t *pipe, dt_develop_t *dev
dt_opencl_release_mem_object(*cl_mem_output); \
*cl_mem_output = NULL; \
} \
dt_iop_nap(200); \
pipe->status = DT_DEV_PIXELPIPE_DIRTY; \
return 1; \
}
Expand All @@ -1229,6 +1230,7 @@ static void collect_histogram_on_CPU(dt_dev_pixelpipe_t *pipe, dt_develop_t *dev
dt_opencl_release_mem_object(*cl_mem_output); \
*cl_mem_output = NULL; \
} \
dt_iop_nap(200); \
pipe->status = DT_DEV_PIXELPIPE_DIRTY; \
return 1; \
}
Expand Down Expand Up @@ -2295,6 +2297,7 @@ static int dt_dev_pixelpipe_process_rec_and_backcopy(dt_dev_pixelpipe_t *pipe, d
if(dt_atomic_get_int(&pipe->shutdown)) \
{ \
pipe->status = DT_DEV_PIXELPIPE_DIRTY; \
dt_iop_nap(200); \
return 1; \
}

Expand Down

0 comments on commit 8e46ced

Please sign in to comment.