mirror of https://gitee.com/openkylin/linux.git
drm/imx: ipuv3-plane: fix frame rate regression on non-plus i.MX6Q
Fix a regression introduced by70e8a0c71e
("drm/imx: ipuv3-plane: add function to query atomic update status") that halves the frame rate on non-plus i.MX6Q, because the pending check always returns "pending" even if an update is actually applied. -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCXO5pYxcccC56YWJlbEBw ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwDwZAP4oMXmOOAE4ZAB1r/TjPAQ/IK1j 2Jg9EtGdbKn+vPQMJgD/YP5TcdUzOjbbHMnlGV/SAkxpz4+8IvOI/N6XkiEI/gY= =bJyj -----END PGP SIGNATURE----- Merge tag 'imx-drm-fixes-2019-05-29' of git://git.pengutronix.de/git/pza/linux into drm-fixes drm/imx: ipuv3-plane: fix frame rate regression on non-plus i.MX6Q Fix a regression introduced by70e8a0c71e
("drm/imx: ipuv3-plane: add function to query atomic update status") that halves the frame rate on non-plus i.MX6Q, because the pending check always returns "pending" even if an update is actually applied. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/1559128738.3651.4.camel@pengutronix.de
This commit is contained in:
commit
2a3e0b7162
|
@ -605,7 +605,6 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
|
||||||
active = ipu_idmac_get_current_buffer(ipu_plane->ipu_ch);
|
active = ipu_idmac_get_current_buffer(ipu_plane->ipu_ch);
|
||||||
ipu_cpmem_set_buffer(ipu_plane->ipu_ch, !active, eba);
|
ipu_cpmem_set_buffer(ipu_plane->ipu_ch, !active, eba);
|
||||||
ipu_idmac_select_buffer(ipu_plane->ipu_ch, !active);
|
ipu_idmac_select_buffer(ipu_plane->ipu_ch, !active);
|
||||||
ipu_plane->next_buf = !active;
|
|
||||||
if (ipu_plane_separate_alpha(ipu_plane)) {
|
if (ipu_plane_separate_alpha(ipu_plane)) {
|
||||||
active = ipu_idmac_get_current_buffer(ipu_plane->alpha_ch);
|
active = ipu_idmac_get_current_buffer(ipu_plane->alpha_ch);
|
||||||
ipu_cpmem_set_buffer(ipu_plane->alpha_ch, !active,
|
ipu_cpmem_set_buffer(ipu_plane->alpha_ch, !active,
|
||||||
|
@ -710,7 +709,6 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
|
||||||
ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 1, eba);
|
ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 1, eba);
|
||||||
ipu_idmac_lock_enable(ipu_plane->ipu_ch, num_bursts);
|
ipu_idmac_lock_enable(ipu_plane->ipu_ch, num_bursts);
|
||||||
ipu_plane_enable(ipu_plane);
|
ipu_plane_enable(ipu_plane);
|
||||||
ipu_plane->next_buf = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct drm_plane_helper_funcs ipu_plane_helper_funcs = {
|
static const struct drm_plane_helper_funcs ipu_plane_helper_funcs = {
|
||||||
|
@ -732,10 +730,15 @@ bool ipu_plane_atomic_update_pending(struct drm_plane *plane)
|
||||||
|
|
||||||
if (ipu_state->use_pre)
|
if (ipu_state->use_pre)
|
||||||
return ipu_prg_channel_configure_pending(ipu_plane->ipu_ch);
|
return ipu_prg_channel_configure_pending(ipu_plane->ipu_ch);
|
||||||
else if (ipu_plane->next_buf >= 0)
|
|
||||||
return ipu_idmac_get_current_buffer(ipu_plane->ipu_ch) !=
|
|
||||||
ipu_plane->next_buf;
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Pretend no update is pending in the non-PRE/PRG case. For this to
|
||||||
|
* happen, an atomic update would have to be deferred until after the
|
||||||
|
* start of the next frame and simultaneously interrupt latency would
|
||||||
|
* have to be high enough to let the atomic update finish and issue an
|
||||||
|
* event before the previous end of frame interrupt handler can be
|
||||||
|
* executed.
|
||||||
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int ipu_planes_assign_pre(struct drm_device *dev,
|
int ipu_planes_assign_pre(struct drm_device *dev,
|
||||||
|
|
|
@ -27,7 +27,6 @@ struct ipu_plane {
|
||||||
int dp_flow;
|
int dp_flow;
|
||||||
|
|
||||||
bool disabling;
|
bool disabling;
|
||||||
int next_buf;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
|
struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
|
||||||
|
|
Loading…
Reference in New Issue