Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0042CCF9FE for ; Fri, 31 Oct 2025 10:48:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A15DD10EB5C; Fri, 31 Oct 2025 10:48:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GQ7vtwjn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 294E410EB5D; Fri, 31 Oct 2025 10:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761907679; x=1793443679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sOZVSG3oUD5Z47U1EJHIVzMwk21dEGjI2X6jUQbBKQE=; b=GQ7vtwjnLghS57yzmYD+k8hiiqGjJx78FlKmY9C/n8nhUV+xUIq0dn+r 3+Ltp2PlVAgAOU39z5oy5fKZaSodgO885yToblsntRpUtiZlBCENW9ZHd 7ne43cbFWbgz+E6Fcr0AQx3BMoKcGv33iPB7pnCmm04QdJGg1GEkVQjxU ZrQsnS6l2t0MHpxUAVbVBFB2NNahQ/1oyIt9G3cROMDPEbNml7x5ieenK wEksavdYsgb7hrgh9Csc67mB5IBi2nBvCznRy9kMTb/qbq2ZYmx0dhqSx UbgNsmlYNnGl+pI/MN4+eoP4u7FxJeYBNQDjq5EcDUGk/NCG/ezTx1eXy w==; X-CSE-ConnectionGUID: k5TWAS/lSCi+8Z7gyhw4Yw== X-CSE-MsgGUID: DSfdnKDJS7uAa+LPxO9KGg== X-IronPort-AV: E=McAfee;i="6800,10657,11598"; a="64217565" X-IronPort-AV: E=Sophos;i="6.19,269,1754982000"; d="scan'208";a="64217565" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 03:47:59 -0700 X-CSE-ConnectionGUID: 5vQiVr6IS8m6LEh62Noyxw== X-CSE-MsgGUID: lZFzW8kqRr+jsUWHnxsUTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,269,1754982000"; d="scan'208";a="223441366" Received: from display-adls.igk.intel.com ([10.211.131.198]) by orviesa001.jf.intel.com with ESMTP; 31 Oct 2025 03:47:58 -0700 From: Mika Kahola To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: Imre Deak , Mika Kahola Subject: [CI 13/32] drm/i915/display: Zero Cx0 PLL state before compute and HW readout Date: Fri, 31 Oct 2025 12:35:30 +0200 Message-Id: <20251031103549.173208-14-mika.kahola@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251031103549.173208-1-mika.kahola@intel.com> References: <20251031103549.173208-1-mika.kahola@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" From: Imre Deak 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 Signed-off-by: Mika Kahola --- 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