From mboxrd@z Thu Jan 1 00:00:00 1970 From: Todd Previte Subject: Re: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP Date: Fri, 20 Sep 2013 15:31:42 -0700 Message-ID: <523CCCCE.4000703@gmail.com> References: <2841535a1c9a9822f989e8e1674225f5a2fecf34.1379684248.git.jani.nikula@intel.com> <523CB502.7070304@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 00CE3E61EE for ; Fri, 20 Sep 2013 15:31:45 -0700 (PDT) Received: by mail-pd0-f169.google.com with SMTP id r10so921546pdi.28 for ; Fri, 20 Sep 2013 15:31:45 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On 09/20/2013 01:57 PM, Paulo Zanoni wrote: > 2013/9/20 Todd Previte : >> On 09/20/2013 06:42 AM, Jani Nikula wrote: >>> Reduce AUX transactions for non-eDP. >>> >>> Signed-off-by: Jani Nikula >>> --- >>> drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- >>> 1 file changed, 8 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/i915/intel_dp.c >>> b/drivers/gpu/drm/i915/intel_dp.c >>> index dd780bf..f2e16a1 100644 >>> --- a/drivers/gpu/drm/i915/intel_dp.c >>> +++ b/drivers/gpu/drm/i915/intel_dp.c >>> @@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) >>> /* Check if the panel supports PSR */ >>> memset(intel_dp->psr_dpcd, 0, sizeof(intel_dp->psr_dpcd)); >>> - intel_dp_aux_native_read_retry(intel_dp, DP_PSR_SUPPORT, >>> - intel_dp->psr_dpcd, >>> - sizeof(intel_dp->psr_dpcd)); >>> - if (is_edp_psr(intel_dp)) >>> - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); >>> + if (is_edp(intel_dp)) { >>> + intel_dp_aux_native_read_retry(intel_dp, DP_PSR_SUPPORT, >>> + intel_dp->psr_dpcd, >>> + >>> sizeof(intel_dp->psr_dpcd)); >>> + if (is_edp_psr(intel_dp)) >>> + DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); >>> + } >>> + >>> if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & >>> DP_DWN_STRM_PORT_PRESENT)) >>> return true; /* native DP sink */ >> >> Couldn't you just use is_edp_psr() at the top and not need the second >> is_edp() inside the if() statement? As in: > No, because is_edp_psr() only makes sense after we do the DPCD read > that checks the PSR bit. Yep, I see that now. And thus... [Reviewed-by]: Todd Previte > >> + if (is_edp_psr(intel_dp)) { >> >> + intel_dp_aux_native_read_retry(intel_dp, DP_PSR_SUPPORT, >> + intel_dp->psr_dpcd, >> + sizeof(intel_dp->psr_dpcd)); >> + DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); >> + } >> >> >> -T >> >> >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx > >