From: Animesh Manna <animesh.manna@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 02/12] drm/i915: Only allow rpm on gen9+ with dmc loaded
Date: Fri, 10 Jul 2015 13:50:23 +0530 [thread overview]
Message-ID: <559F8047.3040604@intel.com> (raw)
In-Reply-To: <1436472288-595-2-git-send-email-daniel.vetter@ffwll.ch>
On 7/10/2015 1:34 AM, Daniel Vetter wrote:
> Instead of trying to deal with this complexity we'll simply require
> that the dmc firmware is available for runtime pm support. We do that
> by not releasing the rpm reference we acquire when starting the
> firmware loader work. Note that since we hold a rpm reference (and rpm
> get/put is synchronized with its own locking already) there's no need
> for any additional synchronization between the dmc loader and the rpm
> entry/exit code.
>
> Hence we can remove all dmc_load_status_get calls, they don't do
> anything any more.
>
> Cc: Animesh Manna <animesh.manna@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
For BXT, without DMC firmware display engine can goto DC9, so if firmware failed to load then as we are holding rpm reference - it will block dc9 entry.
Do we really want to block dc9 if firmware is not present or failed to load?
Regards,
Animesh
> ---
> drivers/gpu/drm/i915/intel_csr.c | 9 +++++----
> drivers/gpu/drm/i915/intel_runtime_pm.c | 17 +++--------------
> 2 files changed, 8 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index 16cd9dae1c1b..03d83892cdb0 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -393,8 +393,11 @@ static void finish_csr_load(const struct firmware *fw, void *context)
> out:
> if (fw_loaded)
> intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
> - else
> - intel_csr_load_status_set(dev_priv, FW_FAILED);
> +
> + /*
> + * We require the dmc firmware for runtime pm on gen9+ - leak the rpm
> + * reference in case this failed to disable rpm on.
> + */
>
> release_firmware(fw);
> }
> @@ -462,8 +465,6 @@ void intel_csr_ucode_fini(struct drm_device *dev)
>
> void assert_csr_loaded(struct drm_i915_private *dev_priv)
> {
> - WARN(intel_csr_load_status_get(dev_priv) != FW_LOADED,
> - "CSR is not loaded.\n");
> WARN(!I915_READ(CSR_PROGRAM_BASE),
> "CSR program storage start is NULL\n");
> WARN(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n");
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 2628b21ff2c0..ed8c0cee738f 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -644,21 +644,10 @@ static void skl_set_power_well(struct drm_i915_private *dev_priv,
>
> if ((GEN9_ENABLE_DC5(dev) || SKL_ENABLE_DC6(dev)) &&
> power_well->data == SKL_DISP_PW_2) {
> - enum csr_state state;
> - /* TODO: wait for a completion event or
> - * similar here instead of busy
> - * waiting using wait_for function.
> - */
> - wait_for((state = intel_csr_load_status_get(dev_priv)) !=
> - FW_UNINITIALIZED, 1000);
> - if (state != FW_LOADED)
> - DRM_ERROR("CSR firmware not ready (%d)\n",
> - state);
> + if (SKL_ENABLE_DC6(dev))
> + skl_enable_dc6(dev_priv);
> else
> - if (SKL_ENABLE_DC6(dev))
> - skl_enable_dc6(dev_priv);
> - else
> - gen9_enable_dc5(dev_priv);
> + gen9_enable_dc5(dev_priv);
> }
> }
> }
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-10 8:20 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 10:19 [PATCH] drm/i915/skl: replace csr_mutex by completion in csr firmware loading Animesh Manna
2015-05-21 12:11 ` Daniel Vetter
2015-05-21 17:05 ` Animesh Manna
2015-05-21 21:29 ` Daniel Vetter
2015-06-04 5:59 ` Sagar Arun Kamble
2015-06-04 14:36 ` Dave Gordon
2015-06-15 10:07 ` Daniel Vetter
2015-06-15 18:41 ` Dave Gordon
2015-06-15 10:02 ` Daniel Vetter
2015-06-29 8:39 ` Daniel Vetter
2015-07-07 12:40 ` [PATCH] drm/i915: Resign firmware loading for dmc Animesh Manna
2015-07-07 13:18 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 0/6] Redesign the dmc firmware loading Animesh Manna
2015-07-08 14:24 ` [PATCH 1/6] drm/i915/gen9: Removed csr-lock and csr-state Animesh Manna
2015-07-09 18:17 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 2/6] drm/i915/gen9: Added a async work for fw-loading and dc5/dc6 programming Animesh Manna
2015-07-08 14:24 ` [PATCH 3/6] drm/i915/gen9: Replaced request_firmware_nowait() by request_firmware() Animesh Manna
2015-07-09 18:24 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 4/6] drm/i915/gen9: Added dmc_present flag to check firmware loading status Animesh Manna
2015-07-09 18:19 ` Daniel Vetter
2015-07-08 14:24 ` [PATCH 5/6] drm/i915/skl: Removed assert for csr-fw-loading during disabling dc6 Animesh Manna
2015-07-08 14:24 ` [PATCH 6/6] drm/i915/gen9: Corrected the sanity check of mmio address range for csr Animesh Manna
2015-07-08 19:39 ` shuang.he
2015-07-09 17:32 ` Daniel Vetter
2015-07-09 20:04 ` [PATCH 01/12] drm/i915: use correct power domain for csr loading Daniel Vetter
2015-07-09 20:04 ` [PATCH 02/12] drm/i915: Only allow rpm on gen9+ with dmc loaded Daniel Vetter
2015-07-10 8:20 ` Animesh Manna [this message]
2015-07-10 16:44 ` Daniel Vetter
2015-07-09 20:04 ` [PATCH 03/12] drm/i915: move assert_csr_loaded into intel_rpm.c Daniel Vetter
2015-07-09 20:04 ` [PATCH 04/12] drm/i915: Remove csr.state, csr_lock and related code Daniel Vetter
2015-07-09 20:04 ` [PATCH 05/12] drm/i915: Align line continuations in intel_csr.c Daniel Vetter
2015-07-09 20:04 ` [PATCH 06/12] drm/i915: Simplify csr loading failure printing Daniel Vetter
2015-07-09 20:04 ` [PATCH 07/12] drm/i915/csr: extract parse_csr_fw Daniel Vetter
2015-07-09 20:04 ` [PATCH 08/12] drm/i915: Don't try to load garbage dmc firmware on resume Daniel Vetter
2015-07-09 20:04 ` [PATCH 09/12] drm/i915: Use dev_priv in csr functions Daniel Vetter
2015-07-09 20:04 ` [PATCH 10/12] drm/i915: Use request_firmware and our own async work Daniel Vetter
2015-07-09 20:04 ` [PATCH 11/12] drm/i915: Use flush_work to synchronize with dmc loader Daniel Vetter
2015-07-09 20:04 ` [PATCH 12/12] drm/i915/csr: Simplify stepping computation Daniel Vetter
2015-07-11 9:22 ` shuang.he
2015-07-10 8:12 ` [PATCH 01/12] drm/i915: use correct power domain for csr loading Animesh Manna
2015-07-10 16:46 ` Daniel Vetter
2015-07-08 10:31 ` [PATCH] drm/i915: Resign firmware loading for dmc shuang.he
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=559F8047.3040604@intel.com \
--to=animesh.manna@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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.