lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0fe99eef64fada0cc8b58d7cbfc5a174b3e8ebbc.camel@mediatek.com>
Date:   Tue, 1 Aug 2023 08:02:54 +0000
From:   CK Hu (胡俊光) <ck.hu@...iatek.com>
To:     "maxime@...no.tech" <maxime@...no.tech>,
        Yongqiang Niu (牛永强) 
        <yongqiang.niu@...iatek.com>
CC:     "sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linaro-mm-sig@...ts.linaro.org" <linaro-mm-sig@...ts.linaro.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        "tzimmermann@...e.de" <tzimmermann@...e.de>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Project_Global_Chrome_Upstream_Group 
        <Project_Global_Chrome_Upstream_Group@...iatek.com>,
        "hsinyi@...omium.org" <hsinyi@...omium.org>,
        "airlied@...il.com" <airlied@...il.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>
Subject: Re: [v5, PATCH] drm/mediatek: add dma buffer control for drm plane
 disable

Hi, Maxime:

On Wed, 2023-07-05 at 09:48 +0200, Maxime Ripard wrote:
> Hi,
> 
> On Wed, Jul 05, 2023 at 02:07:18PM +0800, Yongqiang Niu wrote:
> > dma buffer release before overlay disable, that will cause
> > m4u translation fault warning.
> > 
> > add dma buffer control flow in mediatek driver:
> > get dma buffer when drm plane disable
> > put dma buffer when overlay really disable
> > 
> > Fixes: 41016fe1028e ("drm: Rename plane->state variables in atomic
> > update and disable")
> > Signed-off-by: Yongqiang Niu <yongqiang.niu@...iatek.com>
> 
> I think we need more details in the commit message about what the
> issue
> is exactly and how it's fixed.
> 
> This definitely feels like it's not something drivers should have to
> do.

Because MediaTek display hardware has no internal SRAM which could
store the on screen buffer, plane should be updated in vblank period to
prevent tearing effect. In MediaTek plane disable callback function, if
we wait vblank period to disable plane, the software would be blocked
for a long time. If there are four planes to be disabled, the total
blocking time would be almost 4 vsync time. So this patch is just a
work around to use get_dma_buf() to prevent buffer to be freed before
vblank period and not block the software. For the behavior DRM core
free plane buffer just after plane disable callback function return,
I'm not sure it's DRM core's bug or it's DRM core's correct behavior.
If this is correct behavior, it means that DRM core assume that
hardware should have internal SRAM but MediaTek display hardware
violate this assumption. If so, I think I could just accept this work
around patch.

Regards,
CK


> 
> Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ