@@ -80,7 +80,7 @@ static u64 _dpu_core_perf_calc_clk(const struct dpu_perf_cfg *perf_cfg,
8080
8181 mode = & state -> adjusted_mode ;
8282
83- crtc_clk = mode -> vtotal * mode -> hdisplay * drm_mode_vrefresh (mode );
83+ crtc_clk = ( u64 ) mode -> vtotal * mode -> hdisplay * drm_mode_vrefresh (mode );
8484
8585 drm_atomic_crtc_for_each_plane (plane , crtc ) {
8686 pstate = to_dpu_plane_state (plane -> state );
@@ -140,6 +140,12 @@ static void _dpu_core_perf_calc_crtc(const struct dpu_core_perf *core_perf,
140140 perf -> max_per_pipe_ib , perf -> bw_ctl );
141141}
142142
143+ /**
144+ * dpu_core_perf_crtc_check - validate performance of the given crtc state
145+ * @crtc: Pointer to crtc
146+ * @state: Pointer to new crtc state
147+ * return: zero if success, or error code otherwise
148+ */
143149int dpu_core_perf_crtc_check (struct drm_crtc * crtc ,
144150 struct drm_crtc_state * state )
145151{
@@ -301,6 +307,12 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
301307 return clk_rate ;
302308}
303309
310+ /**
311+ * dpu_core_perf_crtc_update - update performance of the given crtc
312+ * @crtc: Pointer to crtc
313+ * @params_changed: true if crtc parameters are modified
314+ * return: zero if success, or error code otherwise
315+ */
304316int dpu_core_perf_crtc_update (struct drm_crtc * crtc ,
305317 int params_changed )
306318{
@@ -446,6 +458,11 @@ static const struct file_operations dpu_core_perf_mode_fops = {
446458 .write = _dpu_core_perf_mode_write ,
447459};
448460
461+ /**
462+ * dpu_core_perf_debugfs_init - initialize debugfs for core performance context
463+ * @dpu_kms: Pointer to the dpu_kms struct
464+ * @parent: Pointer to parent debugfs
465+ */
449466int dpu_core_perf_debugfs_init (struct dpu_kms * dpu_kms , struct dentry * parent )
450467{
451468 struct dpu_core_perf * perf = & dpu_kms -> perf ;
@@ -482,6 +499,12 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
482499}
483500#endif
484501
502+ /**
503+ * dpu_core_perf_init - initialize the given core performance context
504+ * @perf: Pointer to core performance context
505+ * @perf_cfg: Pointer to platform performance configuration
506+ * @max_core_clk_rate: Maximum core clock rate
507+ */
485508int dpu_core_perf_init (struct dpu_core_perf * perf ,
486509 const struct dpu_perf_cfg * perf_cfg ,
487510 unsigned long max_core_clk_rate )
0 commit comments