Re: [Nouveau] [PATCH] module parameters: permissions as defines, readable to everyone

2016-04-10 Thread Ilia Mirkin
On Sun, Apr 10, 2016 at 12:45 PM, poma  wrote:
>
> For the purposes of the module parameters,
> specifies the permissions of the corresponding files in sysfs in predefined 
> S_I* form rather than in octal notation.

I definitely find octal *way* more readable for permissions than those
S_* macros. Apparently others agree with me, have a look at 'git grep
module_param_named drivers/gpu/drm' - note lack of the silly macros.

I'd be fine with flipping everything to 0444 though. Not sure why it
was so restrictive right now.

> Withal it makes the source code more consistent.
> Moreover, because all parameters are readable to everyone, it is more 
> user-friendly.
>
> $ grep S_IRUGO include/linux/stat.h
> #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
>
> $ grep 'S_IRUSR\|S_IRGRP\|S_IROTH' include/uapi/linux/stat.h
> #define S_IRUSR 00400
> #define S_IRGRP 00040
> #define S_IROTH 4
>
> $ ls -l /sys/module/nouveau/parameters/
> total 0
> -r--r--r--. 1 root root 4096 Apr 10 17:43 config
> -r--r--r--. 1 root root 4096 Apr 10 17:43 debug
> -r--r--r--. 1 root root 4096 Apr 10 17:43 duallink
> -r--r--r--. 1 root root 4096 Apr 10 17:43 hdmimhz
> -r--r--r--. 1 root root 4096 Apr 10 17:43 ignorelid
> -r--r--r--. 1 root root 4096 Apr 10 17:43 modeset
> -r--r--r--. 1 root root 4096 Apr 10 17:43 noaccel
> -r--r--r--. 1 root root 4096 Apr 10 17:43 nofbaccel
> -r--r--r--. 1 root root 4096 Apr 10 17:43 runpm
> -r--r--r--. 1 root root 4096 Apr 10 17:43 tv_disable
> -r--r--r--. 1 root root 4096 Apr 10 17:43 tv_norm
> -r--r--r--. 1 root root 4096 Apr 10 17:43 vram_pushbuf
>
> $ systool -vm nouveau | grep Parameters -A 12
>   Parameters:
> config  =  28 6e 75 6c 6c 29 0a
> debug   = "(null)"
> duallink= "1"
> hdmimhz = "0"
> ignorelid   = "0"
> modeset = "-1"
> noaccel = "0"
> nofbaccel   = "0"
> runpm   = "-1"
> tv_disable  = "0"
> tv_norm = "(null)"
> vram_pushbuf= "0"
>
> Signed-off-by: poma 

From Documentation/SubmittingPatches

"""
then you just add a line saying

Signed-off-by: Random J Developer 

using your real name (sorry, no pseudonyms or anonymous contributions.)
"""

  -ilia
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] module parameters: permissions as defines, readable to everyone

2016-04-10 Thread poma

For the purposes of the module parameters,
specifies the permissions of the corresponding files in sysfs in predefined 
S_I* form rather than in octal notation.
Withal it makes the source code more consistent.
Moreover, because all parameters are readable to everyone, it is more 
user-friendly.

$ grep S_IRUGO include/linux/stat.h
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)

$ grep 'S_IRUSR\|S_IRGRP\|S_IROTH' include/uapi/linux/stat.h
#define S_IRUSR 00400
#define S_IRGRP 00040
#define S_IROTH 4

$ ls -l /sys/module/nouveau/parameters/
total 0
-r--r--r--. 1 root root 4096 Apr 10 17:43 config
-r--r--r--. 1 root root 4096 Apr 10 17:43 debug
-r--r--r--. 1 root root 4096 Apr 10 17:43 duallink
-r--r--r--. 1 root root 4096 Apr 10 17:43 hdmimhz
-r--r--r--. 1 root root 4096 Apr 10 17:43 ignorelid
-r--r--r--. 1 root root 4096 Apr 10 17:43 modeset
-r--r--r--. 1 root root 4096 Apr 10 17:43 noaccel
-r--r--r--. 1 root root 4096 Apr 10 17:43 nofbaccel
-r--r--r--. 1 root root 4096 Apr 10 17:43 runpm
-r--r--r--. 1 root root 4096 Apr 10 17:43 tv_disable
-r--r--r--. 1 root root 4096 Apr 10 17:43 tv_norm
-r--r--r--. 1 root root 4096 Apr 10 17:43 vram_pushbuf

$ systool -vm nouveau | grep Parameters -A 12
  Parameters:
config  =  28 6e 75 6c 6c 29 0a
debug   = "(null)"
duallink= "1"
hdmimhz = "0"
ignorelid   = "0"
modeset = "-1"
noaccel = "0"
nofbaccel   = "0"
runpm   = "-1"
tv_disable  = "0"
tv_norm = "(null)"
vram_pushbuf= "0"

Signed-off-by: poma 
---
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c   |  2 +-
 drivers/gpu/drm/nouveau/nouveau_chan.c  |  2 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c |  8 
 drivers/gpu/drm/nouveau/nouveau_drm.c   | 10 +-
 drivers/gpu/drm/nouveau/nouveau_fbcon.c |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c 
b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 163317d..af520d0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(tv_norm, "Default TV norm.\n"
 "\t\tDefault: PAL\n"
 "\t\t*NOTE* Ignored for cards with external TV encoders.");
 static char *nouveau_tv_norm;
-module_param_named(tv_norm, nouveau_tv_norm, charp, 0400);
+module_param_named(tv_norm, nouveau_tv_norm, charp, S_IRUGO);
 
 static uint32_t nv42_tv_sample_load(struct drm_encoder *encoder)
 {
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c 
b/drivers/gpu/drm/nouveau/nouveau_chan.c
index 879655c..0bb1b9c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -43,7 +43,7 @@
 
 MODULE_PARM_DESC(vram_pushbuf, "Create DMA push buffers in VRAM");
 int nouveau_vram_pushbuf;
-module_param_named(vram_pushbuf, nouveau_vram_pushbuf, int, 0400);
+module_param_named(vram_pushbuf, nouveau_vram_pushbuf, int, S_IRUGO);
 
 int
 nouveau_channel_idle(struct nouveau_channel *chan)
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index ae96ebc..30785fb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -49,19 +49,19 @@
 
 MODULE_PARM_DESC(tv_disable, "Disable TV-out detection");
 int nouveau_tv_disable = 0;
-module_param_named(tv_disable, nouveau_tv_disable, int, 0400);
+module_param_named(tv_disable, nouveau_tv_disable, int, S_IRUGO);
 
 MODULE_PARM_DESC(ignorelid, "Ignore ACPI lid status");
 int nouveau_ignorelid = 0;
-module_param_named(ignorelid, nouveau_ignorelid, int, 0400);
+module_param_named(ignorelid, nouveau_ignorelid, int, S_IRUGO);
 
 MODULE_PARM_DESC(duallink, "Allow dual-link TMDS (default: enabled)");
 int nouveau_duallink = 1;
-module_param_named(duallink, nouveau_duallink, int, 0400);
+module_param_named(duallink, nouveau_duallink, int, S_IRUGO);
 
 MODULE_PARM_DESC(hdmimhz, "Force a maximum HDMI pixel clock (in MHz)");
 int nouveau_hdmimhz = 0;
-module_param_named(hdmimhz, nouveau_hdmimhz, int, 0400);
+module_param_named(hdmimhz, nouveau_hdmimhz, int, S_IRUGO);
 
 struct nouveau_encoder *
 find_encoder(struct drm_connector *connector, int type)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c 
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index d06877d..98ead83 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -63,24 +63,24 @@
 
 MODULE_PARM_DESC(config, "option string to pass to driver core");
 static char *nouveau_config;
-module_param_named(config, nouveau_config, charp, 0400);
+module_param_named(config, nouveau_config, charp, S_IRUGO);
 
 MODULE_PARM_DESC(debug, "debug string to pass to driver core");
 static char *nouveau_debug;
-module_param_named(debug, nouveau_debug, charp, 0400);
+module_param_named(debug, nouveau_debug, char

[Nouveau] [Bug 94374] transparent window with DRI_PRIME=1, depending on size of used textures

2016-04-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94374

--- Comment #9 from peter.f...@gmx.de ---
Mesa 11.2.0-1 just rolled out on Arch. The issue is still the same for me.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau