Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05f9aac3 authored by Lloyd Atkinson's avatar Lloyd Atkinson
Browse files

drm/msm/sde: separate ppsplit utilities in cmd encoder



Split the utility functions for determining pingpong split
topology and pingpong split slave encoder for reuse.

Change-Id: If79597444bf9356281a29226c93802cdc4e2c4b7
Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
parent 68e85fd7
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -135,8 +135,7 @@ static void sde_encoder_phys_cmd_pp_rd_ptr_irq(void *arg, int irq_idx)
			phys_enc);
}

static bool _sde_encoder_phys_is_ppsplit_slave(
		struct sde_encoder_phys *phys_enc)
static bool _sde_encoder_phys_is_ppsplit(struct sde_encoder_phys *phys_enc)
{
	enum sde_rm_topology_name topology;

@@ -144,8 +143,7 @@ static bool _sde_encoder_phys_is_ppsplit_slave(
		return false;

	topology = sde_connector_get_topology_name(phys_enc->connector);
	if (topology == SDE_RM_TOPOLOGY_PPSPLIT &&
			phys_enc->split_role == ENC_ROLE_SLAVE)
	if (topology == SDE_RM_TOPOLOGY_PPSPLIT)
		return true;

	return false;
@@ -199,6 +197,16 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
	return -ETIMEDOUT;
}

static bool _sde_encoder_phys_is_ppsplit_slave(
		struct sde_encoder_phys *phys_enc)
{
	if (!phys_enc)
		return false;

	return _sde_encoder_phys_is_ppsplit(phys_enc) &&
			phys_enc->split_role == ENC_ROLE_SLAVE;
}

static int _sde_encoder_phys_cmd_wait_for_idle(
		struct sde_encoder_phys *phys_enc)
{
@@ -463,13 +471,10 @@ static void sde_encoder_phys_cmd_pingpong_config(
static bool sde_encoder_phys_cmd_needs_single_flush(
		struct sde_encoder_phys *phys_enc)
{
	enum sde_rm_topology_name topology;

	if (!phys_enc)
		return false;

	topology = sde_connector_get_topology_name(phys_enc->connector);
	return topology == SDE_RM_TOPOLOGY_PPSPLIT;
	return _sde_encoder_phys_is_ppsplit(phys_enc);
}

static int sde_encoder_phys_cmd_control_vblank_irq(