[Intel-gfx] [PATCH v2] drm/i915: Introduce intel_set_rps()

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 3 05:36:50 PST 2015


On Mon, Feb 02, 2015 at 07:09:50PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Replace the valleyview_set_rps() and gen6_set_rps() calls with
> intel_set_rps() which itself does the IS_VALLEYVIEW() check. The
> code becomes simpler since the callers don't have to do this check
> themselves.
> 
> Most of the change was performe with the following semantic patch:
> @@
> expression E1, E2, E3;
> @@
> - if (IS_VALLEYVIEW(E1)) {
> -  valleyview_set_rps(E2, E3);
> - } else {
> -  gen6_set_rps(E2, E3);
> - }
> + intel_set_rps(E2, E3);
> 
> Adding intel_set_rps() and making valleyview_set_rps() and gen6_set_rps()
> static was done manually. Also valleyview_set_rps() had to be moved a
> bit avoid a forward declaration.
> 
> v2: Use a less greedy semantic patch
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list