public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/gen9: don't call skl_pipe_pixel_rate() twice on the same function
@ 2016-10-07 20:13 Paulo Zanoni
  2016-10-07 20:13 ` [PATCH 2/2] drm/i915/gen9: fix watermarks when using the pipe scaler Paulo Zanoni
  2016-10-10 13:19 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915/gen9: don't call skl_pipe_pixel_rate() twice on the same function Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Paulo Zanoni @ 2016-10-07 20:13 UTC (permalink / raw)
  To: intel-gfx; +Cc: dhinakaran.pandiyan, Paulo Zanoni

One day this function will have a complete implementation which won't
be a simple one-line return, so avoid unnecessarily calling it when we
can just store the value in a variable.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index fe6c1c6..3a6df2f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3739,14 +3739,18 @@ skl_compute_wm_level(const struct drm_i915_private *dev_priv,
 static uint32_t
 skl_compute_linetime_wm(struct intel_crtc_state *cstate)
 {
+	uint32_t pixel_rate;
+
 	if (!cstate->base.active)
 		return 0;
 
-	if (WARN_ON(skl_pipe_pixel_rate(cstate) == 0))
+	pixel_rate = skl_pipe_pixel_rate(cstate);
+
+	if (WARN_ON(pixel_rate == 0))
 		return 0;
 
 	return DIV_ROUND_UP(8 * cstate->base.adjusted_mode.crtc_htotal * 1000,
-			    skl_pipe_pixel_rate(cstate));
+			    pixel_rate);
 }
 
 static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-10 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07 20:13 [PATCH 1/2] drm/i915/gen9: don't call skl_pipe_pixel_rate() twice on the same function Paulo Zanoni
2016-10-07 20:13 ` [PATCH 2/2] drm/i915/gen9: fix watermarks when using the pipe scaler Paulo Zanoni
2016-10-07 20:16   ` Zanoni, Paulo R
2016-10-10  9:00     ` Jani Nikula
2016-10-10 13:19 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915/gen9: don't call skl_pipe_pixel_rate() twice on the same function Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox