Message ID | 20170130104458.2653-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On ma, 2017-01-30 at 10:44 +0000, Chris Wilson wrote: > As we add new generations, we should keep detecting new pre-production > system development platforms that were temporarily enabled to facilitate > initial development and now superseded by production systems. To make > it easier to add more platforms, split the if into a series of logical > operations. > > v2: s/sdv/pre/ - not all system development vehicles are for > preproduction usage. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> <SNIP> > static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) > { > - if (IS_HSW_EARLY_SDV(dev_priv) || > - IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0)) > + bool pre = false; > + > + pre |= IS_HSW_EARLY_SDV(dev_priv); > + pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0); Did you compare the asm with "pre = pre || ..."? Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas
On Mon, 30 Jan 2017, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > On ma, 2017-01-30 at 10:44 +0000, Chris Wilson wrote: >> As we add new generations, we should keep detecting new pre-production >> system development platforms that were temporarily enabled to facilitate >> initial development and now superseded by production systems. To make >> it easier to add more platforms, split the if into a series of logical >> operations. >> >> v2: s/sdv/pre/ - not all system development vehicles are for >> preproduction usage. >> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> >> Cc: Jani Nikula <jani.nikula@intel.com> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > <SNIP> > >> static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) >> { >> - if (IS_HSW_EARLY_SDV(dev_priv) || >> - IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0)) >> + bool pre = false; >> + >> + pre |= IS_HSW_EARLY_SDV(dev_priv); >> + pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0); > > Did you compare the asm with "pre = pre || ..."? Yeah, this definitely needs to be optimized. :p Acked-by: Jani Nikula <jani.nikula@intel.com> on the series. > > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > > Regards, Joonas
On Mon, Jan 30, 2017 at 03:11:07PM +0200, Jani Nikula wrote: > On Mon, 30 Jan 2017, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > > On ma, 2017-01-30 at 10:44 +0000, Chris Wilson wrote: > >> As we add new generations, we should keep detecting new pre-production > >> system development platforms that were temporarily enabled to facilitate > >> initial development and now superseded by production systems. To make > >> it easier to add more platforms, split the if into a series of logical > >> operations. > >> > >> v2: s/sdv/pre/ - not all system development vehicles are for > >> preproduction usage. > >> > >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >> Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com> > >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > >> Cc: Jani Nikula <jani.nikula@intel.com> > >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > <SNIP> > > > >> static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) > >> { > >> - if (IS_HSW_EARLY_SDV(dev_priv) || > >> - IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0)) > >> + bool pre = false; > >> + > >> + pre |= IS_HSW_EARLY_SDV(dev_priv); > >> + pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0); > > > > Did you compare the asm with "pre = pre || ..."? > > Yeah, this definitely needs to be optimized. :p Thank goodness it makes no difference! -Chris
On Mon, Jan 30, 2017 at 05:54:14PM -0000, Patchwork wrote: > == Series Details == > > Series: series starting with [v2,1/3] drm/i915: Make intel_detect_preproduction_hw easier to extend > URL : https://patchwork.freedesktop.org/series/18758/ > State : success > > == Summary == > > Series 18758v1 Series without cover letter > https://patchwork.freedesktop.org/api/1.0/series/18758/revisions/1/mbox/ > > > fi-bdw-5557u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 > fi-bsw-n3050 total:246 pass:207 dwarn:0 dfail:0 fail:0 skip:39 > fi-bxt-j4205 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 > fi-bxt-t5700 total:78 pass:65 dwarn:0 dfail:0 fail:0 skip:12 > fi-byt-j1900 total:246 pass:219 dwarn:0 dfail:0 fail:0 skip:27 > fi-byt-n2820 total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31 > fi-hsw-4770 total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19 > fi-hsw-4770r total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19 > fi-ivb-3520m total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21 > fi-ivb-3770 total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21 > fi-skl-6260u total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13 > fi-skl-6700hq total:246 pass:226 dwarn:0 dfail:0 fail:0 skip:20 > fi-skl-6700k total:246 pass:221 dwarn:4 dfail:0 fail:0 skip:21 > fi-skl-6770hq total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13 > fi-snb-2520m total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31 > fi-snb-2600 total:246 pass:214 dwarn:0 dfail:0 fail:0 skip:32 Applied in spite of some late background noise about bxt-a0 support, a bit late now. -Chris
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 008fc1e62a69..b55ad5199967 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -782,8 +782,12 @@ static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv) */ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) { - if (IS_HSW_EARLY_SDV(dev_priv) || - IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0)) + bool pre = false; + + pre |= IS_HSW_EARLY_SDV(dev_priv); + pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0); + + if (pre) DRM_ERROR("This is a pre-production stepping. " "It may not be fully functional.\n"); }
As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations. v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/i915/i915_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)