Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2429023pxb; Tue, 23 Feb 2021 06:57:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuvopg0AMlX0G4dTklwTCkAcMNA/MjOle3Z2JY8egVMZhVvkXVMj75oxCTh8JDOKmhC1iV X-Received: by 2002:a17:906:d0c3:: with SMTP id bq3mr25913427ejb.424.1614092241659; Tue, 23 Feb 2021 06:57:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614092241; cv=none; d=google.com; s=arc-20160816; b=M0lf6BtQ5RJRzu0w0JNIK/Fm7HyUPQt4FvecUQC8aNZfrwFuHQX7vTGdahhkXfn2wT T5tDIggberWwP7OrLsygpo2F2fCaHqglaiahJFJouRdz4/3eqEwa/QoLGn5TUjFQiOr5 XY6lW+e9STPKm69WD7O/3SIUtcb45mAimqXDUSi/9CB8AleGoM9Ygfvyo71Ynfojsqz1 5xIZ9wW9lAoslZDg9m7YTBlZmau1VSEnq8TH5AgnOGAc7Z51zb0IwscsZv6VHgpioYJb iEdmahj7038bFmnfP8I9MyOwu5fOoT/tjVlRwEeWcCyfML/I2GYYaDkNN/i+cLuYreaE ahAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=nc2Okh4Zh+NmMeSOnnRyL8GHDG8seoWJLaDbGnTg5XQ=; b=jcrqRXUJ7X4Y9VqHzInxNJzldYwTbUJnVtEwmbRV2nsDZccnr/KWj7xQ/av/TAWaWQ 29/6HTkLpT12JlWfNr56IILycUN2rvWZJsxHys24AQ03bOFcf+DwfQbZndv2QyK8ksqR k5Tn+2DLYhhbEqXee72jMrgYcy7Io+j52pVDzCR00P+8L8KofKIW2jDv6FkdRUHhzz4h HXuTOeaxbPoCNGO1Vx8DCP50+RsxtgxD/ckw1BdZRMgjaw5Tyn3ACWi8qddlWTeR0bYo cgef8LqYKhul0M28zI+ADFhFuf7arUTPBoyemmtiOvYdU1CkL+YsE2szYLhDgYuuxrCJ sU0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si14456748edv.313.2021.02.23.06.56.57; Tue, 23 Feb 2021 06:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233142AbhBWOuk (ORCPT + 99 others); Tue, 23 Feb 2021 09:50:40 -0500 Received: from mga03.intel.com ([134.134.136.65]:50657 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbhBWOuS (ORCPT ); Tue, 23 Feb 2021 09:50:18 -0500 IronPort-SDR: EkP+RMlsr45mqaE7RJGNp5UCIQjXxQBzVE5oKH6883c4sXj9bcbTwINmOwmu5wDQZk2c69byfc VPj+dOXoD+Kw== X-IronPort-AV: E=McAfee;i="6000,8403,9903"; a="184873783" X-IronPort-AV: E=Sophos;i="5.81,200,1610438400"; d="scan'208";a="184873783" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 06:49:35 -0800 IronPort-SDR: ysBhO+VHCeZJheQHhE4IO3P+32Wfl9YrV97tKizhglxPl9r9CEeixC5hOWBGMS4LHFNyjgigSR 6uVLWCIPvmNQ== X-IronPort-AV: E=Sophos;i="5.81,200,1610438400"; d="scan'208";a="423650236" Received: from mmgoodso-mobl3.amr.corp.intel.com (HELO intel.com) ([10.212.211.76]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 06:49:30 -0800 Date: Tue, 23 Feb 2021 09:49:29 -0500 From: Rodrigo Vivi To: Lyude Paul Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Jani Nikula , Thomas Zimmermann , David Airlie , Oleg Vasilev , Tanmay Shah , Laurent Pinchart , Lee Jones , Chandan Uddaraju , Emil Velikov , Michal Simek , Luben Tuikov , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Maxime Ripard , Stephen Boyd , Kuogee Hsieh , "moderated list:ARM/ZYNQ ARCHITECTURE" , Hyun Kwon , open list , Alex Deucher , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [Intel-gfx] [PATCH 19/30] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() Message-ID: References: <20210219215326.2227596-1-lyude@redhat.com> <20210219215326.2227596-20-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219215326.2227596-20-lyude@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2021 at 04:53:15PM -0500, Lyude Paul wrote: > So that we can start using drm_dbg_*() in > drm_dp_link_train_clock_recovery_delay(). > > Signed-off-by: Lyude Paul I wonder if we could have a drm_dp so we encapsulate both aux and dpcd related information... But this one already solves the issue... Reviewed-by: Rodrigo Vivi > --- > drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- > drivers/gpu/drm/drm_dp_helper.c | 3 ++- > drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +- > drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- > drivers/gpu/drm/msm/edp/edp_ctrl.c | 2 +- > drivers/gpu/drm/radeon/atombios_dp.c | 2 +- > drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- > include/drm/drm_dp_helper.h | 4 +++- > 8 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c > index 6d35da65e09f..4468f9d6b4dd 100644 > --- a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c > +++ b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c > @@ -611,7 +611,7 @@ amdgpu_atombios_dp_link_train_cr(struct amdgpu_atombios_dp_link_train_info *dp_i > dp_info->tries = 0; > voltage = 0xff; > while (1) { > - drm_dp_link_train_clock_recovery_delay(dp_info->dpcd); > + drm_dp_link_train_clock_recovery_delay(dp_info->aux, dp_info->dpcd); > > if (drm_dp_dpcd_read_link_status(dp_info->aux, > dp_info->link_status) <= 0) { > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > index 194e0c273809..ce08eb3bface 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -132,7 +132,8 @@ u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZ > } > EXPORT_SYMBOL(drm_dp_get_adjust_request_post_cursor); > > -void drm_dp_link_train_clock_recovery_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) > +void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux, > + const u8 dpcd[DP_RECEIVER_CAP_SIZE]) > { > unsigned long rd_interval = dpcd[DP_TRAINING_AUX_RD_INTERVAL] & > DP_TRAINING_AUX_RD_MASK; > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > index 892d7db7d94f..222073d46bdb 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > @@ -441,7 +441,7 @@ static void intel_dp_link_training_clock_recovery_delay(struct intel_dp *intel_d > enum drm_dp_phy dp_phy) > { > if (dp_phy == DP_PHY_DPRX) > - drm_dp_link_train_clock_recovery_delay(intel_dp->dpcd); > + drm_dp_link_train_clock_recovery_delay(&intel_dp->aux, intel_dp->dpcd); > else > drm_dp_lttpr_link_train_clock_recovery_delay(); > } > diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c > index 36b39c381b3f..2501a6b326a3 100644 > --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c > +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c > @@ -1103,7 +1103,7 @@ static int dp_ctrl_link_train_1(struct dp_ctrl_private *ctrl, > tries = 0; > old_v_level = ctrl->link->phy_params.v_level; > for (tries = 0; tries < maximum_retries; tries++) { > - drm_dp_link_train_clock_recovery_delay(ctrl->panel->dpcd); > + drm_dp_link_train_clock_recovery_delay(ctrl->aux, ctrl->panel->dpcd); > > ret = dp_ctrl_read_link_status(ctrl, link_status); > if (ret) > diff --git a/drivers/gpu/drm/msm/edp/edp_ctrl.c b/drivers/gpu/drm/msm/edp/edp_ctrl.c > index 57af3d8b6699..6501598448b4 100644 > --- a/drivers/gpu/drm/msm/edp/edp_ctrl.c > +++ b/drivers/gpu/drm/msm/edp/edp_ctrl.c > @@ -608,7 +608,7 @@ static int edp_start_link_train_1(struct edp_ctrl *ctrl) > tries = 0; > old_v_level = ctrl->v_level; > while (1) { > - drm_dp_link_train_clock_recovery_delay(ctrl->dpcd); > + drm_dp_link_train_clock_recovery_delay(ctrl->drm_aux, ctrl->dpcd); > > rlen = drm_dp_dpcd_read_link_status(ctrl->drm_aux, link_status); > if (rlen < DP_LINK_STATUS_SIZE) { > diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c > index c50c504bad50..299b9d8da376 100644 > --- a/drivers/gpu/drm/radeon/atombios_dp.c > +++ b/drivers/gpu/drm/radeon/atombios_dp.c > @@ -680,7 +680,7 @@ static int radeon_dp_link_train_cr(struct radeon_dp_link_train_info *dp_info) > dp_info->tries = 0; > voltage = 0xff; > while (1) { > - drm_dp_link_train_clock_recovery_delay(dp_info->dpcd); > + drm_dp_link_train_clock_recovery_delay(dp_info->aux, dp_info->dpcd); > > if (drm_dp_dpcd_read_link_status(dp_info->aux, > dp_info->link_status) <= 0) { > diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c > index 8272eee03adc..5cc295d8ba9f 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c > @@ -713,7 +713,7 @@ static int zynqmp_dp_link_train_cr(struct zynqmp_dp *dp) > if (ret) > return ret; > > - drm_dp_link_train_clock_recovery_delay(dp->dpcd); > + drm_dp_link_train_clock_recovery_delay(&dp->aux, dp->dpcd); > ret = drm_dp_dpcd_read_link_status(&dp->aux, link_status); > if (ret < 0) > return ret; > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h > index 45ec74862212..e4681665231e 100644 > --- a/include/drm/drm_dp_helper.h > +++ b/include/drm/drm_dp_helper.h > @@ -29,6 +29,7 @@ > #include > > struct drm_device; > +struct drm_dp_aux; > > /* > * Unless otherwise noted, all values are from the DP 1.1a spec. Note that > @@ -1475,7 +1476,8 @@ u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZ > #define DP_LTTPR_COMMON_CAP_SIZE 8 > #define DP_LTTPR_PHY_CAP_SIZE 3 > > -void drm_dp_link_train_clock_recovery_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE]); > +void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux, > + const u8 dpcd[DP_RECEIVER_CAP_SIZE]); > void drm_dp_lttpr_link_train_clock_recovery_delay(void); > void drm_dp_link_train_channel_eq_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE]); > void drm_dp_lttpr_link_train_channel_eq_delay(const u8 caps[DP_LTTPR_PHY_CAP_SIZE]); > -- > 2.29.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx