drm/i915/psr: Kill useless function pointers.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/psr: Kill useless function pointers.
At some point we introduced the function pointers on PSR code to help with VLV/CHV separation logic because it had a different HW implementation from PSR.
Since all converged to HSW PSR and we dropped the VLV/CHV support, let's also kill the useless function pointers and leave the code cleaner.
--- drivers/gpu/drm/i915/i915_drv.h | 8 ----- drivers/gpu/drm/i915/intel_psr.c | 55 +++++++++++--------------------- 2 files changed, 18 insertions(+), 45 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -8
@@ -631,14 +631,6 @@ struct i915_psr {bool debug;ktime_t last_entry_attempt;ktime_t last_exit; - -void (*enable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*disable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*enable_sink)(struct intel_dp *); -void (*activate)(struct intel_dp *); -void (*setup_vsc)(struct intel_dp *,const struct intel_crtc_state *); };enum intel_pch {
drivers/gpu/drm/i915/intel_psr.c +18 -37
104 lines not on this page · raw message
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for drm/i915/psr: Kill useless function pointers.
== Series Details ==
== Series Details ==
Series: drm/i915/psr: Kill useless function pointers.
URL : https://patchwork.freedesktop.org/series/45373/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm/i915/psr: Kill useless function pointers. -drivers/gpu/drm/i915/selftests/../i915_drv.h:3680:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3672:16: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/psr: Kill useless function pointers.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/psr: Kill useless function pointers.
URL : https://patchwork.freedesktop.org/series/45373/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4376 -> Patchwork_9418 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9418 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9418, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45373/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9418:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_9418 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_gttfill@basic:
fi-byt-n2820: PASS -> FAIL (fdo#106744)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s4-devices:
fi-skl-6600u: DMESG-WARN -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
fi-skl-guc: FAIL (fdo#103191, fdo#104724) -> PASS fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744
== Participating hosts (43 -> 38) ==
Missing (5): fi-byt-j1900 fi-ctg-p8600 fi-bsw-cyan fi-ilk-m540 fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4376 -> Patchwork_9418
CI_DRM_4376: b64deb6f5bec9732aff68734c2e2382f044403f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9418: afc6d70546a79ce1ac4890312d56b4434b7b63fa @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
afc6d70546a7 drm/i915/psr: Kill useless function pointers.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9418/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/psr: Kill useless function pointers.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/psr: Kill useless function pointers.
URL : https://patchwork.freedesktop.org/series/45373/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4376_full -> Patchwork_9418_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9418_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9418_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9418_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-vebox:
shard-kbl: SKIP -> PASS
igt@gem_linear_blits@interruptible:
shard-apl: SKIP -> PASS
igt@perf_pmu@rc6:
shard-kbl: PASS -> SKIP +1== Known issues ==
Here are the changes found in Patchwork_9418_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-flip-vs-wf_vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#103928)
igt@kms_flip@2x-plain-flip-fb-recreate:
shard-hsw: PASS -> FAIL (fdo#100368)
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822, fdo#104724)
igt@perf@short-reads:
shard-kbl: PASS -> FAIL (fdo#103183)
igt@perf_pmu@busy-accuracy-98-vcs1:
shard-snb: NOTRUN -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
shard-apl: DMESG-FAIL (fdo#106560, fdo#106947) -> PASS
igt@drv_suspend@shrink:
shard-apl: FAIL (fdo#106886) -> PASS
igt@gem_exec_schedule@preemptive-hang-render:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@gem_softpin@noreloc-s3:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
shard-glk: FAIL (fdo#105703) -> PASS
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: FAIL (fdo#103822, fdo#104724) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103183 https://bugs.freedesktop.org/show_bug.cgi?id=103183
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4376 -> Patchwork_9418
CI_DRM_4376: b64deb6f5bec9732aff68734c2e2382f044403f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9418: afc6d70546a79ce1ac4890312d56b4434b7b63fa @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9418/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Rodrigo Vivi
At some point we introduced the function pointers on PSR code to help with VLV/CHV separation logic because it had a different HW implementation from PSR.
Since all converged to HSW PSR and we dropped the VLV/CHV support, let's also kill the useless function pointers and leave the code cleaner.
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Yay for removing dead code!
Quoted 147 lines
--- drivers/gpu/drm/i915/i915_drv.h | 8 ----- drivers/gpu/drm/i915/intel_psr.c | 55 +++++++++++--------------------- 2 files changed, 18 insertions(+), 45 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-8@@ -631,14 +631,6 @@ struct i915_psr {bool debug;ktime_t last_entry_attempt;ktime_t last_exit; - -void (*enable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*disable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*enable_sink)(struct intel_dp *); -void (*activate)(struct intel_dp *); -void (*setup_vsc)(struct intel_dp *,const struct intel_crtc_state *); };enum intel_pch {drivers/gpu/drm/i915/intel_psr.c +18
-37@@ -278,8 +278,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) } } -static void hsw_psr_setup_vsc (struct intel_dp *intel_dp, -const struct intel_crtc_state *crtc_state) +static void intel_psr_setup_vsc (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state) {struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (intel_dig_port->base.base.dev);@@ -344,7 +344,7 @@ static void hsw_psr_setup_aux(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR_AUX_CTL , aux_ctl); } -static void hsw_psr_enable_sink (struct intel_dp *intel_dp) +static void intel_psr_enable_sink (struct intel_dp *intel_dp) {struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = dig_port->base.base.dev;@@ -456,24 +456,6 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR2_CTL , val); } -static void hsw_psr_activate (struct intel_dp *intel_dp) -{ -struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); -struct drm_device *dev = dig_port->base.base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); - -/* On HSW+ after we enable PSR on source it will activate it -* as soon as it match configure idle_frame count. So -* we just actually enable it here on activation time. -*/ - -/* psr1 and psr2 are mutually exclusive.*/ -if (dev_priv->psr.psr2_enabled) -hsw_activate_psr2 (intel_dp); -else -hsw_activate_psr1 (intel_dp); -} -static bool intel_psr2_config_valid (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state) {@@ -583,12 +565,17 @@ static void intel_psr_activate(struct intel_dp *intel_dp)WARN_ON (dev_priv->psr.active);lockdep_assert_held (&dev_priv->psr.lock); - dev_priv->psr.activate (intel_dp); +/* psr1 and psr2 are mutually exclusive.*/ +if (dev_priv->psr.psr2_enabled) +hsw_activate_psr2 (intel_dp); +else +hsw_activate_psr1 (intel_dp); + dev_priv->psr.active = true; } -static void hsw_psr_enable_source (struct intel_dp *intel_dp, -const struct intel_crtc_state *crtc_state) +static void intel_psr_enable_source (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state) {struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = dig_port->base.base.dev;@@ -666,9 +653,9 @@ void intel_psr_enable(struct intel_dp *intel_dp, dev_priv->psr.psr2_enabled = crtc_state->has_psr2; dev_priv->psr.busy_frontbuffer_bits =0 ; - dev_priv->psr.setup_vsc (intel_dp, crtc_state); - dev_priv->psr.enable_sink (intel_dp); - dev_priv->psr.enable_source (intel_dp, crtc_state); +intel_psr_setup_vsc (intel_dp, crtc_state); +intel_psr_enable_sink (intel_dp); +intel_psr_enable_source (intel_dp, crtc_state); dev_priv->psr.enabled = intel_dp;intel_psr_activate (intel_dp);@@ -677,8 +664,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,mutex_unlock (&dev_priv->psr.lock); } -static void hsw_psr_disable (struct intel_dp *intel_dp, -const struct intel_crtc_state *old_crtc_state) +static void +intel_psr_disable_source (struct intel_dp *intel_dp, +const struct intel_crtc_state *old_crtc_state) {struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = intel_dig_port->base.base.dev;@@ -747,7 +735,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,return ; } - dev_priv->psr.disable_source (intel_dp, old_crtc_state); +intel_psr_disable_source (intel_dp, old_crtc_state);/* Disable PSR on Sink */ drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG ,0 );@@ -986,11 +974,4 @@ void intel_psr_init(struct drm_i915_private *dev_priv)INIT_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock); - - dev_priv->psr.enable_source = hsw_psr_enable_source; - dev_priv->psr.disable_source = hsw_psr_disable; - dev_priv->psr.enable_sink = hsw_psr_enable_sink; - dev_priv->psr.activate = hsw_psr_activate; - dev_priv->psr.setup_vsc = hsw_psr_setup_vsc; - }Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerQuoted 9 lines · Daniel Vetter
Quoted 8 lines · Rodrigo Vivi
At some point we introduced the function pointers on PSR code to help with VLV/CHV separation logic because it had a different HW implementation from PSR.
Since all converged to HSW PSR and we dropped the VLV/CHV support, let's also kill the useless function pointers and leave the code cleaner.
Quoted 6 lines
Quoted 2 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>Yay for removing dead code!
Reviewed-by Daniel Vetter <[email protected]>
thanks, pushed to dinq.
Quoted 144 lines
Quoted 144 lines
--- drivers/gpu/drm/i915/i915_drv.h | 8 ----- drivers/gpu/drm/i915/intel_psr.c | 55 +++++++++++--------------------- 2 files changed, 18 insertions(+), 45 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-8@@ -631,14 +631,6 @@ struct i915_psr {bool debug;ktime_t last_entry_attempt;ktime_t last_exit; - -void (*enable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*disable_source)(struct intel_dp *, -const struct intel_crtc_state *); -void (*enable_sink)(struct intel_dp *); -void (*activate)(struct intel_dp *); -void (*setup_vsc)(struct intel_dp *,const struct intel_crtc_state *); };enum intel_pch {drivers/gpu/drm/i915/intel_psr.c +18
-37@@ -278,8 +278,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) } } -static void hsw_psr_setup_vsc (struct intel_dp *intel_dp, -const struct intel_crtc_state *crtc_state) +static void intel_psr_setup_vsc (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state) {struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (intel_dig_port->base.base.dev);@@ -344,7 +344,7 @@ static void hsw_psr_setup_aux(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR_AUX_CTL , aux_ctl); } -static void hsw_psr_enable_sink (struct intel_dp *intel_dp) +static void intel_psr_enable_sink (struct intel_dp *intel_dp) {struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = dig_port->base.base.dev;@@ -456,24 +456,6 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR2_CTL , val); } -static void hsw_psr_activate (struct intel_dp *intel_dp) -{ -struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); -struct drm_device *dev = dig_port->base.base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); - -/* On HSW+ after we enable PSR on source it will activate it -* as soon as it match configure idle_frame count. So -* we just actually enable it here on activation time. -*/ - -/* psr1 and psr2 are mutually exclusive.*/ -if (dev_priv->psr.psr2_enabled) -hsw_activate_psr2 (intel_dp); -else -hsw_activate_psr1 (intel_dp); -} -static bool intel_psr2_config_valid (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state) {@@ -583,12 +565,17 @@ static void intel_psr_activate(struct intel_dp *intel_dp)WARN_ON (dev_priv->psr.active);lockdep_assert_held (&dev_priv->psr.lock); - dev_priv->psr.activate (intel_dp); +/* psr1 and psr2 are mutually exclusive.*/ +if (dev_priv->psr.psr2_enabled) +hsw_activate_psr2 (intel_dp); +else +hsw_activate_psr1 (intel_dp); + dev_priv->psr.active = true; } -static void hsw_psr_enable_source (struct intel_dp *intel_dp, -const struct intel_crtc_state *crtc_state) +static void intel_psr_enable_source (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state) {struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = dig_port->base.base.dev;@@ -666,9 +653,9 @@ void intel_psr_enable(struct intel_dp *intel_dp, dev_priv->psr.psr2_enabled = crtc_state->has_psr2; dev_priv->psr.busy_frontbuffer_bits =0 ; - dev_priv->psr.setup_vsc (intel_dp, crtc_state); - dev_priv->psr.enable_sink (intel_dp); - dev_priv->psr.enable_source (intel_dp, crtc_state); +intel_psr_setup_vsc (intel_dp, crtc_state); +intel_psr_enable_sink (intel_dp); +intel_psr_enable_source (intel_dp, crtc_state); dev_priv->psr.enabled = intel_dp;intel_psr_activate (intel_dp);@@ -677,8 +664,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,mutex_unlock (&dev_priv->psr.lock); } -static void hsw_psr_disable (struct intel_dp *intel_dp, -const struct intel_crtc_state *old_crtc_state) +static void +intel_psr_disable_source (struct intel_dp *intel_dp, +const struct intel_crtc_state *old_crtc_state) {struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = intel_dig_port->base.base.dev;@@ -747,7 +735,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,return ; } - dev_priv->psr.disable_source (intel_dp, old_crtc_state); +intel_psr_disable_source (intel_dp, old_crtc_state);/* Disable PSR on Sink */ drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG ,0 );@@ -986,11 +974,4 @@ void intel_psr_init(struct drm_i915_private *dev_priv)INIT_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock); - - dev_priv->psr.enable_source = hsw_psr_enable_source; - dev_priv->psr.disable_source = hsw_psr_disable; - dev_priv->psr.enable_sink = hsw_psr_enable_sink; - dev_priv->psr.activate = hsw_psr_activate; - dev_priv->psr.setup_vsc = hsw_psr_setup_vsc; - }Signature · 1 line
2.17.1
Quoted 9 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx