Skip to content

Commit

Permalink
drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y
Browse files Browse the repository at this point in the history
[ Upstream commit 89636a0 ]

Otherwise get following warning:

DMA-API: lima 1c40000.gpu: mapping sg segment longer than device claims to support [len=4149248] [max=65536]

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5496

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211031041604.187216-1-yuq825@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Qiang Yu authored and Greg Kroah-Hartman committed Jan 27, 2022
1 parent 58cddfe commit c718660
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/lima/lima_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ int lima_device_init(struct lima_device *ldev)
struct resource *res;

dma_set_coherent_mask(ldev->dev, DMA_BIT_MASK(32));
dma_set_max_seg_size(ldev->dev, UINT_MAX);

err = lima_clk_init(ldev);
if (err)
Expand Down

0 comments on commit c718660

Please sign in to comment.