[PATCH v3] drm/msm/dpu: remove CRTC frame event callback registration

Abhinav Kumar quic_abhinavk at quicinc.com
Mon Jun 24 23:01:34 UTC 2024



On 6/24/2024 3:38 PM, Dmitry Baryshkov wrote:
> The frame event callback is always set to dpu_crtc_frame_event_cb() (or
> to NULL) and the data is always either the CRTC itself or NULL
> (correpondingly). Thus drop the event callback registration, call the
> dpu_crtc_frame_event_cb() directly and gate on the dpu_enc->crtc
> assigned using dpu_encoder_assign_crtc().
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---
> Changes in v3:
> - Fixed documentation for dpu_crtc_frame_event_cb() to stop mentioning
>    registration. (Abhinav)
> - Link to v2: https://lore.kernel.org/dri-devel/20231005220659.2404199-1-dmitry.baryshkov@linaro.org/
> 
> Changes in v2:
> - Rebased on top of linux-next
> - Link to v1: https://lore.kernel.org/dri-devel/20230102154748.951328-1-dmitry.baryshkov@linaro.org/
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c    | 25 +++++++-----------
>   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h    |  2 ++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 41 +++++------------------------
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 10 -------
>   drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h   |  4 ---
>   5 files changed, 18 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 9f2164782844..4c1be2f0555f 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -658,18 +658,18 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work)
>   	DPU_ATRACE_END("crtc_frame_event");
>   }
>   
> -/*
> - * dpu_crtc_frame_event_cb - crtc frame event callback API. CRTC module
> - * registers this API to encoder for all frame event callbacks like
> - * frame_error, frame_done, idle_timeout, etc. Encoder may call different events
> - * from different context - IRQ, user thread, commit_thread, etc. Each event
> - * should be carefully reviewed and should be processed in proper task context
> - * to avoid schedulin delay or properly manage the irq context's bottom half
> - * processing.
> +/**
> + * dpu_crtc_frame_event_cb - crtc frame event callback API
> + * @crtc: Pointer to crtc
> + * @event: Event to process
> + *
> + * Encoder may call this for different events from different context - IRQ,
> + * user thread, commit_thread, etc. Each event should be carefully reviewed and
> + * should be processed in proper task context to avoid schedulin delay or
> + * properly manage the irq context's bottom half processing.
>    */

schedulin -> scheduling

Apart from that,

Reviewed-by: Abhinav Kumar <quic_abhinavk at quicinc.com>


More information about the dri-devel mailing list