mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vince Hsu <vinceh@nvidia.com>
To: <swarren@wwwdotorg.org>, <thierry.reding@gmail.com>,
	<gnurou@gmail.com>, <pdeschrijver@nvidia.com>,
	<bskeggs@redhat.com>, <martin.peres@free.fr>,
	<seven@nimrod-online.com>, <tbergstrom@nvidia.com>
Cc: <nouveau@lists.freedesktop.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Vince Hsu <vinceh@nvidia.com>
Subject: [PATCH nouveau 3/4] platform: add GPU speedo information to nouveau platform
Date: Tue, 2 Dec 2014 12:50:34 +0800	[thread overview]
Message-ID: <1417495835-5556-3-git-send-email-vinceh@nvidia.com> (raw)
In-Reply-To: <1417495835-5556-1-git-send-email-vinceh@nvidia.com>

For GK20A we need the GPU speedo value to calculate voltage levels.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
---
 drm/nouveau_platform.c | 2 ++
 drm/nouveau_platform.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drm/nouveau_platform.c b/drm/nouveau_platform.c
index 9945c2ec2ca3..8871a21ad8fc 100644
--- a/drm/nouveau_platform.c
+++ b/drm/nouveau_platform.c
@@ -28,6 +28,7 @@
 #include <linux/of_device.h>
 #include <linux/reset.h>
 #include <linux/regulator/consumer.h>
+#include <soc/tegra/fuse.h>
 #include <soc/tegra/pmc.h>
 
 #include "nouveau_drm.h"
@@ -179,6 +180,7 @@ static int nouveau_platform_probe(struct platform_device *pdev)
 	}
 
 	device->gpu = gpu;
+	device->gpu_speedo = tegra_sku_info.gpu_speedo_value;
 
 	err = drm_dev_register(drm, 0);
 	if (err < 0)
diff --git a/drm/nouveau_platform.h b/drm/nouveau_platform.h
index 7fe17d1df931..9753a2ea342a 100644
--- a/drm/nouveau_platform.h
+++ b/drm/nouveau_platform.h
@@ -43,6 +43,8 @@ struct nouveau_platform_device {
 	struct nouveau_device device;
 
 	struct nouveau_platform_gpu *gpu;
+
+	int gpu_speedo;
 };
 
 #define nv_device_to_platform(d)                                               \
-- 
1.9.1


  parent reply	other threads:[~2014-12-02  4:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02  4:50 [V3 PATCH 1/4] soc/tegra: fuse: export tegra_sku_info Vince Hsu
2014-12-02  4:50 ` [V3 PATCH nouveau 2/4] volt: allow non-bios voltage scaling Vince Hsu
2014-12-02  4:50 ` Vince Hsu [this message]
2014-12-02  4:50 ` [V3 PATCH nouveau 4/4] volt: add support for GK20A Vince Hsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417495835-5556-3-git-send-email-vinceh@nvidia.com \
    --to=vinceh@nvidia.com \
    --cc=bskeggs@redhat.com \
    --cc=gnurou@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=martin.peres@free.fr \
    --cc=nouveau@lists.freedesktop.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=seven@nimrod-online.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tbergstrom@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®