search for: div_round_closest

Displaying 11 results from an estimated 11 matches for "div_round_closest".

2018 Nov 22
0
[PATCH v3 2/3] drm/vc4: Take underscan setup into account when updating planes
...&vborder, &hborder); + if (!vborder && !hborder) + return 0; + + if (hborder * 2 >= crtc_state->mode.hdisplay || + vborder * 2 >= crtc_state->mode.vdisplay) + return -EINVAL; + + adjhdisplay = crtc_state->mode.hdisplay - (2 * hborder); + vc4_pstate->crtc_x = DIV_ROUND_CLOSEST(vc4_pstate->crtc_x * + adjhdisplay, + crtc_state->mode.hdisplay); + vc4_pstate->crtc_x += hborder; + if (vc4_pstate->crtc_x > crtc_state->mode.hdisplay - hborder) + vc4_pstate->crtc_x = crtc_state->mode.hdisplay - hborder; + + adjvdisplay = crtc_state-...
2014 Nov 28
0
[PATCH 2/2] volt: add support for GK20A
...4, -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; + return mv; +} + +/** + * cvb_t_mv = + * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + + * ((c3 * speedo / s_scale + c4 + c5 * T / t_scale) * T / t_scale) + */ +static inline in...
2014 Nov 28
0
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
...4, -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; + return mv; +} + +/** + * cvb_t_mv = + * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + + * ((c3 * speedo / s_scale + c4 + c5 * T / t_scale) * T / t_scale) + */ +static inline in...
2014 Nov 28
2
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
..., -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; > + return mv; > +} > + > +/** > + * cvb_t_mv = > + * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + > + * ((c3 * speedo / s_scale + c4 + c5 * T / t_scal...
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
2014 Nov 28
0
[RESEND PATCH nouveau 3/3] volt: add support for GK20A
...t; +/** >> + * 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; >> + return mv; >> +} >> + >> +/** >> + * cvb_t_mv = >> + * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) + >> +...
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 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
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
2018 Nov 22
5
[PATCH v3 0/3] drm/connector: Provide generic support for underscan
Hello, This is an attempt at providing generic support for underscan connector props. We already have 3 drivers defining the same underscan, underscan vborder and underscan hborder properties (amd, radeon and nouveau) and I am about to add a new one, hence my proposal to put the prop parsing code in the core and add ->underscan fields to drm_connector_state. This v3 was based on the "VC4
2016 Jun 01
15
[PATCH 00/15] clk/tegra: improve code and add DFS support
This series adds support for GM20B PLL's Maxwell features, namely glitchless switch and (more importantly) DFS support. DFS lets the PLL lower its output speed according to input current variations, making the clock more stable and allowing it to run safely at lower voltage. All GM20B additions are done in the last patch, which consequently ends up being considerably big ; fortunately, it