> Subject: [CI 13/32] drm/i915/display: Zero Cx0 PLL state before compute and
> HW readout
> 
> From: Imre Deak <[email protected]>
> 
> Ensure Cx0 pll state is initialized to zero before any computation or HW
> readouts, to prevent leaving some parameter in the state uninitialized in the
> actual compute/HW readout functions later.
> 
> Signed-off-by: Imre Deak <[email protected]>
> Signed-off-by: Mika Kahola <[email protected]>

LGTM,
Reviewed-by: Suraj Kandpal <[email protected]>

> ---
>  drivers/gpu/drm/i915/display/intel_cx0_phy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> index 29bcfe8fb6f5..3418fc560faf 100644
> --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> @@ -2698,6 +2698,8 @@ static int intel_c20pll_calc_state(struct
> intel_crtc_state *crtc_state,  int intel_cx0pll_calc_state(struct 
> intel_crtc_state
> *crtc_state,
>                           struct intel_encoder *encoder)
>  {
> +     memset(&crtc_state->dpll_hw_state, 0,
> +sizeof(crtc_state->dpll_hw_state));
> +
>       if (intel_encoder_is_c10phy(encoder))
>               return intel_c10pll_calc_state(crtc_state, encoder);
>       return intel_c20pll_calc_state(crtc_state, encoder); @@ -3635,7
> +3637,7 @@ static void intel_c10pll_state_verify(const struct intel_crtc_state
> *state,  void intel_cx0pll_readout_hw_state(struct intel_encoder *encoder,
>                                  struct intel_cx0pll_state *pll_state)  {
> -     pll_state->use_c10 = false;
> +     memset(pll_state, 0, sizeof(*pll_state));
> 
>       pll_state->tbt_mode =
> intel_tc_port_in_tbt_alt_mode(enc_to_dig_port(encoder));
>       if (pll_state->tbt_mode)
> --
> 2.34.1

Reply via email to