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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190430180524.22710-1-gael.portay@collabora.com>
Date:   Tue, 30 Apr 2019 14:05:20 -0400
From:   Gaël PORTAY <gael.portay@...labora.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Heiko Stuebner <heiko@...ech.de>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Sandy Huang <hjc@...k-chips.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Gaël PORTAY <gael.portay@...labora.com>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-pm@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Cc:     Douglas Anderson <dianders@...omium.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Derek Basehore <dbasehore@...omium.org>,
        Lin Huang <hl@...k-chips.com>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Boris Brezillon <boris.brezillon@...labora.com>,
        kernel@...labora.com
Subject: [RFC 0/4] Add support for drm/rockchip to dynamically control  the DDR frequency within vblank for gru chromebooks.

Dear all,

The purpose of that RFC is to enable de DMC device for the Rockchip
based GRU Chromebooks, and to add a mean of synchronization between the
Rockchip DRM driver and that DMC devfreq driver.

The DMC device is responsible for updating the DDR frequency according
to the load of the DDR memory. Changing that clock rate within the
display scanout leads to glitches. Thus, the devfreq framework needs a
mean to synchronize the rate change with other devices.

In that case, the DRM driver display has to synchronize a change rate
within the VBLANK.

The first patch adds a locking API to the devfreq framework. The users
of a devfreq device can control the frequency change by locking and
unlocking the devfreq device whenever they want. When a change rate is
requested, and the device is locked, the drivers that hold a lock are
called back, and the change will be applied as soon as the device is
unlocked.

The second patch adds the devfreq support in the Rockchip DRM drivers
and uses the devfreq lock API to defer the change of the DDR frequency
within the next VBLANK. The DRM driver locks the devfreq device and gets
notified when a change is wanted then. Next, it enables the VBLANK
interrupt, releases the lock on interrupt and starts a timer that
relocks the devfreq device at the end of the vertical blanking interval.
Also, the DRM driver disables the devfreq device if more than one CRTC
becomes active.

The third patch merges the Rockchip DDR clock code to the Rockchip DMC
devfreq driver. These drivers both perform SMC calls to the
Trusted-Firmware A to run SiP services that are related to the DDR
memory. This merge puts the code at the same place. It avoids the
contention in the Common Clock Framework that may cause to miss the
deadline during which the rate can be changing without making glitches.

The fourth patch tells display-subsystem to use the DMC devfreq device.

I am waiting for your feedback.

Note: This RFC needs patchset[1]. Its purpose is to addresses the review
that was made in v1[2]. I dropped some patches in v2 to address things
separately (in that RFC).

[1]: https://patchwork.kernel.org/cover/10901577/
[2]: https://lkml.org/lkml/fancy/2018/8/2/7

Best regards,
Gaël PORTAY (3):
  PM / devfreq: add devfreq_lock/unlock() functions
  drm: rockchip: Add DDR devfreq support.
  clk: rockchip: merge clk-ddr in dmc devfreq driver
  arm64: dts: rockchip: Set the display-subsystem devfreq

 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi |   4 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi     |   2 +-
 drivers/clk/rockchip/Makefile                |   1 -
 drivers/clk/rockchip/clk-ddr.c               | 147 --------------
 drivers/clk/rockchip/clk-rk3399.c            |   2 -
 drivers/clk/rockchip/clk.c                   |   9 -
 drivers/clk/rockchip/clk.h                   |  33 ---
 drivers/devfreq/devfreq.c                    | 200 ++++++++++++++++++-
 drivers/devfreq/rk3399_dmc.c                 |  42 ++--
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c  |  51 ++++-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h  |   6 +
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c   | 177 +++++++++++++++-
 drivers/gpu/drm/rockchip/rockchip_drm_fb.h   |   3 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c  |  82 ++++++++
 include/linux/devfreq.h                      |  64 ++++++
 15 files changed, 611 insertions(+), 212 deletions(-)
 delete mode 100644 drivers/clk/rockchip/clk-ddr.c

-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ