diff mbox

[1/2] drm/i915: drop write perm from module params which don't support changing

Message ID 1455621493-6865-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Feb. 16, 2016, 11:18 a.m. UTC
We've given write permissions to dynamically change some module
parameters through /sys/module/i915/parameters although they only
support setting on module load. Fix the permissions.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_params.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Daniel Vetter Feb. 16, 2016, 4:15 p.m. UTC | #1
On Tue, Feb 16, 2016 at 01:18:12PM +0200, Jani Nikula wrote:
> We've given write permissions to dynamically change some module
> parameters through /sys/module/i915/parameters although they only
> support setting on module load. Fix the permissions.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/i915/i915_params.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 8b9f36814165..b01245751086 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -92,7 +92,7 @@ MODULE_PARM_DESC(enable_fbc,
>  	"Enable frame buffer compression for power savings "
>  	"(default: -1 (use per-chip default))");
>  
> -module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0600);
> +module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0400);
>  MODULE_PARM_DESC(lvds_channel_mode,
>  	 "Specify LVDS channel mode "
>  	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
> @@ -102,7 +102,7 @@ MODULE_PARM_DESC(lvds_use_ssc,
>  	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
>  	"(default: auto from VBT)");
>  
> -module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0600);
> +module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0400);
>  MODULE_PARM_DESC(vbt_sdvo_panel_type,
>  	"Override/Ignore selection of SDVO panel mode in the VBT "
>  	"(-2=ignore, -1=auto [default], index in VBT BIOS table)");
> @@ -130,7 +130,7 @@ module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);
>  MODULE_PARM_DESC(enable_psr, "Enable PSR "
>  		 "(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)");
>  
> -module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600);
> +module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0400);
>  MODULE_PARM_DESC(preliminary_hw_support,
>  	"Enable preliminary hardware support.");
>  
> @@ -164,7 +164,7 @@ MODULE_PARM_DESC(invert_brightness,
>  	"to dri-devel@lists.freedesktop.org, if your machine needs it. "
>  	"It will then be included in an upcoming module version.");
>  
> -module_param_named(disable_display, i915.disable_display, bool, 0600);
> +module_param_named(disable_display, i915.disable_display, bool, 0400);
>  MODULE_PARM_DESC(disable_display, "Disable display (default: false)");
>  
>  module_param_named_unsafe(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600);
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Feb. 17, 2016, 8:57 a.m. UTC | #2
On Tue, 16 Feb 2016, Patchwork <patchwork@annarchy.freedesktop.org> wrote:
> == Summary ==
>
> Series 3477v1 Series without cover letter
> http://patchwork.freedesktop.org/api/1.0/series/3477/revisions/1/mbox/
>
> Test gem_ringfill:
>         Subgroup basic-default-hang:
>                 incomplete -> PASS       (snb-dellxps)
> Test kms_flip:
>         Subgroup basic-flip-vs-dpms:
>                 dmesg-warn -> PASS       (ilk-hp8440p) UNSTABLE
>         Subgroup basic-flip-vs-modeset:
>                 pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
> Test kms_pipe_crc_basic:
>         Subgroup suspend-read-crc-pipe-a:
>                 pass       -> INCOMPLETE (hsw-gt2)
> Test pm_rpm:
>         Subgroup basic-pci-d3-state:
>                 dmesg-warn -> PASS       (byt-nuc)
>         Subgroup basic-rte:
>                 pass       -> FAIL       (bdw-ultra)
>                 pass       -> DMESG-WARN (byt-nuc) UNSTABLE

I don't know what I should make of all this, none of it should have
anything to do with the patches.

BR,
Jani.


>
> bdw-nuci7        total:162  pass:152  dwarn:0   dfail:0   fail:0   skip:10 
> bdw-ultra        total:165  pass:151  dwarn:0   dfail:0   fail:1   skip:13 
> bsw-nuc-2        total:165  pass:135  dwarn:1   dfail:0   fail:0   skip:29 
> byt-nuc          total:165  pass:140  dwarn:1   dfail:0   fail:0   skip:24 
> hsw-brixbox      total:165  pass:151  dwarn:0   dfail:0   fail:0   skip:14 
> hsw-gt2          total:58   pass:55   dwarn:0   dfail:0   fail:1   skip:1  
> ilk-hp8440p      total:165  pass:114  dwarn:1   dfail:1   fail:1   skip:48 
> ivb-t430s        total:165  pass:150  dwarn:0   dfail:0   fail:1   skip:14 
> skl-i5k-2        total:165  pass:150  dwarn:0   dfail:0   fail:0   skip:15 
> snb-dellxps      total:165  pass:142  dwarn:0   dfail:0   fail:1   skip:22 
>
> Results at /archive/results/CI_IGT_test/Patchwork_1412/
>
> 63cbdd1816fd78d404ed004b0f931c497625e0df drm-intel-nightly: 2016y-02m-16d-09h-41m-02s UTC integration manifest
> 67e108f04e5a67306896102538eae3b511091e41 drm/i915: drop unused i915.disable_vtd_wa module parameter
> 95ce71ac3648c5c7d6a783959a60ff5855490c3e drm/i915: drop write perm from module params which don't support changing
>
Jani Nikula Feb. 19, 2016, 3:34 p.m. UTC | #3
On Tue, 16 Feb 2016, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Feb 16, 2016 at 01:18:12PM +0200, Jani Nikula wrote:
>> We've given write permissions to dynamically change some module
>> parameters through /sys/module/i915/parameters although they only
>> support setting on module load. Fix the permissions.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Pushed both to drm-intel-next-queued, thanks for the review.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/i915_params.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
>> index 8b9f36814165..b01245751086 100644
>> --- a/drivers/gpu/drm/i915/i915_params.c
>> +++ b/drivers/gpu/drm/i915/i915_params.c
>> @@ -92,7 +92,7 @@ MODULE_PARM_DESC(enable_fbc,
>>  	"Enable frame buffer compression for power savings "
>>  	"(default: -1 (use per-chip default))");
>>  
>> -module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0600);
>> +module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0400);
>>  MODULE_PARM_DESC(lvds_channel_mode,
>>  	 "Specify LVDS channel mode "
>>  	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
>> @@ -102,7 +102,7 @@ MODULE_PARM_DESC(lvds_use_ssc,
>>  	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
>>  	"(default: auto from VBT)");
>>  
>> -module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0600);
>> +module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0400);
>>  MODULE_PARM_DESC(vbt_sdvo_panel_type,
>>  	"Override/Ignore selection of SDVO panel mode in the VBT "
>>  	"(-2=ignore, -1=auto [default], index in VBT BIOS table)");
>> @@ -130,7 +130,7 @@ module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);
>>  MODULE_PARM_DESC(enable_psr, "Enable PSR "
>>  		 "(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)");
>>  
>> -module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600);
>> +module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0400);
>>  MODULE_PARM_DESC(preliminary_hw_support,
>>  	"Enable preliminary hardware support.");
>>  
>> @@ -164,7 +164,7 @@ MODULE_PARM_DESC(invert_brightness,
>>  	"to dri-devel@lists.freedesktop.org, if your machine needs it. "
>>  	"It will then be included in an upcoming module version.");
>>  
>> -module_param_named(disable_display, i915.disable_display, bool, 0600);
>> +module_param_named(disable_display, i915.disable_display, bool, 0400);
>>  MODULE_PARM_DESC(disable_display, "Disable display (default: false)");
>>  
>>  module_param_named_unsafe(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600);
>> -- 
>> 2.1.4
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 8b9f36814165..b01245751086 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -92,7 +92,7 @@  MODULE_PARM_DESC(enable_fbc,
 	"Enable frame buffer compression for power savings "
 	"(default: -1 (use per-chip default))");
 
-module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0600);
+module_param_named_unsafe(lvds_channel_mode, i915.lvds_channel_mode, int, 0400);
 MODULE_PARM_DESC(lvds_channel_mode,
 	 "Specify LVDS channel mode "
 	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
@@ -102,7 +102,7 @@  MODULE_PARM_DESC(lvds_use_ssc,
 	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
 	"(default: auto from VBT)");
 
-module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0600);
+module_param_named_unsafe(vbt_sdvo_panel_type, i915.vbt_sdvo_panel_type, int, 0400);
 MODULE_PARM_DESC(vbt_sdvo_panel_type,
 	"Override/Ignore selection of SDVO panel mode in the VBT "
 	"(-2=ignore, -1=auto [default], index in VBT BIOS table)");
@@ -130,7 +130,7 @@  module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);
 MODULE_PARM_DESC(enable_psr, "Enable PSR "
 		 "(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)");
 
-module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600);
+module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0400);
 MODULE_PARM_DESC(preliminary_hw_support,
 	"Enable preliminary hardware support.");
 
@@ -164,7 +164,7 @@  MODULE_PARM_DESC(invert_brightness,
 	"to dri-devel@lists.freedesktop.org, if your machine needs it. "
 	"It will then be included in an upcoming module version.");
 
-module_param_named(disable_display, i915.disable_display, bool, 0600);
+module_param_named(disable_display, i915.disable_display, bool, 0400);
 MODULE_PARM_DESC(disable_display, "Disable display (default: false)");
 
 module_param_named_unsafe(disable_vtd_wa, i915.disable_vtd_wa, bool, 0600);