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 36AF2C3DA49 for ; Tue, 23 Jul 2024 11:59:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FF5810E57B; Tue, 23 Jul 2024 11:59:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Ng0eUYJU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9BDF310E57B for ; Tue, 23 Jul 2024 11:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721735968; x=1753271968; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=LFcEIrWYHzbxcWdHAkD+mr3geod0L+LKVAowBYzK6uM=; b=Ng0eUYJUwIl5dAT0OG89hwJ6FUrzyn7y0ENRb/GNbiYIZjGB2Uu92Kmn CQACiCtPakTD1Ap/+5/G3AkyfhOxZbKQ8+Ur1NWfJjgro0EBSvtX+j0la RrgfWfQGSeyXnzc6uWWwoJ2wi2kfExIjDqIPu6rdq2cXlvAh0IxHpKiFl Yn4ohvfYXW1rnn2KcGNtZtJ14M/CuIUTmGw3hjhqj7ULX40pxJm0UJg7s I7rj2mqtuCgVU+j8lLn5QJdxgjHSFK900jN6LsNfIku4FPNCE9+hb5iAu W9Oo5HeAt1FlX1nRofaZ/p7fQfI8Yp+BlR3/UheQqZ0pWI3K9FxFSbjno A==; X-CSE-ConnectionGUID: Leh4F/atRmqMmkP+PctSpw== X-CSE-MsgGUID: KFOjhnAWTcyotdQTBWMJFA== X-IronPort-AV: E=McAfee;i="6700,10204,11141"; a="23117283" X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208";a="23117283" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2024 04:59:28 -0700 X-CSE-ConnectionGUID: 9H4aC9DWRoCw9Bvjup5K5A== X-CSE-MsgGUID: gURdvd+2RSasX2TlkN5JKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208";a="52956881" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2024 04:59:26 -0700 Date: Tue, 23 Jul 2024 14:59:41 +0300 From: Imre Deak To: "Kandpal, Suraj" Cc: "intel-gfx@lists.freedesktop.org" Subject: Re: [PATCH 05/14] drm/i915/dp: Initialize the link parameters during HW readout Message-ID: References: <20240722165503.2084999-1-imre.deak@intel.com> <20240722165503.2084999-6-imre.deak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: imre.deak@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, Jul 23, 2024 at 11:34:58AM +0300, Kandpal, Suraj wrote: > > > > -----Original Message----- > > From: Intel-gfx On Behalf Of Imre > > Deak > > Sent: Monday, July 22, 2024 10:25 PM > > To: intel-gfx@lists.freedesktop.org > > Subject: [PATCH 05/14] drm/i915/dp: Initialize the link parameters during > > HW readout > > > > Initialize the DP link parameters during HW readout. These need to be up- > > to-date at least for the MST topology probing, which depends on the link > > rate and lane count programmed in DPCD. A follow-up patch will program > > the DPCD values to reflect the maximum link parameters before the first > > MST topology probing, but should do so only if the link is disabled > > (link_trained==false). > > > > Signed-off-by: Imre Deak > > --- > > drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > > b/drivers/gpu/drm/i915/display/intel_dp.c > > index 1e43e32e05199..421e970b3c180 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > @@ -3352,8 +3352,11 @@ void intel_dp_sync_state(struct intel_encoder > > *encoder, > > > > intel_dp_tunnel_resume(intel_dp, crtc_state, dpcd_updated); > > > > - if (crtc_state) > > + if (crtc_state) { > > intel_dp_reset_link_params(intel_dp); > > + intel_dp_set_link_params(intel_dp, crtc_state->port_clock, > > crtc_state->lane_count); > > + intel_dp->link_trained = true; > > Why are we setting link_trained as true here. link_trained indicates whether the output is enabled or not, which must be in sync with crtc_state being NULL (output disabled) or not NULL (output enabled). > Regards, > Suraj Kandpal > > + } > > } > > > > bool intel_dp_initial_fastset_check(struct intel_encoder *encoder, > > -- > > 2.44.2 >