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

Commit d2681810 authored by Alan Kwong's avatar Alan Kwong
Browse files

drm/msm/sde: add scale correction to inline rotate prefill



The number of prefill line for inline rotation should be
scaled according to the scale ratio of source pipe. Add scale
correction to inline prefill calculation.

Change-Id: Ic0f2b61b6531a06ad90bd1fd1363d2a0c0e46d6b
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent 1513d3da
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -288,8 +288,9 @@ static void programmable_rot_fetch_config(struct sde_encoder_phys *phys_enc,
		return;

	SDE_DEBUG_VIDENC(vid_enc,
		"rot_fetch_lines %u rot_fetch_start_vsync_counter %u\n",
		rot_fetch_lines, rot_fetch_start_vsync_counter);
		"rot_fetch_lines %u vfp_fetch_lines %u rot_fetch_start_vsync_counter %u\n",
		rot_fetch_lines, vfp_fetch_lines,
		rot_fetch_start_vsync_counter);

	phys_enc->hw_ctl->ops.get_bitmask_intf(
			phys_enc->hw_ctl, &flush_mask, vid_enc->hw_intf->idx);
+1 −1
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ static int sde_hw_rot_commit(struct sde_hw_rot *hw, struct sde_hw_rot_cmd *data,
			SDE_ERROR("failed to get dst format\n");
			return -EINVAL;
		}
	} else if (hw_cmd == SDE_HW_ROT_CMD_COMMIT) {
	} else {
		rc = sde_hw_rot_to_v4l2_pixfmt(data->dst_pixel_format,
				data->dst_modifier, &rot_cmd.dst_pixfmt);
		if (rc) {
+8 −2
Original line number Diff line number Diff line
@@ -1542,8 +1542,14 @@ static u32 sde_plane_rot_calc_prefill(struct drm_plane *plane)
				&blocksize, &blocksize);

	prefill_line = blocksize + sde_kms->catalog->sbuf_headroom;

	SDE_DEBUG("plane%d prefill:%u\n", plane->base.id, prefill_line);
	prefill_line = mult_frac(prefill_line, rstate->out_src_h >> 16,
			state->crtc_h);
	SDE_DEBUG(
		"plane%d.%d blk:%u head:%u vdst/vsrc:%u/%u prefill:%u\n",
			plane->base.id, rstate->sequence_id,
			blocksize, sde_kms->catalog->sbuf_headroom,
			state->crtc_h, rstate->out_src_h >> 16,
			prefill_line);

	return prefill_line;
}
+1 −1
Original line number Diff line number Diff line
@@ -1434,7 +1434,7 @@ static void sde_hw_rotator_setup_wbengine(struct sde_hw_rotator_context *ctx,

	wrptr = sde_hw_rotator_get_regdma_segment(ctx);

	/* setup traffic shaper for 4k 30fps or if prefill_bw is set in sbuf */
	/* setup traffic shaper for 4k 30fps content or if prefill_bw is set */
	if (ctx->is_traffic_shaping || cfg->prefill_bw) {
		u32 bw;