drm/i915/psr: simplify enable_psr handling
Subsystems (2)
PATCH 1/1 drm/i915/psr: simplify enable_psr handling
The following commit:
commit 2bdd045e3a30 ("drm/i915/psr: Check if VBT says PSR can be enabled.")
added some code with no usable functionality. Regardless of how the psr default is set up in the BDB_DRIVER_FEATURES section, if the enable_psr module parameter isn't specified it defaults to 0.
Remove this dead code, simplify the way that enable_psr is handled and update the module parameter string to match the actual functionality.
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_params.c | 4 +--- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 1 - drivers/gpu/drm/i915/intel_psr.c | 7 ------- 5 files changed, 2 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -1115,7 +1115,6 @@ struct intel_vbt_data { } edp;struct { -bool enable;bool full_link;bool require_aux_wakeup;int idle_frames;
drivers/gpu/drm/i915/i915_params.c +1 -3
@@ -87,9 +87,7 @@ i915_param_named_unsafe(enable_ppgtt, int, 0400, "(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)");i915_param_named_unsafe (enable_psr, int,0600 , -"Enable PSR " -"(0=disabled, 1=enabled) " -"Default: -1 (use per-chip default)" ); +"Enable PSR (default: false)" );i915_param_named_unsafe (alpha_support, bool,0400 , "Enable alpha quality driver support for latest hardware. "
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -42,7 +42,7 @@ struct drm_printer; param(int, enable_dc, -1) \ param(int, enable_fbc, -1) \ param(int, enable_ppgtt, -1) \ - param(int, enable_psr, -1) \ + param(int, enable_psr, 0) \ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \param (int, invert_brightness,0 ) \
drivers/gpu/drm/i915/intel_bios.c +0 -1
@@ -551,7 +551,6 @@ parse_driver_features(struct drm_i915_private *dev_priv,*/ if (!driver->drrs_enabled) dev_priv->vbt.drrs_type =DRRS_NOT_SUPPORTED ; - dev_priv->vbt.psr.enable = driver->psr_enabled; } static void
drivers/gpu/drm/i915/intel_psr.c +0 -7
@@ -1065,13 +1065,6 @@ void intel_psr_init(struct drm_i915_private *dev_priv)if (!dev_priv->psr.sink_support)return ; -if (i915_modparams.enable_psr ==-1 ) { - i915_modparams.enable_psr = dev_priv->vbt.psr.enable; - -/* Per platform default: all disabled. */ - i915_modparams.enable_psr =0 ; - } -/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv))/* HSW and BDW require workarounds that we don't implement. */
Signature · 1 line
2.20.1.415.g653613c723-goog
Quoted 10 lines · Ross Zwisler
The following commit:
commit
2bdd045e3a30("drm/i915/psr: Check if VBT says PSR can be enabled.")added some code with no usable functionality. Regardless of how the psr
default is set up in theBDB_DRIVER_FEATURESsection, if theenable_psr
module parameter isn't specified it defaults to 0.
Right, that was intentional and the commit message even makes a note of it
" Note: The feature currently remains disabled by default for all platforms irrespective of what VBT says."
Anyway, we've enabled the feature by default now and the current code should take into account the VBT flag if the module parameter is left to a default value. Please check git://anongit.freedesktop.org/drm-tip
drm-tip.
-DK
Quoted 93 lines
Remove this dead code, simplify the way that
enable_psris handled and
update the module parameter string to match the actual functionality.Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Ross Zwisler <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_params.c | 4 +--- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 1 - drivers/gpu/drm/i915/intel_psr.c | 7 ------- 5 files changed, 2 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -1115,7 +1115,6 @@ struct intel_vbt_data { } edp;struct { -bool enable;bool full_link;bool require_aux_wakeup;int idle_frames;drivers/gpu/drm/i915/i915_params.c +1
-3@@ -87,9 +87,7 @@ i915_param_named_unsafe(enable_ppgtt, int, 0400, "(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)");i915_param_named_unsafe (enable_psr, int,0600 , -"Enable PSR " -"(0=disabled, 1=enabled) " -"Default: -1 (use per-chip default)" ); +"Enable PSR (default: false)" ); i915_param_named_unsafe(alpha_support, bool, 0400,drivers/gpu/drm/i915/i915_params.c +0
-0"Enable alpha quality driver support for latest hardware. " drivers/gpu/drm/i915/i915_params.h +1
-1@@ -42,7 +42,7 @@ struct drm_printer; param(int, enable_dc, -1) \ param(int, enable_fbc, -1) \ param(int, enable_ppgtt, -1) \ - param(int, enable_psr, -1) \ + param(int, enable_psr, 0) \ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \param (int, invert_brightness,0 ) \drivers/gpu/drm/i915/intel_bios.c +0
-1@@ -551,7 +551,6 @@ parse_driver_features(struct drm_i915_private*dev_priv, */ if (!driver->drrs_enabled) dev_priv->vbt.drrs_type =DRRS_NOT_SUPPORTED ; - dev_priv->vbt.psr.enable = driver->psr_enabled; }static void
drivers/gpu/drm/i915/intel_psr.c +0
-7@@ -1065,13 +1065,6 @@ void intel_psr_init(struct drm_i915_private *dev_priv)if (!dev_priv->psr.sink_support)return ; -if (i915_modparams.enable_psr ==-1 ) { - i915_modparams.enable_psr = dev_priv->vbt.psr.enable; - -/* Per platform default: all disabled. */ - i915_modparams.enable_psr =0 ; - } -/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv))
Quoted 2 lines
/* HSW and BDW require workarounds that we don't
implement. */
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Dhinakaran Pandiyan
Quoted 10 lines · Ross Zwisler
The following commit:
commit
2bdd045e3a30("drm/i915/psr: Check if VBT says PSR can be enabled.")added some code with no usable functionality. Regardless of how the psr
default is set up in theBDB_DRIVER_FEATURESsection, if theenable_psr
module parameter isn't specified it defaults to 0.Right, that was intentional and the commit message even makes a note of it
" Note: The feature currently remains disabled by default for all platforms irrespective of what VBT says."
Quoted 4 lines
Anyway, we've enabled the feature by default now and the current code should take into account the VBT flag if the module parameter is left to a default value. Please check
git://anongit.freedesktop.org/drm-tip
drm-tip.
Fair enough. It's a bad pattern to introduce dead code as a placeholder for some future work, though. This code has been in the tree for three major kernel releases (v4.{18,19,20}) without providing any useful functionality.
Quoted 19 lines · Ross Zwisler
Quoted 17 lines · Dhinakaran Pandiyan
Quoted 10 lines · Ross Zwisler
The following commit:
commit
2bdd045e3a30("drm/i915/psr: Check if VBT says PSR can be enabled.")added some code with no usable functionality. Regardless of how the psr
default is set up in theBDB_DRIVER_FEATURESsection, if theenable_psr
module parameter isn't specified it defaults to 0.Right, that was intentional and the commit message even makes a note of it
" Note: The feature currently remains disabled by default for all platforms irrespective of what VBT says."
Quoted 8 lines
Quoted 4 lines
Anyway, we've enabled the feature by default now and the current code should take into account the VBT flag if the module parameter is left to a default value. Please check
git://anongit.freedesktop.org/drm-tip
drm-tip.Fair enough. It's a bad pattern to introduce dead code as a placeholder for some future work, though. This code has been in the tree for three major kernel releases (v4.{18,19,20}) without providing any useful functionality.
Getting PSR enabled by default on at least a few platforms took years. Insisting that we do not ever merge such code also doesn't work. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/psr: simplify enable_psr handling
In reply to Ross Zwisler== Series Details ==
== Series Details ==
Series: drm/i915/psr: simplify enable_psr handling
URL : https://patchwork.freedesktop.org/series/54959/
State : failure
== Summary ==
Applying: drm/i915/psr: simplify enable_psr handling
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_drv.h
M drivers/gpu/drm/i915/i915_params.c
M drivers/gpu/drm/i915/i915_params.h
M drivers/gpu/drm/i915/intel_bios.c
M drivers/gpu/drm/i915/intel_psr.c
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/intel_psr.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_psr.c Auto-merging drivers/gpu/drm/i915/intel_bios.c
Auto-merging drivers/gpu/drm/i915/i915_params.h
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_params.h Auto-merging drivers/gpu/drm/i915/i915_params.c
Auto-merging drivers/gpu/drm/i915/i915_drv.h
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915/psr: simplify enable_psr handling When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx