On Fri, Jan 23, 2015 at 09:04:26PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > Replace all the vlv_gpu_freq(), vlv_freq_opcode(), > *GT_FREQUENCY_MULTIPLIER, and /GT_FREQUENCY_MULTIPLIER instances > with intel_gpu_freq() and intel_freq_opcode() calls. > > Most of the change was performed with the following semantic patch: > @@ > expression E; > @@ > ( > - E * GT_FREQUENCY_MULTIPLIER > + intel_gpu_freq(dev_priv, E) > | > - E *= GT_FREQUENCY_MULTIPLIER > + E = intel_gpu_freq(dev_priv, E) > | > - E /= GT_FREQUENCY_MULTIPLIER > + E = intel_freq_opcode(dev_priv, E) > | > - do_div(E, GT_FREQUENCY_MULTIPLIER) > + E = intel_freq_opcode(dev_priv, E) > ) > > @@ > expression E1, E2; > @@ > ( > - vlv_gpu_freq(E1, E2) > + intel_gpu_freq(E1, E2) > | > - vlv_freq_opcode(E1, E2) > + intel_freq_opcode(E1, E2) > ) > > @@ > expression E1, E2, E3, E4; > @@ > ( > - if (IS_VALLEYVIEW(E1)) { > - E2 = intel_gpu_freq(E3, E4); > - } else { > - E2 = intel_gpu_freq(E3, E4); > - } > + E2 = intel_gpu_freq(E3, E4); > | > - if (IS_VALLEYVIEW(E1)) { > - E2 = intel_freq_opcode(E3, E4); > - } else { > - E2 = intel_freq_opcode(E3, E4); > - } > + E2 = intel_freq_opcode(E3, E4); > ) > > One hunk was manually undone as intel_gpu_freq() ended up > calling itself. Supposedly it would be possible to exclude > certain functions via !=~, but I couldn't get that to work. > > Also the removal of vlv_gpu_freq() and vlv_opcode_freq() compat > wrappers was done manually. > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Spot checked most, Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx