search for: speedo

Displaying 20 results from an estimated 64 matches for "speedo".

Did you mean: speed
2016 Apr 19
2
[PATCH v4 20/37] volt: add coefficients
...dy. Yeah, this is definitely not up to date! > > These coefficients were REed by modifing the voltage map entries and by > calculating the set voltage back until I was able to forecast which voltage > nvidia sets for a given voltage map entry. > > v4: use better coefficients and speedo > > Signed-off-by: Karol Herbst <nouveau at karolherbst.de> > --- > drm/nouveau/nvkm/subdev/volt/base.c | 38 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvk...
2016 Sep 16
1
[PATCH] volt: use kernel's 64-bit signed division function
...--git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 90d234231eed..e8569b04b55d 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -116,9 +116,9 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) return volt->speedo; if (ver == 0x10 || (ver == 0x20 && info.mode == 0)) { - result = (s64)info.arg[0] / 10; - result += ((s64)info.arg[1] * volt->speedo) / 10; - result += ((s64)info.arg[2] * volt->speedo * volt->speedo) / 100000; + result = div64_s64((s64)info.arg[0], 10); + result...
2023 Jun 09
1
[RESEND 08/15] drm/nouveau/nvkm/subdev/volt/gk20a: Demote kerneldoc abuses
...45111..ccac88da88648 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c @@ -45,7 +45,7 @@ static const struct cvb_coef gk20a_cvb_coef[] = { /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, }; -/** +/* * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) */ static inline int @@ -58,7 +58,7 @@ gk20a_volt_get_cvb_voltage(int speedo, int s_scale, const struct cvb_coef *coef) return mv; } -/** +/* * cvb_t_mv = * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + * ((c3 * speedo / s_scale + c4...
2023 Aug 24
1
[PATCH 04/20] drm/nouveau/nvkm/subdev/volt/gk20a: Demote kerneldoc abuses
...45111..ccac88da88648 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c @@ -45,7 +45,7 @@ static const struct cvb_coef gk20a_cvb_coef[] = { /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, }; -/** +/* * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) */ static inline int @@ -58,7 +58,7 @@ gk20a_volt_get_cvb_voltage(int speedo, int s_scale, const struct cvb_coef *coef) return mv; } -/** +/* * cvb_t_mv = * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + * ((c3 * speedo / s_scale + c4...
2016 Apr 18
0
[PATCH v4 18/37] volt: add speedo
...diff --git a/drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h index f223577..4cb0292 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -20,6 +20,8 @@ struct nvkm_volt { u8 max0_id; u8 max1_id; u8 max2_id; + + int speedo; }; int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature); diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 028c6e2..cecfac6 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -201,6 +201,14 @@ nvk...
2016 Apr 18
0
[PATCH v4 20/37] volt: add coefficients
...e, so this change causes no harm and improves the situation a lot already. These coefficients were REed by modifing the voltage map entries and by calculating the set voltage back until I was able to forecast which voltage nvidia sets for a given voltage map entry. v4: use better coefficients and speedo Signed-off-by: Karol Herbst <nouveau at karolherbst.de> --- drm/nouveau/nvkm/subdev/volt/base.c | 38 +++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index cecfac6....
2023 Dec 31
0
[PATCH 4/4] drm/nouveau/volt/gk20a: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: gk20a.c:49: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) gk20a.c:49: warning: missing initial short description on line: * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) gk20a.c:62: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/...
2014 Nov 28
8
[RESEND V2 PATCH 1/3] soc/tegra: fuse: export tegra_sku_info for module use
Some Tegra drivers might be complied as kernel modules, and they need the fuse information for initialization. One example is the GK20A Nouveau driver. It needs the GPU speedo value to calculate frequency-voltage table. So export the tegra_sku_info. Signed-off-by: Vince Hsu <vinceh at nvidia.com> --- v2: add more description why we need this patch drivers/soc/tegra/fuse/fuse-tegra.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/tegra/fuse/fuse...
2014 Nov 28
0
[PATCH 2/2] volt: add support for GK20A
...078, -274, -60, -1526, 30}, + /* 708 */ { 1415522, -17497, -274, -60, -458, 0}, + /* 756 */ { 1464061, -18331, -274, -119, 1831, -72}, + /* 804 */ { 1524225, -20064, -254, -119, 4272, -155}, + /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, +}; + +/** + * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + */ +static inline int +gk20a_volt_get_cvb_voltage(int speedo, int s_scale, + const struct cvb_coef *coef) +{ + int mv; + + mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale); + mv = DIV_ROUND_CLOSEST((mv + coef->c1) * speedo, s_scale) + coef->c0;...
2014 Nov 28
0
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
...078, -274, -60, -1526, 30}, + /* 708 */ { 1415522, -17497, -274, -60, -458, 0}, + /* 756 */ { 1464061, -18331, -274, -119, 1831, -72}, + /* 804 */ { 1524225, -20064, -254, -119, 4272, -155}, + /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, +}; + +/** + * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + */ +static inline int +gk20a_volt_get_cvb_voltage(int speedo, int s_scale, + const struct cvb_coef *coef) +{ + int mv; + + mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale); + mv = DIV_ROUND_CLOSEST((mv + coef->c1) * speedo, s_scale) + coef->c0;...
2014 Nov 28
2
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
.../* 708 */ { 1415522, -17497, -274, -60, -458, 0}, > + /* 756 */ { 1464061, -18331, -274, -119, 1831, -72}, > + /* 804 */ { 1524225, -20064, -254, -119, 4272, -155}, > + /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, > +}; > + > +/** > + * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) > + */ > +static inline int > +gk20a_volt_get_cvb_voltage(int speedo, int s_scale, > + const struct cvb_coef *coef) > +{ > + int mv; > + > + mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale); > + mv = DIV_ROUND_CLOSEST((mv + c...
2014 Nov 28
0
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
...-60, -458, 0}, >> + /* 756 */ { 1464061, -18331, -274, -119, 1831, -72}, >> + /* 804 */ { 1524225, -20064, -254, -119, 4272, -155}, >> + /* 852 */ { 1608418, -21643, -269, 0, 763, -48}, >> +}; >> + >> +/** >> + * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) >> + */ >> +static inline int >> +gk20a_volt_get_cvb_voltage(int speedo, int s_scale, >> + const struct cvb_coef *coef) >> +{ >> + int mv; >> + >> + mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_s...
2014 Dec 01
2
[V3 PATCH 1/3] soc/tegra: fuse: export tegra_sku_info
Some Tegra drivers might be compiled as kernel modules, and they need the fuse information for initialization. One example is the GK20A Nouveau driver. It needs the GPU speedo value to calculate frequency-voltage table. So export the tegra_sku_info. Signed-off-by: Vince Hsu <vinceh at nvidia.com> Acked-by: Alexandre Courbot <acourbot at nvidia.com> Acked-by: Thierry Reding <treding at nvidia.com> --- v3: fix subject and typo, add reviewers' Acked-...
2014 Nov 28
2
[PATCH 1/2] volt: allow non-bios voltage scaling
Signed-off-by: Vince Hsu <vinceh at nvidia.com> --- nvkm/subdev/volt/base.c | 67 ++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/nvkm/subdev/volt/base.c b/nvkm/subdev/volt/base.c index 32794a999106..26ccd8df193f 100644 --- a/nvkm/subdev/volt/base.c +++ b/nvkm/subdev/volt/base.c @@ -101,6 +101,41 @@ nouveau_volt_set_id(struct
2014 Dec 02
3
[V3 PATCH 1/4] soc/tegra: fuse: export tegra_sku_info
Some Tegra drivers might be compiled as kernel modules, and they need the fuse information for initialization. One example is the GK20A Nouveau driver. It needs the GPU speedo value to calculate frequency-voltage table. So export the tegra_sku_info. Signed-off-by: Vince Hsu <vinceh at nvidia.com> Acked-by: Alexandre Courbot <acourbot at nvidia.com> Acked-by: Thierry Reding <treding at nvidia.com> --- v3: fix subject and typo, add reviewers' Acked-...
2023 Dec 31
4
[PATCH 1/4] drm/nouveau/disp: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent kernel-doc warnings: crtc.c:453: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Sets up registers for the given mode/adjusted_mode pair. crtc.c:453: warning: missing initial short description on line: * Sets up registers for
2016 Apr 18
0
[PATCH v4 36/37] WIP volt/gk104: readout speedo
this gk104 volt implementation has to be reworked a little, because the speedo readout in maxwell doesn't need those strange 0 and 41 writes into 0x122634, but it needs this PWM thing. Maybe Maxwell is PWM only and we could just simplify it there, but without proper knowledge there has some refactoring to be made. Signed-off-by: Karol Herbst <nouveau at karolherbst.d...
2016 Apr 19
0
[PATCH v4 20/37] volt: add coefficients
On Tue, Apr 19, 2016 at 5:52 PM, Martin Peres <martin.peres at free.fr> wrote: >> + result = ((s64)info.arg[0] * 15625) >> >> 18; >> + result += ((s64)info.arg[1] * volt->speedo >> * 15625) >> 18; >> + result += ((s64)info.arg[2] * temp * >> 15625) >> 10; >> + result += ((s64)info.arg[3] * volt->speedo >> * temp * 15625) >> 18; >> +...
2016 Apr 18
0
[PATCH v4 37/37] volt: add NvVoltOffsetmV option
...best_cstate->cstate; diff --git a/drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h index 25588c7..f34fd39 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -22,9 +22,11 @@ struct nvkm_volt { u8 max2_id; int speedo; + + int volt_offset_mv; }; -int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature); +int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature, bool enableOffset); int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id); int nvkm_volt_get(struct nvkm_volt *); int nvkm_volt_set_i...
2016 Apr 18
0
[PATCH v4 19/37] volt: add gf100 subdev with speedo
...R LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include "priv.h" + +#include <subdev/fuse.h> + +static int +gf100_volt_speedo_read(struct nvkm_volt *volt) +{ + struct nvkm_device *device = volt->subdev.device; + struct nvkm_fuse *fuse = device->fuse; + + if (!fuse) + return -EINVAL; + + return nvkm_fuse_read(fuse, 0x1cc); +} + +static const struct nvkm_volt_func +gf100_volt = { + .vid_get = nvkm_voltgpio_get, + .vi...