Merge "disp: msm: sde: remove pipe fetch halt check on real plane"
This commit is contained in:

کامیت شده توسط
Gerrit - the friendly Code Review server

کامیت
68a42554a1
@@ -165,8 +165,6 @@ struct sde_hw_pixel_ext {
|
|||||||
* 4: Read 1 line/pixel drop 3 lines/pixels
|
* 4: Read 1 line/pixel drop 3 lines/pixels
|
||||||
* 8: Read 1 line/pixel drop 7 lines/pixels
|
* 8: Read 1 line/pixel drop 7 lines/pixels
|
||||||
* 16: Read 1 line/pixel drop 15 line/pixels
|
* 16: Read 1 line/pixel drop 15 line/pixels
|
||||||
* @index: index of the rectangle of SSPP
|
|
||||||
* @mode: parallel or time multiplex multirect mode
|
|
||||||
*/
|
*/
|
||||||
struct sde_hw_pipe_cfg {
|
struct sde_hw_pipe_cfg {
|
||||||
struct sde_hw_fmt_layout layout;
|
struct sde_hw_fmt_layout layout;
|
||||||
@@ -174,8 +172,6 @@ struct sde_hw_pipe_cfg {
|
|||||||
struct sde_rect dst_rect;
|
struct sde_rect dst_rect;
|
||||||
u8 horz_decimation;
|
u8 horz_decimation;
|
||||||
u8 vert_decimation;
|
u8 vert_decimation;
|
||||||
enum sde_sspp_multirect_index index;
|
|
||||||
enum sde_sspp_multirect_mode mode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1946,84 +1946,19 @@ static int sde_plane_prepare_fb(struct drm_plane *plane,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* _sde_plane_fetch_halt - halts vbif transactions for a plane
|
|
||||||
* @plane: Pointer to plane
|
|
||||||
* Returns: 0 on success
|
|
||||||
*/
|
|
||||||
static int _sde_plane_fetch_halt(struct drm_plane *plane)
|
|
||||||
{
|
|
||||||
struct sde_plane *psde;
|
|
||||||
int xin_id;
|
|
||||||
enum sde_clk_ctrl_type clk_ctrl;
|
|
||||||
struct msm_drm_private *priv;
|
|
||||||
struct sde_kms *sde_kms;
|
|
||||||
|
|
||||||
psde = to_sde_plane(plane);
|
|
||||||
if (!plane || !plane->dev || !psde->pipe_hw) {
|
|
||||||
SDE_ERROR("invalid arguments\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv = plane->dev->dev_private;
|
|
||||||
if (!priv || !priv->kms) {
|
|
||||||
SDE_ERROR("invalid KMS reference\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
sde_kms = to_sde_kms(priv->kms);
|
|
||||||
clk_ctrl = psde->pipe_hw->cap->clk_ctrl;
|
|
||||||
xin_id = psde->pipe_hw->cap->xin_id;
|
|
||||||
SDE_DEBUG_PLANE(psde, "pipe:%d xin_id:%d clk_ctrl:%d\n",
|
|
||||||
psde->pipe - SSPP_VIG0, xin_id, clk_ctrl);
|
|
||||||
SDE_EVT32_VERBOSE(psde, psde->pipe - SSPP_VIG0, xin_id, clk_ctrl);
|
|
||||||
|
|
||||||
return sde_vbif_halt_plane_xin(sde_kms, xin_id, clk_ctrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void sde_plane_cleanup_fb(struct drm_plane *plane,
|
static void sde_plane_cleanup_fb(struct drm_plane *plane,
|
||||||
struct drm_plane_state *old_state)
|
struct drm_plane_state *old_state)
|
||||||
{
|
{
|
||||||
struct sde_plane *psde = to_sde_plane(plane);
|
struct sde_plane *psde = to_sde_plane(plane);
|
||||||
struct sde_plane_state *old_pstate;
|
struct sde_plane_state *old_pstate;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!old_state || !old_state->fb || !plane || !plane->state)
|
if (!old_state || !old_state->fb || !plane)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
old_pstate = to_sde_plane_state(old_state);
|
old_pstate = to_sde_plane_state(old_state);
|
||||||
|
|
||||||
SDE_DEBUG_PLANE(psde, "FB[%u]\n", old_state->fb->base.id);
|
SDE_DEBUG_PLANE(psde, "FB[%u]\n", old_state->fb->base.id);
|
||||||
|
|
||||||
/*
|
|
||||||
* plane->state gets populated for next frame after swap_state. If
|
|
||||||
* plane->state->crtc pointer is not populated then it is not used in
|
|
||||||
* the next frame, hence making it an unused plane.
|
|
||||||
*/
|
|
||||||
if ((plane->state->crtc == NULL) && !psde->is_virtual) {
|
|
||||||
SDE_DEBUG_PLANE(psde, "unused pipe:%u\n",
|
|
||||||
psde->pipe - SSPP_VIG0);
|
|
||||||
|
|
||||||
/* halt this plane now */
|
|
||||||
ret = pm_runtime_get_sync(plane->dev->dev);
|
|
||||||
if (ret < 0) {
|
|
||||||
SDE_ERROR("power resource enable failed with %d", ret);
|
|
||||||
SDE_EVT32(ret, SDE_EVTLOG_ERROR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = _sde_plane_fetch_halt(plane);
|
|
||||||
if (ret) {
|
|
||||||
SDE_ERROR_PLANE(psde,
|
|
||||||
"unused pipe %u halt failed\n",
|
|
||||||
psde->pipe - SSPP_VIG0);
|
|
||||||
SDE_EVT32(DRMID(plane), psde->pipe - SSPP_VIG0,
|
|
||||||
ret, SDE_EVTLOG_ERROR);
|
|
||||||
}
|
|
||||||
pm_runtime_put_sync(plane->dev->dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
msm_framebuffer_cleanup(old_state->fb, old_pstate->aspace);
|
msm_framebuffer_cleanup(old_state->fb, old_pstate->aspace);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
مرجع در شماره جدید
Block a user