]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mediatek: Stop iterating dma addresses when sg_dma_len() == 0
authorAnand K Mistry <amistry@chromium.org>
Mon, 20 Apr 2020 06:08:34 +0000 (16:08 +1000)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Wed, 20 May 2020 16:10:08 +0000 (00:10 +0800)
commit1a7a13c6a58232da0b5cd8de0f9baf17d9b73f0c
treeedd0bd1b54812bee275e4be3582b2cc9fac066e8
parentf7400fb8ee62f193c383c7f351967c66ab45a0cd
drm/mediatek: Stop iterating dma addresses when sg_dma_len() == 0

If dma_map_sg() merges pages when creating the mapping, only the first
entries will have a valid sg_dma_address() and sg_dma_len(), followed by
entries with sg_dma_len() == 0.

Signed-off-by: Anand K Mistry <amistry@google.com>
Signed-off-by: Anand K Mistry <amistry@chromium.org>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_gem.c