search for: nouveau_debugfs_pstate_set

Displaying 20 results from an estimated 28 matches for "nouveau_debugfs_pstate_set".

2023 Apr 16
0
[PATCH 1/9] drm/nouveau/debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set()
Date: Sat, 15 Apr 2023 21:06:06 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function ?nouveau_debugfs_pstate_set?. Thus avoid the risk for undefined behaviour by moving the usage of an expression into a parameter for a function call at the end. This issue was detected by using the Coccinelle software. Fixes: 6e9fc177399f08446293fec7607913fdbc95e191 ("drm/nouveau/debugfs: add copy of sysfs pstate inter...
2023 Apr 16
10
[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
Date: Sun, 16 Apr 2023 11:22:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (9): debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set() debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get() debugfs: Use seq_putc() in nouveau_debugfs_pstate_get() debugfs: Replace five seq_printf() calls by seq_puts() in nouveau_debugfs_pstate_get() power_budget: Move an expression into...
2017 Nov 22
1
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
...eau/nouveau_debugfs.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c > index 963a4dba..9109b69c 100644 > --- a/drm/nouveau/nouveau_debugfs.c > +++ b/drm/nouveau/nouveau_debugfs.c > @@ -160,7 +160,11 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, > args.ustate = value; > } > > + ret = pm_runtime_get_sync(drm->dev); > + if (IS_ERR_VALUE(ret) && ret != -EACCES) > + return ret; > ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); > +...
2018 Jul 31
0
[PATCH v3] drm/nouveau: Fix potential memory access error in debugfs_pstate_get/set()
...never be NULL, because we're taking the value of the potentially null device pointer and adding to it so it isn't 0x0. So, check if drm is NULL instead. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Karol Herbst <karolherbst at gmail.com> --- Changes since v2: - Also fix nouveau_debugfs_pstate_set() drivers/gpu/drm/nouveau/nouveau_debugfs.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 963a4dba8213..b7440b542cb2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_deb...
2019 Sep 04
1
[PATCH] drm/nouveau: add missing single_release()
...eau_debugfs.c index 7dfbbbc1beea..35695f493271 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -202,6 +202,7 @@ static const struct file_operations nouveau_pstate_fops = { .open = nouveau_debugfs_pstate_open, .read = seq_read, .write = nouveau_debugfs_pstate_set, + .release = single_release, }; static struct drm_info_list nouveau_debugfs_list[] = {
2016 Mar 21
0
[PATCH v2 22/22] debugfs: add boost interface to change the boost_mode
...ile changed, 76 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 3d0dc19..31b309f 100644 --- a/drm/nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -180,6 +180,81 @@ static const struct file_operations nouveau_pstate_fops = { .write = nouveau_debugfs_pstate_set, }; +static void +nouveau_debugfs_boost_get_entry(struct seq_file *m, u8 mode, u8 entry, u16 value) +{ + if (value) { + if (mode == entry) + seq_printf(m, "*%i", entry); + else + seq_printf(m, " %i", entry); + seq_printf(m, ": %u MHz\n", value); + } +} + +sta...
2017 Nov 17
0
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
...rbst at gmail.com> --- drm/nouveau/nouveau_debugfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 963a4dba..9109b69c 100644 --- a/drm/nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -160,7 +160,11 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, args.ustate = value; } + ret = pm_runtime_get_sync(drm->dev); + if (IS_ERR_VALUE(ret) && ret != -EACCES) + return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); + pm_runtime_put_autosuspend(drm->dev)...
2018 Jul 14
2
[PATCH 0/2] Some minor reclocking fixes
First patch fixes a potential vbios parsing bug on Fermi GPUs, but it may also affect Kepler ones. Second patch wakes the GPU up whenever the user tries to reclock to prevent the write to the pstate file from freezing. Karol Herbst (2): bios/vpstate: There are some fermi vbios with no boost or tdp entry debugfs: Wake up GPU before doing any reclocking drm/nouveau/nouveau_debugfs.c
2018 Jul 28
0
[PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)
...l <julia.lawall at lip6.fr> --- Please take the patch only if it's a positive warning. Thanks! nouveau_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file * } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_autosuspend(drm->dev);
2018 Sep 06
0
[PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings
...Wake up GPU before doing any reclocking :::::: branch date: 21 hours ago :::::: commit date: 7 weeks ago nouveau_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file * } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_autosuspend(drm->dev);
2019 Feb 28
0
[PATCH] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 88a52f6..7dfbbbc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_auto...
2019 Mar 30
0
[PATCH AUTOSEL 5.0 59/67] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
...file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 88a52f6b39fe..7dfbbbc1beea 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_auto...
2019 Mar 30
0
[PATCH AUTOSEL 4.19 47/52] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
...file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 9109b69cd052..9635704a1d86 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_auto...
2019 Mar 30
0
[PATCH AUTOSEL 4.14 33/37] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
...file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 9109b69cd052..9635704a1d86 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -161,7 +161,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_auto...
2019 Sep 05
0
[PATCH] drm/nouveau: add missing single_release()
...00644 > --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c > +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c > @@ -202,6 +202,7 @@ static const struct file_operations nouveau_pstate_fops = { > .open = nouveau_debugfs_pstate_open, > .read = seq_read, > .write = nouveau_debugfs_pstate_set, > + .release = single_release, > }; > > static struct drm_info_list nouveau_debugfs_list[] = { > > > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/list...
2020 May 20
0
[PATCH] drm/nouveau/debugfs: fix runtime pm imbalance on error
...le changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 15a3d40edf02..db3711436577 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -181,8 +181,11 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(drm->dev); return ret; + } + ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &a...
2015 Nov 09
5
[PATCH v2 0/5] move pstate interface to debugfs
I made a little changes in this series: 1. merge the two last patches together 2. unify the private data interface with the drm debugfs one now it should be very obvious for a new dev on how to add new files to debugfs and how to get access to the nouveau structs Karol Herbst (5): debugfs: add infrastructure to add files with other fops than only read debugfs: rename functions to
2017 Jan 23
8
[Bug 99505] New: Attempting to reclock GeForce GT740M (GK208) cause GPU and system to hang
https://bugs.freedesktop.org/show_bug.cgi?id=99505 Bug ID: 99505 Summary: Attempting to reclock GeForce GT740M (GK208) cause GPU and system to hang Product: xorg Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component:
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 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
Last update here: https://lists.freedesktop.org/archives/nouveau/2017-September/028848.html Basically big cleanup, reordering, simplifications and some renaming to make the code easier to read and to review. I also moved some bugfixes to the front so they can be merged prior the other patches. There was also a bug related to the therm daemon triggering a pstate change leading to PMU lockups,