From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 06/17] drm/i915/pps: abstract intel_pps_vdd_off_sync
Date: Wed, 13 Jan 2021 16:12:16 +0530 [thread overview]
Message-ID: <20210113104215.GN11717@intel.com> (raw)
In-Reply-To: <1e722290208d827c5cae107fe41dbfe41a494793.1610127741.git.jani.nikula@intel.com>
On 2021-01-08 at 19:44:14 +0200, Jani Nikula wrote:
> Add a locked version of intel_pps_vdd_off_sync_unlocked() that does
> everything the callers expect it to. No functional changes.
>
> v2: Fix typo (Anshuman)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
LGTM.
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 31 +++---------------------
> drivers/gpu/drm/i915/display/intel_pps.c | 18 +++++++++++++-
> drivers/gpu/drm/i915/display/intel_pps.h | 2 +-
> 3 files changed, 21 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 1384f1d3a9cf..bff5e735a92e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6249,17 +6249,8 @@ void intel_dp_encoder_flush_work(struct drm_encoder *encoder)
> struct intel_dp *intel_dp = &dig_port->dp;
>
> intel_dp_mst_encoder_cleanup(dig_port);
> - if (intel_dp_is_edp(intel_dp)) {
> - intel_wakeref_t wakeref;
>
> - cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> - /*
> - * vdd might still be enabled do to the delayed vdd off.
> - * Make sure vdd is actually turned off here.
> - */
> - with_intel_pps_lock(intel_dp, wakeref)
> - intel_pps_vdd_off_sync_unlocked(intel_dp);
> - }
> + intel_pps_vdd_off_sync(intel_dp);
>
> intel_dp_aux_fini(intel_dp);
> }
> @@ -6275,18 +6266,8 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder)
> void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(intel_encoder);
> - intel_wakeref_t wakeref;
> -
> - if (!intel_dp_is_edp(intel_dp))
> - return;
>
> - /*
> - * vdd might still be enabled do to the delayed vdd off.
> - * Make sure vdd is actually turned off here.
> - */
> - cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> - with_intel_pps_lock(intel_dp, wakeref)
> - intel_pps_vdd_off_sync_unlocked(intel_dp);
> + intel_pps_vdd_off_sync(intel_dp);
> }
>
> void intel_dp_encoder_shutdown(struct intel_encoder *intel_encoder)
> @@ -7140,13 +7121,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> return true;
>
> out_vdd_off:
> - cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> - /*
> - * vdd might still be enabled do to the delayed vdd off.
> - * Make sure vdd is actually turned off here.
> - */
> - with_intel_pps_lock(intel_dp, wakeref)
> - intel_pps_vdd_off_sync_unlocked(intel_dp);
> + intel_pps_vdd_off_sync(intel_dp);
>
> return false;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
> index fd3677948800..b6c07694ae9d 100644
> --- a/drivers/gpu/drm/i915/display/intel_pps.c
> +++ b/drivers/gpu/drm/i915/display/intel_pps.c
> @@ -637,7 +637,7 @@ void intel_pps_vdd_on(struct intel_dp *intel_dp)
> dp_to_dig_port(intel_dp)->base.base.name);
> }
>
> -void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
> +static void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
> {
> struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> struct intel_digital_port *dig_port =
> @@ -678,6 +678,22 @@ void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
> fetch_and_zero(&intel_dp->vdd_wakeref));
> }
>
> +void intel_pps_vdd_off_sync(struct intel_dp *intel_dp)
> +{
> + intel_wakeref_t wakeref;
> +
> + if (!intel_dp_is_edp(intel_dp))
> + return;
> +
> + cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> + /*
> + * vdd might still be enabled due to the delayed vdd off.
> + * Make sure vdd is actually turned off here.
> + */
> + with_intel_pps_lock(intel_dp, wakeref)
> + intel_pps_vdd_off_sync_unlocked(intel_dp);
> +}
> +
> void edp_panel_vdd_work(struct work_struct *__work)
> {
> struct intel_dp *intel_dp =
> diff --git a/drivers/gpu/drm/i915/display/intel_pps.h b/drivers/gpu/drm/i915/display/intel_pps.h
> index e7f0473be9a7..3cab183658c6 100644
> --- a/drivers/gpu/drm/i915/display/intel_pps.h
> +++ b/drivers/gpu/drm/i915/display/intel_pps.h
> @@ -29,7 +29,6 @@ void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
>
> bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
> void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
> -void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp);
> void intel_pps_on_unlocked(struct intel_dp *intel_dp);
> void intel_pps_off_unlocked(struct intel_dp *intel_dp);
> void edp_panel_vdd_work(struct work_struct *__work);
> @@ -38,6 +37,7 @@ void intel_pps_vdd_sanitize(struct intel_dp *intel_dp);
> void intel_pps_vdd_on(struct intel_dp *intel_dp);
> void intel_pps_on(struct intel_dp *intel_dp);
> void intel_pps_off(struct intel_dp *intel_dp);
> +void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
> bool intel_pps_have_power(struct intel_dp *intel_dp);
>
> void wait_panel_power_cycle(struct intel_dp *intel_dp);
> --
> 2.20.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-01-13 10:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 17:44 [Intel-gfx] [PATCH v2 00/17] drm/i915/dp: split out pps and aux Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 01/17] drm/i915/pps: abstract panel power sequencer from intel_dp.c Jani Nikula
2021-01-13 15:34 ` Jani Nikula
2021-01-13 16:47 ` Anshuman Gupta
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 02/17] drm/i915/pps: rename pps_{, un}lock -> intel_pps_{, un}lock Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 03/17] drm/i915/pps: rename intel_edp_backlight_* to intel_pps_backlight_* Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 04/17] drm/i915/pps: rename intel_edp_panel_* to intel_pps_* Jani Nikula
2021-01-13 10:39 ` Anshuman Gupta
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 05/17] drm/i915/pps: rename edp_panel_* to intel_pps_*_unlocked Jani Nikula
2021-01-13 10:41 ` Anshuman Gupta
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 06/17] drm/i915/pps: abstract intel_pps_vdd_off_sync Jani Nikula
2021-01-13 10:42 ` Anshuman Gupta [this message]
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 07/17] drm/i915/pps: add higher level intel_pps_init() call Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 08/17] drm/i915/pps: abstract intel_pps_encoder_reset() Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 09/17] drm/i915/pps: rename intel_dp_check_edp to intel_pps_check_power_unlocked Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 10/17] drm/i915/pps: rename intel_power_sequencer_reset to intel_pps_reset_all Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 11/17] drm/i915/pps: add locked intel_pps_wait_power_cycle Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 12/17] drm/i915/pps: rename vlv_init_panel_power_sequencer to vlv_pps_init Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 13/17] drm/i915/pps: rename intel_dp_init_panel_power_sequencer* functions Jani Nikula
2021-01-13 11:02 ` Anshuman Gupta
2021-01-14 8:31 ` Jani Nikula
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 14/17] drm/i915/pps: refactor init abstractions Jani Nikula
2021-01-13 11:44 ` Anshuman Gupta
2021-01-14 8:46 ` Jani Nikula
2021-01-20 4:20 ` Gupta, Anshuman
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 15/17] drm/i915/pps: move pps code over from intel_display.c and refactor Jani Nikula
2021-01-13 11:55 ` Anshuman Gupta
2021-01-14 8:56 ` Jani Nikula
2021-01-20 4:22 ` Gupta, Anshuman
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 16/17] drm/i915/dp: abstract struct intel_dp pps members to a sub-struct Jani Nikula
2021-01-13 11:58 ` Anshuman Gupta
2021-01-08 17:44 ` [Intel-gfx] [PATCH v2 17/17] drm/i915/dp: split out aux functionality to intel_dp_aux.c Jani Nikula
2021-01-20 4:44 ` Gupta, Anshuman
2021-01-08 19:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: split out pps and aux (rev2) Patchwork
2021-01-08 19:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-08 19:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-09 1:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210113104215.GN11717@intel.com \
--to=anshuman.gupta@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.