Commit f85acdad authored by Chun-Kuang Hu's avatar Chun-Kuang Hu

drm/mediatek: Use CPU when fail to get cmdq event

Even though cmdq client is created successfully, without the cmdq event,
cmdq could not work correctly, so use CPU when fail to get cmdq event.

Fixes: 60fa8c13 ("drm/mediatek: Move gce event property to mutex device node")
Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
parent 855f3e08
...@@ -831,13 +831,19 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, ...@@ -831,13 +831,19 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
drm_crtc_index(&mtk_crtc->base)); drm_crtc_index(&mtk_crtc->base));
mtk_crtc->cmdq_client = NULL; mtk_crtc->cmdq_client = NULL;
} }
if (mtk_crtc->cmdq_client) {
ret = of_property_read_u32_index(priv->mutex_node, ret = of_property_read_u32_index(priv->mutex_node,
"mediatek,gce-events", "mediatek,gce-events",
drm_crtc_index(&mtk_crtc->base), drm_crtc_index(&mtk_crtc->base),
&mtk_crtc->cmdq_event); &mtk_crtc->cmdq_event);
if (ret) if (ret) {
dev_dbg(dev, "mtk_crtc %d failed to get mediatek,gce-events property\n", dev_dbg(dev, "mtk_crtc %d failed to get mediatek,gce-events property\n",
drm_crtc_index(&mtk_crtc->base)); drm_crtc_index(&mtk_crtc->base));
cmdq_mbox_destroy(mtk_crtc->cmdq_client);
mtk_crtc->cmdq_client = NULL;
}
}
#endif #endif
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment