Message ID | 1461350146-23454-1-git-send-email-akash.goel@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Apr 24, 2016 at 09:53:27AM -0000, Patchwork wrote: > == Series Details == > > Series: series starting with [1/3] drm/i915: Macros to convert PM time interval values to microseconds > URL : https://patchwork.freedesktop.org/series/6184/ > State : warning > > == Summary == > > Series 6184v1 Series without cover letter > http://patchwork.freedesktop.org/api/1.0/series/6184/revisions/1/mbox/ > > Test kms_force_connector_basic: > Subgroup force-edid: > pass -> SKIP (ivb-t430s) Unrelated, and pushed. Thanks, -Chris
On Sat, Apr 23, 2016 at 12:05:44AM +0530, akash.goel@intel.com wrote: > From: Akash Goel <akash.goel@intel.com> > > Added a new GT_PM_INTERVAL_TO_US macro to perform the platform > specific conversion of PM time interval values to microseconds unit. > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > Signed-off-by: Akash Goel <akash.goel@intel.com> > --- > drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index 9464ba3..eacd9ae 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -2939,6 +2939,15 @@ enum skl_disp_power_wells { > INTERVAL_1_33_US(us)) : \ > INTERVAL_1_28_US(us)) > > +#define INTERVAL_1_28_TO_US(interval) (((interval) << 7) / 100) > +#define INTERVAL_1_33_TO_US(interval) (((interval) << 2) / 3) > +#define INTERVAL_0_833_TO_US(interval) (((interval) * 5) / 6) > +#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN9(dev_priv) ? \ > + (IS_BROXTON(dev_priv) ? \ > + INTERVAL_0_833_TO_US(interval) : \ > + INTERVAL_1_33_TO_US(interval)) : \ > + INTERVAL_1_28_TO_US(interval)) Bikeshed, but I think once we have platform logic in there a real inline functino starts to look better. Feel free to ignore since already pushed. -Daniel > + > /* > * Logical Context regs > */ > -- > 1.9.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Tue, Apr 26, 2016 at 04:06:05PM +0200, Daniel Vetter wrote: > On Sat, Apr 23, 2016 at 12:05:44AM +0530, akash.goel@intel.com wrote: > > From: Akash Goel <akash.goel@intel.com> > > > > Added a new GT_PM_INTERVAL_TO_US macro to perform the platform > > specific conversion of PM time interval values to microseconds unit. > > > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > > Signed-off-by: Akash Goel <akash.goel@intel.com> > > --- > > drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > > index 9464ba3..eacd9ae 100644 > > --- a/drivers/gpu/drm/i915/i915_reg.h > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > @@ -2939,6 +2939,15 @@ enum skl_disp_power_wells { > > INTERVAL_1_33_US(us)) : \ > > INTERVAL_1_28_US(us)) > > > > +#define INTERVAL_1_28_TO_US(interval) (((interval) << 7) / 100) > > +#define INTERVAL_1_33_TO_US(interval) (((interval) << 2) / 3) > > +#define INTERVAL_0_833_TO_US(interval) (((interval) * 5) / 6) > > +#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN9(dev_priv) ? \ > > + (IS_BROXTON(dev_priv) ? \ > > + INTERVAL_0_833_TO_US(interval) : \ > > + INTERVAL_1_33_TO_US(interval)) : \ > > + INTERVAL_1_28_TO_US(interval)) > > Bikeshed, but I think once we have platform logic in there a real inline > functino starts to look better. Or when we have many, a feature flag. Could be worse, each could be expanding to devid. > > Feel free to ignore since already pushed. Yeah, since this was cut'n'paste for debugfs, I wasn't that concerned about elegance just that I could compare the macros and check that it was the inverse. -Chris
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 9464ba3..eacd9ae 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2939,6 +2939,15 @@ enum skl_disp_power_wells { INTERVAL_1_33_US(us)) : \ INTERVAL_1_28_US(us)) +#define INTERVAL_1_28_TO_US(interval) (((interval) << 7) / 100) +#define INTERVAL_1_33_TO_US(interval) (((interval) << 2) / 3) +#define INTERVAL_0_833_TO_US(interval) (((interval) * 5) / 6) +#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN9(dev_priv) ? \ + (IS_BROXTON(dev_priv) ? \ + INTERVAL_0_833_TO_US(interval) : \ + INTERVAL_1_33_TO_US(interval)) : \ + INTERVAL_1_28_TO_US(interval)) + /* * Logical Context regs */