disp: msm: sde: calculate line_time once during modeset

Calculate line_time once during modeset and allow
each plane to use it instead of calculating for each frame.
It also simplifies the line_time calculation for
command mode display.

Change-Id: I94ce29eec94bfdbee9016fbf93378661ebf79c03
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Tento commit je obsažen v:
Dhaval Patel
2021-01-26 14:29:47 -08:00
odevzdal Prabhanjan Kandula
rodič 6de4718ee9
revize b5cde14bca
9 změnil soubory, kde provedl 57 přidání a 67 odebrání

Zobrazit soubor

@@ -300,7 +300,7 @@ struct sde_crtc_misr_info {
* @skip_blend_plane: enabled plane that has skip blending
* @skip_blend_plane_w: skip blend plane width
* @skip_blend_plane_h: skip blend plane height
*
* @line_time_in_ns : current mode line time in nano sec is needed for QOS update
*/
struct sde_crtc {
struct drm_crtc base;
@@ -397,6 +397,7 @@ struct sde_crtc {
enum sde_sspp skip_blend_plane;
u32 skip_blend_plane_w;
u32 skip_blend_plane_h;
u32 line_time_in_ns;
};
enum sde_crtc_dirty_flags {
@@ -741,6 +742,16 @@ static inline bool sde_crtc_is_enabled(struct drm_crtc *crtc)
return crtc ? crtc->enabled : false;
}
static inline u32 sde_crtc_get_line_time(struct drm_crtc *crtc)
{
struct sde_crtc *sde_crtc;
if (!crtc)
return 0;
sde_crtc = to_sde_crtc(crtc);
return sde_crtc->line_time_in_ns;
}
/**
* sde_crtc_is_reset_required - validate the reset request based on the
* pm_suspend and crtc's active status. crtc's are left active