From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH] drm/i915/vlv: DP_SINK_COUNT is not reliable for valleyview platform. Date: Fri, 13 Jun 2014 13:17:36 +0300 Message-ID: <87d2edxge7.fsf@intel.com> References: <1402642324-6260-1-git-send-email-quanxian.wang@intel.com> <20140613071629.GF5821@phenom.ffwll.local> <50C7F552BA2A744D84D95119645BEABD0EC3E8CE@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 5232F6E15F for ; Fri, 13 Jun 2014 03:17:40 -0700 (PDT) In-Reply-To: <50C7F552BA2A744D84D95119645BEABD0EC3E8CE@SHSMSX101.ccr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Wang, Quanxian" , Daniel Vetter Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Fri, 13 Jun 2014, "Wang, Quanxian" wrote: >> -----Original Message----- >> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel >> Vetter >> Sent: Friday, June 13, 2014 3:16 PM >> To: Wang, Quanxian >> Cc: intel-gfx@lists.freedesktop.org >> Subject: Re: [Intel-gfx] [PATCH] drm/i915/vlv: DP_SINK_COUNT is not >> reliable for valleyview platform. >> >> On Fri, Jun 13, 2014 at 02:52:04PM +0800, Quanxian Wang wrote: >> > DP connector will be disconnected after chvt to another console for 10 >> > minutes or more on valleyview platform VTC1010. >> >> This needs _much_ more detail, really. > [Wang, Quanxian] Sorry, I am not sure what detail should be provided. > The background is in tizen-ivi, when Weston is running on vt1, and chvt to vt2, after 10 or more minutes, Weston will exit. > After the investigation, I found in intel_dp_detect_dpcd function, it will use DP_SINK_COUNT to check if connector is connected or not. KMS think it is not connected and return connector_status_disconnected, this will disable the DP connector. Weston will not get any disconnector, it will exit. That is the root cause. So I think use DP_SINK_COUNT is not reliable to check connector is connected or not. Please see my other mail, and provide the info. BR, Jani. >> >> Also it smells like we work around a sink issue, which means the correct quirk >> is to use some sink id (like OUI), _not_ the platform. Since this way you break >> all DP1.1+ stuff on vlv and if someone puts this panel onto a different >> platform it still doesn't work. > [Wang, Quanxian] Yes, it is a special issue happens on valleyview platform VTC1010. I just have only one type of valleyview platform vtc1010 and not sure if others vlv platform has the same issue which has dp1.1. >> >> Or I completely don't understand this at all. >> >> Also, such a patch needs a full spec quote or a w/a citation or something solid >> if it's a more generic issue. > [Wang, Quanxian] I am checking the related registers. Thanks. >> -Daniel >> > >> > Signed-off-by: Quanxian Wang >> > --- >> > drivers/gpu/drm/i915/intel_dp.c | 4 +++- >> > 1 file changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git a/drivers/gpu/drm/i915/intel_dp.c >> > b/drivers/gpu/drm/i915/intel_dp.c index 2688f6d..0d127a5 100644 >> > --- a/drivers/gpu/drm/i915/intel_dp.c >> > +++ b/drivers/gpu/drm/i915/intel_dp.c >> > @@ -2942,6 +2942,7 @@ intel_dp_check_link_status(struct intel_dp >> > *intel_dp) static enum drm_connector_status >> > intel_dp_detect_dpcd(struct intel_dp *intel_dp) { >> > + struct drm_device *dev = intel_dp_to_dev(intel_dp); >> > uint8_t *dpcd = intel_dp->dpcd; >> > uint8_t type; >> > >> > @@ -2953,7 +2954,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp) >> > return connector_status_connected; >> > >> > /* If we're HPD-aware, SINK_COUNT changes dynamically */ >> > - if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 && >> > + if (!IS_VALLEYVIEW(dev) && >> > + intel_dp->dpcd[DP_DPCD_REV] >= 0x11 && >> > intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) { >> > uint8_t reg; >> > if (!intel_dp_aux_native_read_retry(intel_dp, >> DP_SINK_COUNT, >> > -- >> > 1.8.1.2 >> > >> > _______________________________________________ >> > Intel-gfx mailing list >> > Intel-gfx@lists.freedesktop.org >> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >> >> -- >> Daniel Vetter >> Software Engineer, Intel Corporation >> +41 (0) 79 365 57 48 - http://blog.ffwll.ch > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Jani Nikula, Intel Open Source Technology Center