From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH 09/10] drm/i915: Sanity check cdclk in vlv_set_cdclk()
Date: Tue, 24 Oct 2017 12:52:15 +0300 [thread overview]
Message-ID: <20171024095216.1638-10-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20171024095216.1638-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
chv_set_cdclk() sanity checks that the cdclk frequency is one of the
legal values. Do the same in the VLV function.
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_cdclk.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
index 4ca4a34b7bfa..fedfe3c720b6 100644
--- a/drivers/gpu/drm/i915/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/intel_cdclk.c
@@ -520,6 +520,18 @@ static void vlv_set_cdclk(struct drm_i915_private *dev_priv,
int cdclk = cdclk_state->cdclk;
u32 val, cmd = cdclk_state->voltage_level;
+ switch (cdclk) {
+ case 400000:
+ case 333333:
+ case 320000:
+ case 266667:
+ case 200000:
+ break;
+ default:
+ MISSING_CASE(cdclk);
+ return;
+ }
+
/* There are cases where we can end up here with power domains
* off and a CDCLK frequency other than the minimum, like when
* issuing a modeset without actually changing any display after
--
2.13.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-24 9:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 9:52 [PATCH v2 00/10] drm/i915: CNL DVFS thing Ville Syrjala
2017-10-24 9:52 ` [PATCH 01/10] drm/i915: Clean up some cdclk switch statements Ville Syrjala
2017-10-24 9:52 ` [PATCH v2 02/10] drm/i915: Start tracking voltage level in the cdclk state Ville Syrjala
2017-10-24 9:52 ` [PATCH v4 03/10] drm/i915: Use cdclk_state->voltage on VLV/CHV Ville Syrjala
2017-10-24 9:52 ` [PATCH v3 04/10] drm/i915: Use cdclk_state->voltage on BDW Ville Syrjala
2017-10-24 9:52 ` [PATCH v2 05/10] drm/i915: Use cdclk_state->voltage on SKL/KBL/CFL Ville Syrjala
2017-10-24 9:52 ` [PATCH v2 06/10] drm/i915: Use cdclk_state->voltage on BXT/GLK Ville Syrjala
2017-10-24 9:52 ` [PATCH v2 07/10] drm/i915: Use cdclk_state->voltage on CNL Ville Syrjala
2017-10-24 9:52 ` [PATCH v4 08/10] drm/i915: Adjust system agent voltage on CNL if required by DDI ports Ville Syrjala
2017-10-24 9:52 ` Ville Syrjala [this message]
2017-10-24 17:47 ` [PATCH 09/10] drm/i915: Sanity check cdclk in vlv_set_cdclk() Rodrigo Vivi
2017-10-24 9:52 ` [PATCH 10/10] drm/i915: Perform a central cdclk state sanity check Ville Syrjala
2017-10-24 21:51 ` Rodrigo Vivi
2017-10-24 10:01 ` [PATCH v2 00/10] drm/i915: CNL DVFS thing Ville Syrjälä
2017-10-24 11:12 ` ✗ Fi.CI.BAT: failure for drm/i915: CNL DVFS thing (rev7) Patchwork
2017-10-24 13:23 ` Patchwork
2017-10-24 17:01 ` ✗ Fi.CI.BAT: warning " Patchwork
2017-10-24 18:30 ` ✗ Fi.CI.BAT: failure " Patchwork
2017-10-24 20:08 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-25 6:15 ` Saarinen, Jani
2017-10-24 21:29 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-25 13:22 ` [PATCH v2 00/10] drm/i915: CNL DVFS thing Ville Syrjälä
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=20171024095216.1638-10-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox