> -----Original Message----- > From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Nischal > Varide > Sent: Friday, August 14, 2020 8:20 AM > To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Varide, Nischal <nischal.varide@xxxxxxxxx> > Subject: [PATCH 1/8] Critical KlockWork Error - Fixes - intel_cdclk.c - > Possible NullPointerDereference1 Add some commit description explaining the clockwork warning. Also append all display patches (in display folder) with "drm/i915/display :" in the commit headers. For generic path have "drm/i915:" as prefix. Please check the format used in patches already merged to tree. > --- > drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c > b/drivers/gpu/drm/i915/display/intel_cdclk.c > index 9d6cacbdb691..1cd0ab5b36d2 100644 > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c > @@ -1926,7 +1926,11 @@ intel_set_cdclk_pre_plane_update(struct > intel_atomic_state *state) > intel_atomic_get_old_cdclk_state(state); > const struct intel_cdclk_state *new_cdclk_state = > intel_atomic_get_new_cdclk_state(state); > - enum pipe pipe = new_cdclk_state->pipe; > + enum pipe pipe; > + > + if (!(old_cdclk_state && new_cdclk_state)) > + return > + (void)(pipe = new_cdclk_state->pipe); Is this typecast really needed ? > > if (!intel_cdclk_changed(&old_cdclk_state->actual, > &new_cdclk_state->actual)) > @@ -1955,7 +1959,13 @@ intel_set_cdclk_post_plane_update(struct > intel_atomic_state *state) > intel_atomic_get_old_cdclk_state(state); > const struct intel_cdclk_state *new_cdclk_state = > intel_atomic_get_new_cdclk_state(state); > - enum pipe pipe = new_cdclk_state->pipe; > + enum pipe pipe; > + > + if (!(old_cdclk_state && new_cdclk_state)) > + return > + (void)(pipe = new_cdclk_state->pipe); Same here. > + > + > > if (!intel_cdclk_changed(&old_cdclk_state->actual, > &new_cdclk_state->actual)) > @@ -2484,6 +2494,9 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state > *state) > > old_cdclk_state = intel_atomic_get_old_cdclk_state(state); > > + if (!(old_cdclk_state && new_cdclk_state)) > + return > + > new_cdclk_state->active_pipes = > intel_calc_active_pipes(state, old_cdclk_state->active_pipes); > > -- > 2.26.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx