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

Commit 1db00c18 authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm/sde: report qseed3 h/w version in plane caps



Report the contents of the qseed 3 hardware version
register to the user space via the existing capabilities
blob property. This allows the user space the option
of modifying its scaler configuration based on the
indicated hardware version.

Change-Id: Iebaa0199969607d5da5d0b68fb9735665da20673
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent d57b062b
Loading
Loading
Loading
Loading
+13 −1
Original line number Original line Diff line number Diff line
@@ -768,6 +768,16 @@ static void _sde_hw_sspp_setup_scaler3(struct sde_hw_pipe *ctx,
	SDE_REG_WRITE(&ctx->hw, QSEED3_OP_MODE + idx, op_mode);
	SDE_REG_WRITE(&ctx->hw, QSEED3_OP_MODE + idx, op_mode);
}
}


static u32 _sde_hw_sspp_get_scaler3_ver(struct sde_hw_pipe *ctx)
{
	u32 idx;

	if (!ctx || _sspp_subblk_offset(ctx, SDE_SSPP_SCALER_QSEED3, &idx))
		return 0;

	return SDE_REG_READ(&ctx->hw, QSEED3_HW_VERSION + idx);
}

/**
/**
 * sde_hw_sspp_setup_rects()
 * sde_hw_sspp_setup_rects()
 */
 */
@@ -1167,8 +1177,10 @@ static void _setup_layer_ops(struct sde_hw_pipe *c,
	if (sde_hw_sspp_multirect_enabled(c->cap))
	if (sde_hw_sspp_multirect_enabled(c->cap))
		c->ops.setup_multirect = sde_hw_sspp_setup_multirect;
		c->ops.setup_multirect = sde_hw_sspp_setup_multirect;


	if (test_bit(SDE_SSPP_SCALER_QSEED3, &features))
	if (test_bit(SDE_SSPP_SCALER_QSEED3, &features)) {
		c->ops.setup_scaler = _sde_hw_sspp_setup_scaler3;
		c->ops.setup_scaler = _sde_hw_sspp_setup_scaler3;
		c->ops.get_scaler_ver = _sde_hw_sspp_get_scaler3_ver;
	}


	if (test_bit(SDE_SSPP_HSIC, &features)) {
	if (test_bit(SDE_SSPP_HSIC, &features)) {
		/* TODO: add version based assignment here as inline or macro */
		/* TODO: add version based assignment here as inline or macro */
+6 −0
Original line number Original line Diff line number Diff line
@@ -574,6 +574,12 @@ struct sde_hw_sspp_ops {
		struct sde_hw_pixel_ext *pe_cfg,
		struct sde_hw_pixel_ext *pe_cfg,
		void *scaler_cfg);
		void *scaler_cfg);


	/**
	 * get_scaler_ver - get scaler h/w version
	 * @ctx: Pointer to pipe context
	 */
	u32 (*get_scaler_ver)(struct sde_hw_pipe *ctx);

	/**
	/**
	 * setup_sys_cache - setup system cache configuration
	 * setup_sys_cache - setup system cache configuration
	 * @ctx: Pointer to pipe context
	 * @ctx: Pointer to pipe context
+4 −0
Original line number Original line Diff line number Diff line
@@ -3806,6 +3806,10 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
		sde_kms_info_stop(info);
		sde_kms_info_stop(info);
	}
	}


	if (psde->pipe_hw && psde->pipe_hw->ops.get_scaler_ver)
		sde_kms_info_add_keyint(info, "scaler_step_ver",
			psde->pipe_hw->ops.get_scaler_ver(psde->pipe_hw));

	sde_kms_info_add_keyint(info, "max_linewidth",
	sde_kms_info_add_keyint(info, "max_linewidth",
			psde->pipe_sblk->maxlinewidth);
			psde->pipe_sblk->maxlinewidth);
	sde_kms_info_add_keyint(info, "max_upscale",
	sde_kms_info_add_keyint(info, "max_upscale",