Skip to content

Commit

Permalink
drm/imx: ipuv3-plane: add IDMAC timeout warning
Browse files Browse the repository at this point in the history
ipu_plane_disable should never be called while the plane IDMAC channel
is active. The busy wait is just a safety net that should never time
out.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
  • Loading branch information
Philipp Zabel committed Nov 5, 2018
1 parent 815b02e commit 97c78f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/imx/ipuv3-plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,15 @@ static void ipu_plane_enable(struct ipu_plane *ipu_plane)

void ipu_plane_disable(struct ipu_plane *ipu_plane, bool disable_dp_channel)
{
int ret;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);

ipu_idmac_wait_busy(ipu_plane->ipu_ch, 50);
ret = ipu_idmac_wait_busy(ipu_plane->ipu_ch, 50);
if (ret == -ETIMEDOUT) {
DRM_ERROR("[PLANE:%d] IDMAC timeout\n",
ipu_plane->base.base.id);
}

if (ipu_plane->dp && disable_dp_channel)
ipu_dp_disable_channel(ipu_plane->dp, false);
Expand Down

0 comments on commit 97c78f4

Please sign in to comment.