|
|
Log in / Subscribe / Register

clk: Implement a clock request API

From:  Maxime Ripard <maxime-AT-cerno.tech>
To:  Mike Turquette <mturquette-AT-baylibre.com>, Stephen Boyd <sboyd-AT-kernel.org>, dri-devel-AT-lists.freedesktop.org, Daniel Vetter <daniel.vetter-AT-intel.com>, David Airlie <airlied-AT-linux.ie>, Maarten Lankhorst <maarten.lankhorst-AT-linux.intel.com>, Thomas Zimmermann <tzimmermann-AT-suse.de>, Maxime Ripard <maxime-AT-cerno.tech>
Subject:  [PATCH v2 0/3] clk: Implement a clock request API
Date:  Tue, 14 Sep 2021 11:35:12 +0200
Message-ID:  <20210914093515.260031-1-maxime@cerno.tech>
Cc:  Maxime Ripard <mripard-AT-kernel.org>, linux-clk-AT-vger.kernel.org, Dave Stevenson <dave.stevenson-AT-raspberrypi.com>, Phil Elwell <phil-AT-raspberrypi.com>, Tim Gover <tim.gover-AT-raspberrypi.com>, Dom Cobley <dom-AT-raspberrypi.com>, Emma Anholt <emma-AT-anholt.net>, linux-kernel-AT-vger.kernel.org, Russell King <linux-AT-armlinux.org.uk>
Archive-link:  Article

Hi,

This is a follow-up of the discussion here:
https://lore.kernel.org/linux-clk/20210319150355.xzw7ikwd...

This implements a mechanism to raise and lower clock rates based on consumer
workloads, with an example of such an implementation for the RaspberryPi4 HDMI
controller.

There's a couple of things worth discussing:

  - The name is in conflict with clk_request_rate, and even though it feels
    like the right name to me, we should probably avoid any confusion

  - The code so far implements a policy of always going for the lowest rate
    possible. While we don't have an use-case for something else, this should
    maybe be made more flexible?

Let me know what you think
Maxime

Changes from v1:
  - Return NULL in clk_request_start if clk pointer is NULL
  - Test for clk_req pointer in clk_request_done
  - Add another user in vc4
  - Rebased on top of v5.15-rc1

Dom Cobley (1):
  drm/vc4: hvs: Convert to the new clock request API

Maxime Ripard (2):
  clk: Introduce a clock request API
  drm/vc4: hdmi: Convert to the new clock request API

 drivers/clk/clk.c              | 126 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/vc4/vc4_hdmi.c |  15 ++--
 drivers/gpu/drm/vc4/vc4_hdmi.h |   3 +
 drivers/gpu/drm/vc4/vc4_kms.c  |   5 +-
 include/linux/clk.h            |   4 ++
 5 files changed, 146 insertions(+), 7 deletions(-)

-- 
2.31.1



Copyright © 2021, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds