disp: msm: fix kw issues in sde and dp driver
This change addresses out of range and null checks in sde and dp driver. Change-Id: I142196d7394f0bf0abab1bfa89abfd784a5521c8 Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This commit is contained in:
@@ -114,8 +114,14 @@ static struct page **get_pages(struct drm_gem_object *obj)
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) {
|
||||
aspace_dev = msm_gem_get_aspace_device(msm_obj->aspace);
|
||||
dma_map_sg(aspace_dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
if (aspace_dev)
|
||||
dma_map_sg(aspace_dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents,
|
||||
DMA_BIDIRECTIONAL);
|
||||
else
|
||||
dev_err(dev->dev,
|
||||
"failed to get aspace_device\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,8 +196,12 @@ void msm_gem_sync(struct drm_gem_object *obj)
|
||||
* scatter/gather mapping for the CPU and device.
|
||||
*/
|
||||
aspace_dev = msm_gem_get_aspace_device(msm_obj->aspace);
|
||||
dma_sync_sg_for_device(aspace_dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
if (aspace_dev)
|
||||
dma_sync_sg_for_device(aspace_dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
else
|
||||
dev_err(obj->dev->dev,
|
||||
"failed to get aspace_device\n");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user