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

Commit bd55da9a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: update sspp dirty flags if inline cfg changes"

parents f4bdc191 317a957d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "sde_color_processing.h"
#include "sde_encoder.h"
#include "sde_connector.h"
#include "sde_vbif.h"
#include "sde_power_handle.h"
#include "sde_core_perf.h"
#include "sde_trace.h"
@@ -1322,7 +1323,8 @@ static void _sde_crtc_blend_setup_mixer(struct drm_crtc *crtc,
				state->src_w >> 16, state->src_h >> 16,
				state->crtc_x, state->crtc_y,
				state->crtc_w, state->crtc_h,
				cstate->sbuf_cfg.rot_op_mode);
				flush_tmp ? cstate->sbuf_cfg.rot_op_mode :
				SDE_CTL_ROT_OP_MODE_OFFLINE);

		stage_idx = zpos_cnt[pstate->stage]++;
		stage_cfg->stage[pstate->stage][stage_idx] =
@@ -2221,6 +2223,7 @@ static int _sde_crtc_wait_for_frame_done(struct drm_crtc *crtc)

void sde_crtc_commit_kickoff(struct drm_crtc *crtc)
{
	struct drm_plane *plane;
	struct drm_encoder *encoder;
	struct drm_device *dev;
	struct sde_crtc *sde_crtc;
@@ -2291,6 +2294,12 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc)
	}
	sde_crtc->play_count++;

	if (cstate->sbuf_cfg.rot_op_mode != SDE_CTL_ROT_OP_MODE_OFFLINE)
		drm_atomic_crtc_for_each_plane(plane, crtc)
			sde_plane_kickoff(plane);

	sde_vbif_clear_errors(sde_kms);

	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
		if (encoder->crtc != crtc)
			continue;
+24 −0
Original line number Diff line number Diff line
@@ -33,11 +33,34 @@
#define VBIF_OUT_WR_LIM_CONF0		0x00D4
#define VBIF_OUT_AXI_AMEMTYPE_CONF0	0x0160
#define VBIF_OUT_AXI_AMEMTYPE_CONF1	0x0164
#define VBIF_XIN_PND_ERR		0x0190
#define VBIF_XIN_SRC_ERR		0x0194
#define VBIF_XIN_CLR_ERR		0x019C
#define VBIF_XIN_HALT_CTRL0		0x0200
#define VBIF_XIN_HALT_CTRL1		0x0204
#define VBIF_XINL_QOS_RP_REMAP_000	0x0550
#define VBIF_XINL_QOS_LVL_REMAP_000	0x0590

static void sde_hw_clear_errors(struct sde_hw_vbif *vbif,
		u32 *pnd_errors, u32 *src_errors)
{
	struct sde_hw_blk_reg_map *c;
	u32 pnd, src;

	if (!vbif)
		return;
	c = &vbif->hw;
	pnd = SDE_REG_READ(c, VBIF_XIN_PND_ERR);
	src = SDE_REG_READ(c, VBIF_XIN_SRC_ERR);

	if (pnd_errors)
		*pnd_errors = pnd;
	if (src_errors)
		*src_errors = src;

	SDE_REG_WRITE(c, VBIF_XIN_CLR_ERR, pnd | src);
}

static void sde_hw_set_mem_type(struct sde_hw_vbif *vbif,
		u32 xin_id, u32 value)
{
@@ -192,6 +215,7 @@ static void _setup_vbif_ops(struct sde_hw_vbif_ops *ops,
	if (test_bit(SDE_VBIF_QOS_REMAP, &cap))
		ops->set_qos_remap = sde_hw_set_qos_remap;
	ops->set_mem_type = sde_hw_set_mem_type;
	ops->clear_errors = sde_hw_clear_errors;
	ops->set_write_gather_en = sde_hw_set_write_gather_en;
}

+12 −0
Original line number Diff line number Diff line
@@ -81,6 +81,18 @@ struct sde_hw_vbif_ops {
	void (*set_mem_type)(struct sde_hw_vbif *vbif,
			u32 xin_id, u32 value);

	/**
	 * clear_errors - clear any vbif errors
	 *	This function clears any detected pending/source errors
	 *	on the VBIF interface, and optionally returns the detected
	 *	error mask(s).
	 * @vbif: vbif context driver
	 * @pnd_errors: pointer to pending error reporting variable
	 * @src_errors: pointer to source error reporting variable
	 */
	void (*clear_errors)(struct sde_hw_vbif *vbif,
		u32 *pnd_errors, u32 *src_errors);

	/**
	 * set_write_gather_en - set write_gather enable
	 * @vbif: vbif context driver
+17 −17
Original line number Diff line number Diff line
@@ -1753,7 +1753,7 @@ static void sde_plane_rot_calc_cfg(struct drm_plane *plane,
			drm_rect_height(&rstate->out_rot_rect) >> 16,
			rstate->out_rot_rect.x1 >> 16,
			rstate->out_rot_rect.y1 >> 16);
	SDE_EVT32_VERBOSE(DRMID(plane), rstate->sequence_id,
	SDE_EVT32(DRMID(plane), rstate->sequence_id,
			rstate->out_xpos, rstate->nplane,
			in_rot->x1 >> 16, in_rot->y1 >> 16,
			drm_rect_width(in_rot) >> 16,
@@ -2258,6 +2258,11 @@ static int sde_plane_rot_atomic_check(struct drm_plane *plane,
		if (ret)
			return ret;

		if (rstate->nplane != old_rstate->nplane ||
				rstate->out_xpos != old_rstate->out_xpos)
			pstate->dirty |= SDE_PLANE_DIRTY_FORMAT |
				SDE_PLANE_DIRTY_RECTS;

		/* check if stream buffer is already attached to rotator */
		_sde_plane_rot_get_fb(plane, cstate, rstate);

@@ -2355,16 +2360,18 @@ static void sde_plane_rot_atomic_update(struct drm_plane *plane,
	sde_plane_rot_submit_command(plane, state, SDE_HW_ROT_CMD_COMMIT);
}

/**
 * sde_plane_rot_flush - perform final flush related rotator options
 * @plane: Pointer to drm plane
 * @pstate: Pointer to sde plane state
 */
static void sde_plane_rot_flush(struct drm_plane *plane,
		struct sde_plane_state *pstate)
void sde_plane_kickoff(struct drm_plane *plane)
{
	if (!plane || !pstate || !pstate->rot.rot_hw ||
			!pstate->rot.rot_hw->ops.commit)
	struct sde_plane_state *pstate;

	if (!plane || !plane->state) {
		SDE_ERROR("invalid plane\n");
		return;
	}

	pstate = to_sde_plane_state(plane->state);

	if (!pstate->rot.rot_hw || !pstate->rot.rot_hw->ops.commit)
		return;

	pstate->rot.rot_hw->ops.commit(pstate->rot.rot_hw,
@@ -3142,10 +3149,6 @@ static int sde_plane_atomic_check(struct drm_plane *plane,
	return ret;
}

/**
 * sde_plane_flush - final plane operations before commit flush
 * @plane: Pointer to drm plane structure
 */
void sde_plane_flush(struct drm_plane *plane)
{
	struct sde_plane *psde;
@@ -3179,9 +3182,6 @@ void sde_plane_flush(struct drm_plane *plane)
	/* flag h/w flush complete */
	if (plane->state)
		pstate->pending = false;

	/* signal inline rotator start */
	sde_plane_rot_flush(plane, pstate);
}

static int sde_plane_sspp_atomic_update(struct drm_plane *plane,
+6 −0
Original line number Diff line number Diff line
@@ -226,6 +226,12 @@ void sde_plane_restore(struct drm_plane *plane);
 */
void sde_plane_flush(struct drm_plane *plane);

/**
 * sde_plane_kickoff - final plane operations before commit kickoff
 * @plane: Pointer to drm plane structure
 */
void sde_plane_kickoff(struct drm_plane *plane);

/**
 * sde_plane_init - create new sde plane for the given pipe
 * @dev:   Pointer to DRM device
Loading