From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP Date: Mon, 23 Sep 2013 09:29:49 +0200 Message-ID: <20130923072949.GY32145@phenom.ffwll.local> References: <2841535a1c9a9822f989e8e1674225f5a2fecf34.1379684248.git.jani.nikula@intel.com> <523CB502.7070304@gmail.com> <523CCCCE.4000703@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by gabe.freedesktop.org (Postfix) with ESMTP id C8BB1E7049 for ; Mon, 23 Sep 2013 00:29:33 -0700 (PDT) Received: by mail-ea0-f179.google.com with SMTP id b10so1493444eae.38 for ; Mon, 23 Sep 2013 00:29:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <523CCCCE.4000703@gmail.com> 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: Todd Previte Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Fri, Sep 20, 2013 at 03:31:42PM -0700, Todd Previte wrote: > 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 Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch