summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-09 22:10:30 +0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 23:28:18 +0400
commit0d48b58af3e052574b3e6bdd9779f00a750b50a4 (patch)
treecaa7dd5ac75f6697a9bcfba29324406b46a9d443 /drivers/gpu
parentc354080dc8cf450f2db374bcfa8ce24cb97c62f2 (diff)
downloadlinux-0d48b58af3e052574b3e6bdd9779f00a750b50a4.tar.xz
drm/nouveau: hide sysfs pstate file behind an option again
No-one has yet had time to move this to debugfs as discussed during the last merge window. Until this happens, hide the option to make it clear it's not going to be here forever. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_sysfs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_sysfs.c b/drivers/gpu/drm/nouveau/nouveau_sysfs.c
index 32a23895abd5..3c6962d15b26 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sysfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sysfs.c
@@ -28,6 +28,10 @@
#include "nouveau_sysfs.h"
+MODULE_PARM_DESC(pstate, "enable sysfs pstate file, which will be moved in the future");
+static int nouveau_pstate;
+module_param_named(pstate, nouveau_pstate, int, 0400);
+
static inline struct drm_device *
drm_device(struct device *d)
{
@@ -160,7 +164,7 @@ nouveau_sysfs_fini(struct drm_device *dev)
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvif_device *device = &drm->device;
- if (sysfs->ctrl.priv) {
+ if (sysfs && sysfs->ctrl.priv) {
device_remove_file(nv_device_base(nvkm_device(device)), &dev_attr_pstate);
nvif_object_fini(&sysfs->ctrl);
}
@@ -177,6 +181,9 @@ nouveau_sysfs_init(struct drm_device *dev)
struct nouveau_sysfs *sysfs;
int ret;
+ if (!nouveau_pstate)
+ return 0;
+
sysfs = drm->sysfs = kzalloc(sizeof(*sysfs), GFP_KERNEL);
if (!sysfs)
return -ENOMEM;