diff options
author | Hoegeun Kwon <hoegeun.kwon@samsung.com> | 2019-01-11 09:55:37 +0900 |
---|---|---|
committer | Hoegeun Kwon <hoegeun.kwon@samsung.com> | 2019-01-11 10:09:33 +0900 |
commit | f39059d32beaa67b096a6680592b17044141cf07 (patch) | |
tree | c0856b24cb9f26ad6bdadcad21eefcf4e690effc | |
parent | 5cba57115a86792e77b3f9291dce49c610fd55b7 (diff) | |
download | linux-4.9-exynos9110-f39059d32beaa67b096a6680592b17044141cf07.tar.gz linux-4.9-exynos9110-f39059d32beaa67b096a6680592b17044141cf07.tar.bz2 linux-4.9-exynos9110-f39059d32beaa67b096a6680592b17044141cf07.zip |
drm/tgm: tdm_pp: fix not to call sync fence without fence/dma_bufsubmit/tizen/20190111.030902accepted/tizen/unified/20190114.060130
When without fence or dma_buf, tdm_pp tries to call sync fence and
it causes null deference or not necessary error message. Fix not
to call sync fence without fence or dma_buf.
Change-Id: Ic762185f1934c7dd0489a2dc8332d5bace29bae5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
-rw-r--r-- | drivers/gpu/drm/tgm/tdm_pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tgm/tdm_pp.c b/drivers/gpu/drm/tgm/tdm_pp.c index 9239c0bc7e6c..f0c3a5a7eb9b 100644 --- a/drivers/gpu/drm/tgm/tdm_pp.c +++ b/drivers/gpu/drm/tgm/tdm_pp.c @@ -621,7 +621,7 @@ static int pp_put_mem_node(struct drm_device *drm_dev, } #ifdef CONFIG_DRM_DMA_SYNC - if (!IS_ERR(m_node->fence)) { + if (!IS_ERR_OR_NULL(m_node->fence)) { if (tdm_fence_signal(drm_dev, m_node->fence)) { DRM_ERROR("tdm_fence_signal{%s]\n", m_node->ops_id ? "dst" : "src"); @@ -977,7 +977,7 @@ static int pp_set_mem_node(struct tdm_ppdrv *ppdrv, #ifdef CONFIG_DRM_DMA_SYNC dma_buf = tbm_gem_get_dma_buf(ppdrv->drm_dev, ppdrv->dev, m_node->buf_info.handles[0], c_node->filp); - if (!IS_ERR(dma_buf)) { + if (!IS_ERR_OR_NULL(dma_buf)) { m_node->fence = tdm_fence(ppdrv->drm_dev, dma_buf); if (IS_ERR(m_node->fence)) DRM_INFO("%s:failed to get fence[%s]\n", __func__, |