Loading drivers/gpu/drm/msm/sde/sde_encoder_phys.h +16 −10 Original line number Diff line number Diff line Loading @@ -651,17 +651,23 @@ void sde_encoder_helper_update_intf_cfg( static inline bool _sde_encoder_phys_is_dual_ctl( struct sde_encoder_phys *phys_enc) { struct sde_kms *sde_kms; enum sde_rm_topology_name topology; if (!phys_enc) if (!phys_enc) { pr_err("invalid phys_enc\n"); return false; } sde_kms = phys_enc->sde_kms; if (!sde_kms) { pr_err("invalid kms\n"); return false; } topology = sde_connector_get_topology_name(phys_enc->connector); if ((topology == SDE_RM_TOPOLOGY_DUALPIPE_DSC) || (topology == SDE_RM_TOPOLOGY_DUALPIPE)) return true; return false; return sde_rm_topology_is_dual_ctl(&sde_kms->rm, topology); } /** Loading @@ -674,8 +680,10 @@ static inline bool _sde_encoder_phys_is_ppsplit( { enum sde_rm_topology_name topology; if (!phys_enc) if (!phys_enc) { pr_err("invalid phys_enc\n"); return false; } topology = sde_connector_get_topology_name(phys_enc->connector); if (topology == SDE_RM_TOPOLOGY_PPSPLIT) Loading @@ -690,10 +698,8 @@ static inline bool sde_encoder_phys_needs_single_flush( if (!phys_enc) return false; return phys_enc->cont_splash_enabled ? phys_enc->cont_splash_single_flush : (_sde_encoder_phys_is_ppsplit(phys_enc) || _sde_encoder_phys_is_dual_ctl(phys_enc)); return (_sde_encoder_phys_is_ppsplit(phys_enc) || !_sde_encoder_phys_is_dual_ctl(phys_enc)); } /** Loading drivers/gpu/drm/msm/sde/sde_rm.c +0 −11 Original line number Diff line number Diff line Loading @@ -39,17 +39,6 @@ (t).num_comp_enc == (r).num_enc && \ (t).num_intf == (r).num_intf) #define SINGLE_CTL 1 struct sde_rm_topology_def { enum sde_rm_topology_name top_name; int num_lm; int num_comp_enc; int num_intf; int num_ctl; int needs_split_display; }; /** * toplogy information to be used when ctl path version does not * support driving more than one interface per ctl_path Loading drivers/gpu/drm/msm/sde/sde_rm.h +40 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ #include "msm_kms.h" #include "sde_hw_top.h" #define SINGLE_CTL 1 #define DUAL_CTL 2 /** * enum sde_rm_topology_name - HW resource use case in use by connector * @SDE_RM_TOPOLOGY_NONE: No topology in use currently Loading Loading @@ -79,6 +82,24 @@ enum sde_rm_qsync_modes { SDE_RM_QSYNC_CONTINUOUS_MODE, }; /** * struct sde_rm_topology_def - Topology table definition * @top_name: name identifying this topology * @num_lm: number of layer mixers used * @num_comp_enc: number of encoders used * @num_intf: number of interface used * @num_ctl: number of control path used * @needs_split_display: If set split display is enabled */ struct sde_rm_topology_def { enum sde_rm_topology_name top_name; int num_lm; int num_comp_enc; int num_intf; int num_ctl; int needs_split_display; }; /** * struct sde_rm - SDE dynamic hardware resource manager * @dev: device handle for event logging purposes Loading Loading @@ -245,4 +266,23 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv, int sde_rm_update_topology(struct drm_connector_state *conn_state, struct msm_display_topology *topology); /** * sde_rm_topology_is_dual_ctl - checks if topoloy requires two control paths * @rm: SDE Resource Manager handle * @topology: topology selected for the display * @return: true if two control paths are required or false */ static inline bool sde_rm_topology_is_dual_ctl(struct sde_rm *rm, enum sde_rm_topology_name topology) { if ((!rm) || (topology <= SDE_RM_TOPOLOGY_NONE) || (topology >= SDE_RM_TOPOLOGY_MAX)) { pr_err("invalid arguments: rm:%d topology:%d\n", rm == NULL, topology); return false; } return rm->topology_tbl[topology].num_ctl == DUAL_CTL; } #endif /* __SDE_RM_H__ */ Loading
drivers/gpu/drm/msm/sde/sde_encoder_phys.h +16 −10 Original line number Diff line number Diff line Loading @@ -651,17 +651,23 @@ void sde_encoder_helper_update_intf_cfg( static inline bool _sde_encoder_phys_is_dual_ctl( struct sde_encoder_phys *phys_enc) { struct sde_kms *sde_kms; enum sde_rm_topology_name topology; if (!phys_enc) if (!phys_enc) { pr_err("invalid phys_enc\n"); return false; } sde_kms = phys_enc->sde_kms; if (!sde_kms) { pr_err("invalid kms\n"); return false; } topology = sde_connector_get_topology_name(phys_enc->connector); if ((topology == SDE_RM_TOPOLOGY_DUALPIPE_DSC) || (topology == SDE_RM_TOPOLOGY_DUALPIPE)) return true; return false; return sde_rm_topology_is_dual_ctl(&sde_kms->rm, topology); } /** Loading @@ -674,8 +680,10 @@ static inline bool _sde_encoder_phys_is_ppsplit( { enum sde_rm_topology_name topology; if (!phys_enc) if (!phys_enc) { pr_err("invalid phys_enc\n"); return false; } topology = sde_connector_get_topology_name(phys_enc->connector); if (topology == SDE_RM_TOPOLOGY_PPSPLIT) Loading @@ -690,10 +698,8 @@ static inline bool sde_encoder_phys_needs_single_flush( if (!phys_enc) return false; return phys_enc->cont_splash_enabled ? phys_enc->cont_splash_single_flush : (_sde_encoder_phys_is_ppsplit(phys_enc) || _sde_encoder_phys_is_dual_ctl(phys_enc)); return (_sde_encoder_phys_is_ppsplit(phys_enc) || !_sde_encoder_phys_is_dual_ctl(phys_enc)); } /** Loading
drivers/gpu/drm/msm/sde/sde_rm.c +0 −11 Original line number Diff line number Diff line Loading @@ -39,17 +39,6 @@ (t).num_comp_enc == (r).num_enc && \ (t).num_intf == (r).num_intf) #define SINGLE_CTL 1 struct sde_rm_topology_def { enum sde_rm_topology_name top_name; int num_lm; int num_comp_enc; int num_intf; int num_ctl; int needs_split_display; }; /** * toplogy information to be used when ctl path version does not * support driving more than one interface per ctl_path Loading
drivers/gpu/drm/msm/sde/sde_rm.h +40 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ #include "msm_kms.h" #include "sde_hw_top.h" #define SINGLE_CTL 1 #define DUAL_CTL 2 /** * enum sde_rm_topology_name - HW resource use case in use by connector * @SDE_RM_TOPOLOGY_NONE: No topology in use currently Loading Loading @@ -79,6 +82,24 @@ enum sde_rm_qsync_modes { SDE_RM_QSYNC_CONTINUOUS_MODE, }; /** * struct sde_rm_topology_def - Topology table definition * @top_name: name identifying this topology * @num_lm: number of layer mixers used * @num_comp_enc: number of encoders used * @num_intf: number of interface used * @num_ctl: number of control path used * @needs_split_display: If set split display is enabled */ struct sde_rm_topology_def { enum sde_rm_topology_name top_name; int num_lm; int num_comp_enc; int num_intf; int num_ctl; int needs_split_display; }; /** * struct sde_rm - SDE dynamic hardware resource manager * @dev: device handle for event logging purposes Loading Loading @@ -245,4 +266,23 @@ int sde_rm_cont_splash_res_init(struct msm_drm_private *priv, int sde_rm_update_topology(struct drm_connector_state *conn_state, struct msm_display_topology *topology); /** * sde_rm_topology_is_dual_ctl - checks if topoloy requires two control paths * @rm: SDE Resource Manager handle * @topology: topology selected for the display * @return: true if two control paths are required or false */ static inline bool sde_rm_topology_is_dual_ctl(struct sde_rm *rm, enum sde_rm_topology_name topology) { if ((!rm) || (topology <= SDE_RM_TOPOLOGY_NONE) || (topology >= SDE_RM_TOPOLOGY_MAX)) { pr_err("invalid arguments: rm:%d topology:%d\n", rm == NULL, topology); return false; } return rm->topology_tbl[topology].num_ctl == DUAL_CTL; } #endif /* __SDE_RM_H__ */