All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/9] drm/i915: Use unsigned int for latencies
Date: Fri,  7 Oct 2016 14:34:08 +0100	[thread overview]
Message-ID: <1475847252-31580-6-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1475847252-31580-1-git-send-email-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 96d0c57c816c..68b3614c6a0b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -372,7 +372,7 @@ void intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable)
  * A value of 5us seems to be a good balance; safe for very low end
  * platforms but not overly aggressive on lower latency configs.
  */
-static const int pessimal_latency_ns = 5000;
+static const unsigned int pessimal_latency_ns = 5000;
 
 #define VLV_FIFO_START(dsparb, dsparb2, lo_shift, hi_shift) \
 	((((dsparb) >> (lo_shift)) & 0xff) | ((((dsparb2) >> (hi_shift)) & 0x1) << 8))
@@ -585,7 +585,7 @@ static const struct intel_watermark_params i845_wm_info = {
 static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
 					const struct intel_watermark_params *wm,
 					int fifo_size, int cpp,
-					unsigned long latency_ns)
+					unsigned int latency_ns)
 {
 	long entries_required, wm_size;
 
@@ -709,9 +709,9 @@ static void pineview_update_wm(struct drm_crtc *unused_crtc)
 static bool g4x_compute_wm0(struct drm_device *dev,
 			    int plane,
 			    const struct intel_watermark_params *display,
-			    int display_latency_ns,
+			    unsigned int display_latency_ns,
 			    const struct intel_watermark_params *cursor,
-			    int cursor_latency_ns,
+			    unsigned int cursor_latency_ns,
 			    int *plane_wm,
 			    int *cursor_wm)
 {
@@ -796,7 +796,7 @@ static bool g4x_check_srwm(struct drm_device *dev,
 
 static bool g4x_compute_srwm(struct drm_device *dev,
 			     int plane,
-			     int latency_ns,
+			     unsigned int latency_ns,
 			     const struct intel_watermark_params *display,
 			     const struct intel_watermark_params *cursor,
 			     int *display_wm, int *cursor_wm)
@@ -1385,7 +1385,7 @@ static void vlv_update_wm(struct drm_crtc *crtc)
 static void g4x_update_wm(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
-	static const int sr_latency_ns = 12000;
+	static const unsigned int sr_latency_ns = 12000;
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	int planea_wm, planeb_wm, cursora_wm, cursorb_wm;
 	int plane_sr, cursor_sr;
@@ -1453,7 +1453,7 @@ static void i965_update_wm(struct drm_crtc *unused_crtc)
 	crtc = single_enabled_crtc(dev);
 	if (crtc) {
 		/* self-refresh has much higher latency */
-		static const int sr_latency_ns = 12000;
+		static const unsigned int sr_latency_ns = 12000;
 		const struct drm_display_mode *adjusted_mode = &to_intel_crtc(crtc)->config->base.adjusted_mode;
 		int clock = adjusted_mode->crtc_clock;
 		int htotal = adjusted_mode->crtc_htotal;
@@ -1600,7 +1600,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
 	/* Calc sr entries for one plane configs */
 	if (HAS_FW_BLC(dev) && enabled) {
 		/* self-refresh has much higher latency */
-		static const int sr_latency_ns = 6000;
+		static const unsigned int sr_latency_ns = 6000;
 		const struct drm_display_mode *adjusted_mode = &to_intel_crtc(enabled)->config->base.adjusted_mode;
 		int clock = adjusted_mode->crtc_clock;
 		int htotal = adjusted_mode->crtc_htotal;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-10-07 13:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 13:34 [PATCH 0/9] .rodata diet 2 (non-disruptive version) Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 1/9] drm/i915: Shrink cxsr_latency_table Tvrtko Ursulin
2016-10-10  7:15   ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 2/9] drm/i915: Shrink sdvo_cmd_names Tvrtko Ursulin
2016-10-10  7:16   ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 3/9] drm/i915: Shrink per-platform watermark configuration Tvrtko Ursulin
2016-10-10  7:17   ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 4/9] drm/i915: Shrink TV modes const data Tvrtko Ursulin
2016-10-10  6:49   ` Jani Nikula
2016-10-10  8:38     ` Tvrtko Ursulin
2016-10-10  7:22   ` Joonas Lahtinen
2016-10-07 13:34 ` Tvrtko Ursulin [this message]
2016-10-10  7:24   ` [PATCH 5/9] drm/i915: Use unsigned int for latencies Joonas Lahtinen
2016-10-10  8:34     ` Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 6/9] drm/i915: unsigned int is enough for crtc clock Tvrtko Ursulin
2016-10-10  7:25   ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 7/9] drm/i915: Convert get_fifo_size return from int to unsigned int Tvrtko Ursulin
2016-10-10  7:46   ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 8/9] drm/i915: Make intel_calculate_wm return " Tvrtko Ursulin
2016-10-10  8:02   ` Joonas Lahtinen
2016-10-10  8:33     ` Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 9/9] drm/i915: Tidy watermark computation local types Tvrtko Ursulin
2016-10-07 13:48   ` Ville Syrjälä
2016-10-07 14:51     ` Tvrtko Ursulin
2016-10-07 15:16       ` Ville Syrjälä
2016-10-10  8:06         ` Joonas Lahtinen
2016-10-10  8:19 ` ✗ Fi.CI.BAT: warning for .rodata diet 2 (non-disruptive version) Patchwork
2016-10-10  8:27 ` ✗ Fi.CI.BAT: 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=1475847252-31580-6-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --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.