[PATCH v6 19/19] drm/msm/dpu: add wb_idx to DRM traces in dpu_encoder

Abhinav Kumar quic_abhinavk at quicinc.com
Wed Apr 27 14:41:29 UTC 2022


Hi Dmitry

Thanks for fixing it up.

I agree about the indentation issue.

And yes even wb_idx missing in TP_ARGS seems like a geniune miss.

But the weird part is it did not break my compilation. I tested even now 
without your fix.

Am I missing something to be enabled in my config to replicate the error 
for future reference?

Thanks

Abhinav
On 4/27/2022 3:43 AM, Dmitry Baryshkov wrote:
> On 26/04/2022 17:41, Abhinav Kumar wrote:
>> Change the DRM traces to include both the intf_mode
>> and wb_idx similar to the DRM prints in the previous change.
>>
>> Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> 
> This commit got traces broken. I'm going to apply a fix.
> 
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 ++++++++-----
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h   | 26 
>> ++++++++++++++++++--------
>>   2 files changed, 26 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> index 35080c4..52516eb 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> @@ -1354,8 +1354,9 @@ static void dpu_encoder_frame_done_callback(
>>                * suppress frame_done without waiter,
>>                * likely autorefresh
>>                */
>> -            trace_dpu_enc_frame_done_cb_not_busy(DRMID(drm_enc),
>> -                    event, ready_phys->intf_idx);
>> +            trace_dpu_enc_frame_done_cb_not_busy(DRMID(drm_enc), event,
>> +                    
>> dpu_encoder_helper_get_intf_type(ready_phys->intf_mode),
>> +                    ready_phys->intf_idx, ready_phys->wb_idx);
>>               return;
>>           }
>> @@ -1433,9 +1434,11 @@ static void _dpu_encoder_trigger_flush(struct 
>> drm_encoder *drm_enc,
>>       if (ctl->ops.get_pending_flush)
>>           ret = ctl->ops.get_pending_flush(ctl);
>> -    trace_dpu_enc_trigger_flush(DRMID(drm_enc), phys->intf_idx,
>> -                    pending_kickoff_cnt, ctl->idx,
>> -                    extra_flush_bits, ret);
>> +    trace_dpu_enc_trigger_flush(DRMID(drm_enc),
>> +            dpu_encoder_helper_get_intf_type(phys->intf_mode),
>> +            phys->intf_idx, phys->wb_idx,
>> +            pending_kickoff_cnt, ctl->idx,
>> +            extra_flush_bits, ret);
>>   }
>>   /**
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
>> index 58b411f..1106d44 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
>> @@ -380,20 +380,26 @@ TRACE_EVENT(dpu_enc_rc,
>>   );
>>   TRACE_EVENT(dpu_enc_frame_done_cb_not_busy,
>> -    TP_PROTO(uint32_t drm_id, u32 event, enum dpu_intf intf_idx),
>> -    TP_ARGS(drm_id, event, intf_idx),
>> +    TP_PROTO(uint32_t drm_id, u32 event, char *intf_mode, enum 
>> dpu_intf intf_idx,
>> +            enum dpu_wb wb_idx),
>> +    TP_ARGS(drm_id, event, intf_mode, intf_idx, wb_idx),
>>       TP_STRUCT__entry(
>>           __field(    uint32_t,    drm_id        )
>>           __field(    u32,        event        )
>> +        __string(    intf_mode_str,        intf_mode    )
>>           __field(    enum dpu_intf,    intf_idx    )
>> +        __field(    enum dpu_wb,  wb_idx    )
> 
> Nit: indentation broken. Please use tabs.
> 
>>       ),
>>       TP_fast_assign(
>>           __entry->drm_id = drm_id;
>>           __entry->event = event;
>> +        __assign_str(intf_mode_str, intf_mode);
>>           __entry->intf_idx = intf_idx;
>> +        __entry->wb_idx = wb_idx;
>>       ),
>> -    TP_printk("id=%u, event=%u, intf=%d", __entry->drm_id, 
>> __entry->event,
>> -          __entry->intf_idx)
>> +    TP_printk("id=%u, event=%u, intf_mode=%s intf=%d wb=%d", 
>> __entry->drm_id,
>> +            __entry->event, __get_str(intf_mode_str),
>> +            __entry->intf_idx, __entry->wb_idx)
>>   );
>>   TRACE_EVENT(dpu_enc_frame_done_cb,
>> @@ -415,14 +421,16 @@ TRACE_EVENT(dpu_enc_frame_done_cb,
>>   );
>>   TRACE_EVENT(dpu_enc_trigger_flush,
>> -    TP_PROTO(uint32_t drm_id, enum dpu_intf intf_idx,
>> +    TP_PROTO(uint32_t drm_id, char *intf_mode, enum dpu_intf 
>> intf_idx, enum dpu_wb wb_idx,
>>            int pending_kickoff_cnt, int ctl_idx, u32 extra_flush_bits,
>>            u32 pending_flush_ret),
>> -    TP_ARGS(drm_id, intf_idx, pending_kickoff_cnt, ctl_idx,
>> +    TP_ARGS(drm_id, intf_mode, intf_idx, pending_kickoff_cnt, ctl_idx,
>>           extra_flush_bits, pending_flush_ret),
> 
> wb_idx is missing from the TP_ARGS, so compilation fails.
> 
>>       TP_STRUCT__entry(
>>           __field(    uint32_t,    drm_id            )
>> +        __string(    intf_mode_str,    intf_mode    )
>>           __field(    enum dpu_intf,    intf_idx        )
>> +        __field(    enum dpu_wb,  wb_idx        )
> 
> Nit: indentation broken. Please use tabs.
> 
>>           __field(    int,        pending_kickoff_cnt    )
>>           __field(    int,        ctl_idx            )
>>           __field(    u32,        extra_flush_bits    )
>> @@ -430,15 +438,17 @@ TRACE_EVENT(dpu_enc_trigger_flush,
>>       ),
>>       TP_fast_assign(
>>           __entry->drm_id = drm_id;
>> +        __assign_str(intf_mode_str, intf_mode);
>>           __entry->intf_idx = intf_idx;
>> +        __entry->wb_idx = wb_idx;
>>           __entry->pending_kickoff_cnt = pending_kickoff_cnt;
>>           __entry->ctl_idx = ctl_idx;
>>           __entry->extra_flush_bits = extra_flush_bits;
>>           __entry->pending_flush_ret = pending_flush_ret;
>>       ),
>> -    TP_printk("id=%u, intf_idx=%d, pending_kickoff_cnt=%d ctl_idx=%d "
>> +    TP_printk("id=%u, intf_mode=%s, intf_idx=%d, wb_idx=%d, 
>> pending_kickoff_cnt=%d ctl_idx=%d "
>>             "extra_flush_bits=0x%x pending_flush_ret=0x%x",
>> -          __entry->drm_id, __entry->intf_idx,
>> +          __entry->drm_id, __get_str(intf_mode_str), 
>> __entry->intf_idx, __entry->wb_idx,
>>             __entry->pending_kickoff_cnt, __entry->ctl_idx,
>>             __entry->extra_flush_bits, __entry->pending_flush_ret)
>>   );
> 
> 


More information about the dri-devel mailing list