disp: msm: sde: decouple FETCH_PIPE_ACTIVE logic from setup_blendstages

Setup blendstages is done per LM but FETCH_PIPE_ACTIVE is per CTL.
Overloading mixer blendstage setup with fetch pipe logic can lead
to HW programming errors. Refactor the logic for setting
FETCH_PIPE_ACTIVE by adding a new op that allows caller to provide
a bitmask of all pipes required to be active on this CTL. This new
logic includes support for:
 - 4LM use-cases, staging pipes for all LMs within a CRTC
 - Demura fetch-pipe without need for tracking via active_cfg (removed)

Also, lower the cyclomatic complexity in setup_blendstages by moving
the logic for obtaining the mixer config settings in to a helper
function.

Change-Id: I2907b359ffad5734be5b06f44919b5ddb1ef3f7c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Этот коммит содержится в:
Steve Cohen
2020-04-22 01:26:54 -04:00
коммит произвёл Gerrit - the friendly Code Review server
родитель 947fa56080
Коммит b9e3d4aebb
5 изменённых файлов: 107 добавлений и 111 удалений

Просмотреть файл

@@ -433,11 +433,9 @@ struct sde_hw_ctl_ops {
* @ctx : ctl path ctx pointer
* @lm : layer mixer enumeration
* @cfg : blend stage configuration
* @active_cfg: active no blend stage configuration
*/
void (*setup_blendstage)(struct sde_hw_ctl *ctx,
enum sde_lm lm, struct sde_hw_stage_cfg *cfg,
struct sde_hw_stage_cfg *active_cfg);
enum sde_lm lm, struct sde_hw_stage_cfg *cfg);
/**
* Get all the sspp staged on a layer mixer
@@ -465,6 +463,14 @@ struct sde_hw_ctl_ops {
* @Return: error code
*/
int (*get_start_state)(struct sde_hw_ctl *ctx);
/**
* set the active fetch pipes attached to this CTL
* @ctx : ctl path ctx pointer
* @fetch_active: bitmap of enum sde_sspp pipes attached
*/
void (*set_active_pipes)(struct sde_hw_ctl *ctx,
unsigned long *fetch_active);
};
/**