On Wed, Mar 04, 2020 at 04:13:16PM +0100, Pavel Machek wrote: > Hi! > > > Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: > > > > [ 12.078665] msm ae00000.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] > > [ 12.089870] WARNING: CPU: 6 PID: 334 at > > /mnt/host/source/src/third_party/kernel/v4.19/kernel/dma/debug.c:1301 > > debug_dma_map_sg+0x1dc/0x318 > > This one leaks resources in the (very improbable) case of error; it > needs to goto cleanup instead of simply returning. > > > +++ b/drivers/gpu/drm/msm/msm_drv.c > > @@ -492,6 +492,14 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) > > if (ret) > > goto err_msm_uninit; > > > > + if (!dev->dma_parms) { > > + dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), > > + GFP_KERNEL); > > + if (!dev->dma_parms) > > + return -ENOMEM; > > + } > > + dma_set_max_seg_size(dev, DMA_BIT_MASK(32)); > > + > > msm_gem_shrinker_init(ddev); > > Can you submit a patch to fix it? thanks, greg k-h