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: <1508418114.7665.16.camel@pengutronix.de>
Date:   Thu, 19 Oct 2017 15:01:54 +0200
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Matthias Brugger <matthias.bgg@...il.com>,
        ulrich.hecht+renesas@...il.com, laurent.pinchart@...asonboard.com,
        ck.hu@...iatek.com, airlied@...ux.ie, robh+dt@...nel.org,
        mark.rutland@....com
Cc:     linux@...linux.org.uk, catalin.marinas@....com,
        will.deacon@....com, dri-devel@...ts.freedesktop.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [RFC resend] arm64: mt8173: Fix Acer Chromebooks mmsys probe
 problem

On Thu, 2017-10-19 at 13:26 +0200, Matthias Brugger wrote:
> In theory the MMSYS device tree identifier is matches twice, by the clk driver 
> and the DRM subsystem. But the kernel only matches the first driver for a 
> device (clk) and discards the second one. This breaks graphics on mt8173 and 
> most probably on mt2701 as well.
> 
> MMSYS in Mediatek SoCs has some registers to control clock gates (which is 
> used in the clk driver) and some registers to enable the differnet blocks of 
> the display subsystem. The kernel uses the binding to load the central 
> comoponent of the distplay subsystem, which in place probes all the other 
> components and enables the present ones in the MMSYS.
> 
> We found us with the problem, that we need to change and therefor break one 
> of the two bindings, or the DRM one or the clock driver one.
> 
> Apart from that the DRM subysystem does access the MMSYS registers via relaxed 
> reads/writes. But the it should to so via regmap, as the registers are shared.
> 
> Possible solutions:
> 1) We add a new mediatek,mt8173-mmsys-clk node, which lives as a simple-mfd 
> under the actual mmsys node. We change the clock driver to probe on this 
> binding. This would make sense as the clock gate register live completly in 
> the MMSYS configuration registers.

The reason why the drm driver matches against the mmsys node in the
first place is that we wanted to avoid 2).
Also, mmsys is not a pure clock controller, as it also contains the
display path configuration in its register space.

> 2) As the nodes of the DRM subsystem just need some of the registers of MMSYS 
> we add a new binding mediatek,mt8173-dispsys which probes the central 
> component of the DRM system. It has only a handle to mt8173-mmsys to access 
> the registerspace via regmap functions.
> 
> In this patchset I implemented 2). Please take into account, that this is a 
> RFC. I had no time to actually test the verison on real HW. Some of the 
> register accesses should be done using regmap_update instead of 
> regmap_read + regmap_write.
> 
> This RFC shall only show how solution 2) would look like. We can use it as 
> discussion to see how we circumvent the actual situation.

Or we could leave the bindings untouched and create one platform device
from the other or even set up the clocks from the drm driver?

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ