search for: arglen

Displaying 20 results from an estimated 47 matches for "arglen".

2008 Oct 22
1
NEW: COM32 module to alias
...ot;alias" #define APP_YEAR "2008" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b002" int main(int argc, char *argv[]){ char cmdstr[ALIAS_CMD_SZ]; // Command string to execute int curpos; // Current position in cmdstr; Use memcpy rather than strcat int arglen; // length of current argument string int i; // Initialization curpos = 0; cmdstr[0] = 0; for(i=1; i<argc; i++){ arglen = strlen(argv[i]); memcpy(cmdstr + curpos, argv[i], arglen); curpos += arglen; cmdstr[curpos] = ' '; curpos += 1; cmdstr[curpos] = 0; } curpos -= 1;...
2017 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...- if (pstate->pstate == req) > - break; > - i++; > - } > - > - if (pstate->pstate != req) > - return -EINVAL; > - req = i; > - } > - > - return req + 2; > -} > - > static int > nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) > { > + struct nvkm_pstate *pstate; > int ret = 1; > > if (clk->allow_reclock && !strncasecmpz(mode, "auto", arglen)) > @@ -528,27 +507,46 @@ nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) > > ((char *)mode)[arglen] = ...
2016 Apr 18
0
[PATCH v4 28/37] clk: hold information about the current cstate status
...;pstate = NULL; + clk->exp_cstate = NVKM_CLK_CSTATE_DEFAULT; + clk->set_cstate = NULL; nvkm_clk_update(clk, true); return 0; } @@ -698,15 +711,20 @@ nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device, if (mode) { clk->ustate_ac = nvkm_clk_nstate(clk, mode, arglen); clk->ustate_dc = nvkm_clk_nstate(clk, mode, arglen); + clk->exp_cstate = NVKM_CLK_CSTATE_HIGHEST; } mode = nvkm_stropt(device->cfgopt, "NvClkModeAC", &arglen); - if (mode) + if (mode) { clk->ustate_ac = nvkm_clk_nstate(clk, mode, arglen); + clk->exp_csta...
2017 Sep 15
0
[RFC PATCH 07/29] clk: Hold information about the current cstate status
...LK_CSTATE_DEFAULT; + clk->cstate = NULL; clk->temp = 90; /* reasonable default value */ nvkm_clk_update(clk, true); return 0; @@ -701,15 +714,20 @@ nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device, if (mode) { clk->ustate_ac = nvkm_clk_nstate(clk, mode, arglen); clk->ustate_dc = nvkm_clk_nstate(clk, mode, arglen); + clk->exp_cstateid = NVKM_CLK_CSTATE_HIGHEST; } mode = nvkm_stropt(device->cfgopt, "NvClkModeAC", &arglen); - if (mode) + if (mode) { clk->ustate_ac = nvkm_clk_nstate(clk, mode, arglen); + clk->exp_cs...
2008 Oct 27
0
NEW: COM32 module to alias (Revised)
...t;alias" #define APP_YEAR "2008" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b003" int main(int argc, char *argv[]) { char cmdstr[ALIAS_CMD_SZ]; // Command string to execute int curpos; // Current position in cmdstr; Use memcpy rather than strcat int arglen; // length of current argument string int i; // Initialization curpos = 0; cmdstr[0] = 0; #ifdef DO_DEBUG printf("\n%d\n\n", ALIAS_CMD_SZ); #endif /* DO_DEBUG */ for(i=1; i<argc; i++) { arglen = strlen(argv[i]); // Theoretically, this should never be met in SYSLINUX if ((...
2009 Feb 22
2
NEW: COM32 module to run another command, optionally clearing the screen
...n" #define APP_YEAR "2009" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b005" int main(int argc, char *argv[]) { char cmdstr[RUN_CMD_SZ]; /* Command string to execute */ int curpos; /* Current position in cmdstr; Use memcpy rather than strcat */ int arglen; /* length of current argument string */ int argst; /* Starting argument to listen to */ int i; /* Initialization */ curpos = 0; argst = 1; cmdstr[0] = 0; console_ansi_std(); DEBUG_PRINTF("\nMax Command line:%d\n", RUN_CMD_SZ); DEBUG_PRINTF("argc:%d\n\n", argc); if (...
2017 Mar 05
0
[PATCH 5/9] clk: We should pass the pstate id around not the index in the list
...q != -2) { - list_for_each_entry(pstate, &clk->states, head) { - if (pstate->pstate == req) - break; - i++; - } - - if (pstate->pstate != req) - return -EINVAL; - req = i; - } - - return req + 2; -} - -static int nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) { + struct nvkm_pstate *pstate; int ret = 1; if (clk->allow_reclock && !strncasecmpz(mode, "auto", arglen)) @@ -528,27 +507,46 @@ nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) ((char *)mode)[arglen] = '\0'; if (!kstrtol(mode, 0, &am...
2010 Sep 16
1
[RFC] function to parse string to argc/argv pair
...ee(s); } /* Concatenate command line arguments into one string * str Output character array * strl Size of array * argc Argument Count * argv Argument Values * returns Length of output string (like strlen()) */ int argcat(char *str, const int strl, const int argc, char *argv[]) { int i, arglen; /* index, argument length */ int curpos, maxlen = strl - 1; /* current position in str */ curpos = 0; str[0] = '\0'; /* Nullify string just to be sure */ for (i = 0; i < argc; i++) { arglen = strlen(argv[i]); /* Theoretically, this should never be met in SYSLINUX */...
2017 Sep 15
0
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...q != -2) { - list_for_each_entry(pstate, &clk->states, head) { - if (pstate->pstate == req) - break; - i++; - } - - if (pstate->pstate != req) - return -EINVAL; - req = i; - } - - return req + 2; -} - static int nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) { + struct nvkm_pstate *pstate; int ret = 1; if (clk->allow_reclock && !strncasecmpz(mode, "auto", arglen)) @@ -528,27 +507,46 @@ nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) ((char *)mode)[arglen] = '\0'; if (!kstrtol(mode, 0, &am...
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
...q != -2) { - list_for_each_entry(pstate, &clk->states, head) { - if (pstate->pstate == req) - break; - i++; - } - - if (pstate->pstate != req) - return -EINVAL; - req = i; - } - - return req + 2; -} - -static int nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) { int ret = 1; @@ -533,23 +512,23 @@ nvkm_clk_nstate(struct nvkm_clk *clk, const char *mode, int arglen) ((char *)mode)[arglen] = '\0'; if (!kstrtol(mode, 0, &v)) { - ret = nvkm_clk_ustate_update(clk, v); + ret = v; if (ret < 0) ret = 1; } ((char *)mode...
2017 Jul 01
7
[PATCH v2 0/7] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of changing the clock state due to temperature changes and dynamic reclocking. v2: remove commits
2017 Sep 03
8
[PATCH 0/8] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended 3. racy reclocking while GPU is suspending and leading to hangs Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of changing the clock state due to
2017 Mar 05
15
[PATCH 0/9] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended 3. nouveau always does full reclocks even if only a change of the voltage is required Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of
2015 Dec 02
2
[RFC PATCH 4/5] subdev/clk: print the base clocks
...v/bios/cstep.h> > #include <subdev/bios/perf.h> > @@ -562,10 +563,25 @@ 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_bios *bios; > int ret, idx, arglen; > const char *mode; > + struct nvbios_baseclock_header header; > > nvkm_subdev_ctor(&nvkm_clk, device, index, 0, &clk->subdev); > + bios = device->bios; > + > + if (bios && !nvbios_baseclock_parse(bios, &header)) { > + struct nvbios_basecloc...
2016 Jan 13
5
[PATCH 0/2] allow partly reclocking on chipset
some chipset have working engine reclocking, but broken memory reclocking like Fermi. We should for now, add the functionality to allow partly reclocking for those. Allthough this doesn't give as much performance as one might wish, it is till noticeable and may improve performance enough to be noted. Karol Herbst (2): clk: seperate engine and memory reclock toggles clk: allow engine
2017 Jul 21
15
[RFC PATCH 00/13] Thermal throttling
Adds Nouveau controlled thermal throttling for Kepler+ GPUs. With this I feel safe enough to add support for Maxwell2 reclocking later on (still hidden behind a switch, but we can be fairly sure to not overheat hardware if a user isn't carefull enough) Contains all patches from my clk update series, but I thought it makes sense to include those in this series as well for completness. Please
2009 Feb 15
2
COM32 module: Read-Only shell
...ror; errno=%d\n", ierrno); + } +} + +/* Concatenate command line arguments into one string + * cmdstr Output command string + * argc Argument Count + * argv Argument Values + * barg Beginning Argument + */ +int rosh_argcat(char *cmdstr, const int argc, char *argv[], const int barg) +{ + int i, arglen, curpos; /* index, argument length, current position + in cmdstr */ + curpos = 0; + cmdstr[0] = '\0'; /* Nullify string just to be sure */ + for (i = barg; i < argc; i++) { + arglen = strlen(argv[i]); + /* Theoretically, this should never be met in SYSLINUX */ + if ((curpos + arglen)...
2014 Dec 22
7
[PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
There might be some callers of nouveau_clock_astate(), and they are from inetrrupt context. So we must ensure that this function can be atomic in that condition. This patch adds one parameter which is subsequently passed to nouveau_pstate_calc(). Therefore we can choose whether we want to wait for the pstate work's completion or not. Signed-off-by: Vince Hsu <vinceh at nvidia.com> ---
2014 May 16
2
[PATCH] clk: allow config option to enable reclocking
...,9 @@ nouveau_clock_create_(struct nouveau_object *parent, ret = nouveau_pstate_new(clk, idx++); } while (ret == 0); + clk->allow_reclock = + nouveau_boolopt(device->cfgopt, "NvReclock", allow_reclock); + mode = nouveau_stropt(device->cfgopt, "NvClkMode", &arglen); if (mode) { if (!strncasecmpz(mode, "disabled", arglen)) { diff --git a/nvkm/subdev/clock/nv04.c b/nvkm/subdev/clock/nv04.c index b74db6c..eb2d442 100644 --- a/nvkm/subdev/clock/nv04.c +++ b/nvkm/subdev/clock/nv04.c @@ -82,7 +82,8 @@ nv04_clock_ctor(struct nouveau_object *parent, s...
2017 Sep 15
42
[RFC PATCH 00/29] Current State of my clk patches
Just wanted to post updated versions of my last series/patches. Reviews welcomed. It would be also nice if we agree on features I should focus upstreaming, so that this work can be better splitted or reordered. Sadly most of my patches depend on the rather big clk subdev rework and I think those patches shows best, why I think this rework is actually needed and makes things much easier to add