[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200304171817.GC1852712@kroah.com>
Date: Wed, 4 Mar 2020 18:18:17 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Pavel Machek <pavel@...x.de>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Stephen Boyd <swboyd@...omium.org>,
Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>,
Rob Clark <robdclark@...il.com>,
Sean Paul <seanpaul@...omium.org>,
Douglas Anderson <dianders@...omium.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 04/87] drm/msm: Set dma maximum segment size for mdss
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
Powered by blists - more mailing lists