[Nouveau] [PATCH 04/19] clk: print the base clocks
Martin Peres
martin.peres at free.fr
Sun Mar 20 17:16:01 UTC 2016
On 18/03/16 01:03, Karol Herbst wrote:
> Signed-off-by: Karol Herbst <nouveau at karolherbst.de>
> ---
> drm/nouveau/nvkm/subdev/clk/base.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
> index 889cce2..4928668 100644
> --- a/drm/nouveau/nvkm/subdev/clk/base.c
> +++ b/drm/nouveau/nvkm/subdev/clk/base.c
> @@ -24,6 +24,7 @@
> #include "priv.h"
>
> #include <subdev/bios.h>
> +#include <subdev/bios/baseclock.h>
> #include <subdev/bios/boost.h>
> #include <subdev/bios/cstep.h>
> #include <subdev/bios/perf.h>
> @@ -561,10 +562,24 @@ int
> nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device,
> int index, bool allow_reclock, struct nvkm_clk *clk)
> {
> + struct nvkm_subdev *subdev = &clk->subdev;
> + struct nvkm_bios *bios = device->bios;
> int ret, idx, arglen;
> const char *mode;
> + struct nvbios_baseclk_header h;
> +
> + nvkm_subdev_ctor(&nvkm_clk, device, index, 0, subdev);
> +
> + if (bios && !nvbios_baseclock_parse(bios, &h)) {
> + struct nvbios_baseclk_entry base, boost;
> + if (!nvbios_baseclock_entry(bios, &h, h.boost, &boost))
> + nvkm_info(subdev, "boost: %i MHz\n",
> + boost.clock_mhz / 2);
> + if (!nvbios_baseclock_entry(bios, &h, h.base, &base))
> + nvkm_info(subdev, "base: %i MHz\n",
> + base.clock_mhz / 2);
> + }
>
> - nvkm_subdev_ctor(&nvkm_clk, device, index, 0, &clk->subdev);
> clk->func = func;
> INIT_LIST_HEAD(&clk->states);
> clk->domains = func->domains;
>
I would rather have you report this information in debugfs, if you don't
mind.
This is really out of place, especially since we do not show the clocks
anymore apparently.
More information about the Nouveau
mailing list