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: <CAJMQK-g8g5QJbBkU-A6th1VSWafxVv2fGtym+enQa_hDVaVoBw@mail.gmail.com>
Date:   Thu, 29 Jul 2021 11:15:23 +0800
From:   Hsin-Yi Wang <hsinyi@...omium.org>
To:     Frank Wunderlich <linux@...web.de>
Cc:     "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>, CK Hu <ck.hu@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        lkml <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
        Frank Wunderlich <frank-w@...lic-files.de>
Subject: Re: [PATCH] soc: mmsys: mediatek: add mask to mmsys routes

On Wed, Jul 28, 2021 at 1:41 AM Frank Wunderlich <linux@...web.de> wrote:
>
> From: CK Hu <ck.hu@...iatek.com>
>
> SOUT has many bits and need to be cleared before set new value.
> Write only could do the clear, but for MOUT, it clears bits that
> should not be cleared. So use a mask to reset only the needed bits.
>
> this fixes HDMI issues on MT7623/BPI-R2 since 5.13
>
> Cc: stable@...r.kernel.org
> Fixes: 440147639ac7 ("soc: mediatek: mmsys: Use an array for setting the routing registers")
> Signed-off-by: Frank Wunderlich <frank-w@...lic-files.de>
> Signed-off-by: CK Hu <ck.hu@...iatek.com>
> ---
> code is taken from here (upstreamed without mask part)
> https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2345186/5
> basicly CK Hu's code so i set him as author
> ---
>  drivers/soc/mediatek/mtk-mmsys.c |   7 +-
>  drivers/soc/mediatek/mtk-mmsys.h | 133 +++++++++++++++++++++----------
>  2 files changed, 98 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
> index 080660ef11bf..0f949896fd06 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -68,7 +68,9 @@ void mtk_mmsys_ddp_connect(struct device *dev,
>
>         for (i = 0; i < mmsys->data->num_routes; i++)
>                 if (cur == routes[i].from_comp && next == routes[i].to_comp) {
> -                       reg = readl_relaxed(mmsys->regs + routes[i].addr) | routes[i].val;
> +                       reg = readl_relaxed(mmsys->regs + routes[i].addr);
> +                       reg &= ~routes[i].mask;
> +                       reg |= routes[i].val;
>                         writel_relaxed(reg, mmsys->regs + routes[i].addr);
>                 }
>  }
> @@ -85,7 +87,8 @@ void mtk_mmsys_ddp_disconnect(struct device *dev,
>
>         for (i = 0; i < mmsys->data->num_routes; i++)
>                 if (cur == routes[i].from_comp && next == routes[i].to_comp) {
> -                       reg = readl_relaxed(mmsys->regs + routes[i].addr) & ~routes[i].val;
> +                       reg = readl_relaxed(mmsys->regs + routes[i].addr);
> +                       reg &= ~routes[i].mask;

This patch is breaking the mt8183 internal display. I think it's
because  ~routes[i].val; is removed?
Also what should the routes[i].mask be if it's not set in
mmsys_mt8183_routing_table?

>                         writel_relaxed(reg, mmsys->regs + routes[i].addr);
>                 }
>  }
<snip>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ