Re: [Intel-gfx] [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
Quoting Chris Wilson (2018-01-22 19:13:01) > Quoting Rodrigo Vivi (2017-11-16 01:12:15) > > On Wed, Nov 15, 2017 at 10:50:35AM +, Chris Wilson wrote: > > > clang spots > > > > > > drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is > > > used uninitialized whenever 'if' condition is false > > > [-Wsometimes-uninitialized] > > > if (INTEL_GEN(dev_priv) >= 10) > > > > > > but fortunately for us we skip the function unless on a gen10+ device. > > > However, to keep the function generic in case we do want to re-enable it > > > for gen9 again, initialise trans_min to 0. > > > > Based on this comment: /* Transition WM are not recommended by HW team for > > GEN9 */ > > > > I believe the function should be called cnl_compute_transition_wm > > > > plus: > > > > - uint16_t trans_min, trans_y_tile_min; > > + u16 trans_min = 4, trans_y_tile_min; > > > > - if (INTEL_GEN(dev_priv) >= 10) > > - trans_min = 4; > > > > Also Wa for CNL A0 can be removed... We never put our hands in on A0... > > > > But in case you want to go with the quick fix: > > Reviewed-by: Rodrigo Vivi > > This code still hasn't been fixed. At this rate I'll merge this patch > just to suppress the compiler warning... But please fix the code! After 3 months, the code still is not fixed. So I gave in pushed the patch to silence the warning. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
Quoting Rodrigo Vivi (2017-11-16 01:12:15) > On Wed, Nov 15, 2017 at 10:50:35AM +, Chris Wilson wrote: > > clang spots > > > > drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is > > used uninitialized whenever 'if' condition is false > > [-Wsometimes-uninitialized] > > if (INTEL_GEN(dev_priv) >= 10) > > > > but fortunately for us we skip the function unless on a gen10+ device. > > However, to keep the function generic in case we do want to re-enable it > > for gen9 again, initialise trans_min to 0. > > Based on this comment: /* Transition WM are not recommended by HW team for > GEN9 */ > > I believe the function should be called cnl_compute_transition_wm > > plus: > > - uint16_t trans_min, trans_y_tile_min; > + u16 trans_min = 4, trans_y_tile_min; > > - if (INTEL_GEN(dev_priv) >= 10) > - trans_min = 4; > > Also Wa for CNL A0 can be removed... We never put our hands in on A0... > > But in case you want to go with the quick fix: > Reviewed-by: Rodrigo Vivi This code still hasn't been fixed. At this rate I'll merge this patch just to suppress the compiler warning... But please fix the code! > up to you. > > > > > References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition > > WM") > > Signed-off-by: Chris Wilson > > Cc: Mahesh Kumar > > Cc: Maarten Lankhorst > > Cc: Jani Nikula > > Cc: Joonas Lahtinen > > Cc: Rodrigo Vivi > > Cc: Ville Syrjälä > > --- > > drivers/gpu/drm/i915/intel_pm.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c > > b/drivers/gpu/drm/i915/intel_pm.c > > index 8c69ec9eb6ee..5d8babfaec30 100644 > > --- a/drivers/gpu/drm/i915/intel_pm.c > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > @@ -4649,6 +4649,7 @@ static void skl_compute_transition_wm(struct > > intel_crtc_state *cstate, > > if (!dev_priv->ipc_enabled) > > goto exit; > > > > + trans_min = 0; > > if (INTEL_GEN(dev_priv) >= 10) > > trans_min = 4; > > > > -- > > 2.15.0 > > > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
On Wed, Nov 15, 2017 at 10:50:35AM +, Chris Wilson wrote: > clang spots > > drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used > uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > if (INTEL_GEN(dev_priv) >= 10) > > but fortunately for us we skip the function unless on a gen10+ device. > However, to keep the function generic in case we do want to re-enable it > for gen9 again, initialise trans_min to 0. Based on this comment: /* Transition WM are not recommended by HW team for GEN9 */ I believe the function should be called cnl_compute_transition_wm plus: - uint16_t trans_min, trans_y_tile_min; + u16 trans_min = 4, trans_y_tile_min; - if (INTEL_GEN(dev_priv) >= 10) - trans_min = 4; Also Wa for CNL A0 can be removed... We never put our hands in on A0... But in case you want to go with the quick fix: Reviewed-by: Rodrigo Vivi up to you. > > References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition > WM") > Signed-off-by: Chris Wilson > Cc: Mahesh Kumar > Cc: Maarten Lankhorst > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: Ville Syrjälä > --- > drivers/gpu/drm/i915/intel_pm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 8c69ec9eb6ee..5d8babfaec30 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4649,6 +4649,7 @@ static void skl_compute_transition_wm(struct > intel_crtc_state *cstate, > if (!dev_priv->ipc_enabled) > goto exit; > > + trans_min = 0; > if (INTEL_GEN(dev_priv) >= 10) > trans_min = 4; > > -- > 2.15.0 > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
Quoting Chris Wilson (2017-11-15 10:50:35) > clang spots > > drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used > uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > if (INTEL_GEN(dev_priv) >= 10) > > but fortunately for us we skip the function unless on a gen10+ device. > However, to keep the function generic in case we do want to re-enable it > for gen9 again, initialise trans_min to 0. > > References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition > WM") > Signed-off-by: Chris Wilson > Cc: Mahesh Kumar > Cc: Maarten Lankhorst > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: Ville Syrjälä Forget this patch, the code is just wrong. But no fix sent yet! -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx