From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: Power saving using Display port HPD Date: Thu, 10 Apr 2014 10:22:05 +0300 Message-ID: <87ioqhy7he.fsf@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 090ED6EC13 for ; Thu, 10 Apr 2014 00:22:35 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Arun Chandran , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 10 Apr 2014, Arun Chandran wrote: > I have connected only a DP monitor on Bayley Bay platform and booting > ubuntu 13.10 with the kernel > http://cgit.freedesktop.org/drm-intel/log/?h=drm-intel-fixes. Most of the time it's probably better to try either Linus' master or drm-intel-nightly for latest stuff. Anything in drm-intel-fixes is always included in -nightly, and merged to Linus' master with fairly short intervals. > I am experimenting with the HPD feature of display port with debug > messages enabled. (drm.debug=0xe). > > When I plug in/out DP cable I am able to see the below kernel messages > and ubuntu desktop is displayed on the DP monitor > > ############################## > > > root@arun-valley-view:~# uname -a > Linux arun-valley-view 3.14.0-00528-g67e9d82 #34 SMP PREEMPT Wed Apr 9 > 18:48:30 IST 2014 i686 i686 i686 GNU/Linux > > root@arun-valley-view:~# dmesg -c > > [ 1028.506188] [drm:intel_hpd_irq_handler] hotplug event received, > stat 0x00100000 > [ 1028.506217] [drm:intel_hpd_irq_handler] Received HPD interrupt on > PIN 5 - cnt: 0 > [ 1028.513858] [drm:i915_hotplug_work_func] running encoder hotplug functions > [ 1028.513880] [drm:i915_hotplug_work_func] Connector eDP-1 (pin 5) > received hotplug event. > [ 1028.513896] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 5) > received hotplug event. > [ 1028.513913] [drm:_edp_panel_vdd_on] Turning eDP VDD on > [ 1028.513931] [drm:_edp_panel_vdd_on] PP_STATUS: 0x80000008 > PP_CONTROL: 0xabcd000f > [ 1028.515064] [drm:intel_dp_get_dpcd] DPCD: 11 0a 84 01 01 00 01 80 > 02 00 00 00 00 00 00 > [ 1028.516563] [drm:intel_dp_check_link_status] TMDS-22: channel EQ > not ok, retraining > [ 1028.530884] [drm:intel_dp_set_signal_levels] Using signal levels 00000000 > [ 1028.546113] [drm:intel_dp_set_signal_levels] Using signal levels 00000000 > [ 1028.547233] [drm:intel_dp_start_link_train] clock recovery OK > [ 1028.548711] [drm:intel_dp_complete_link_train] Channel EQ done. DP > Training successful > [ 1028.549264] [drm:intel_dp_detect] [CONNECTOR:23:eDP-1] > [ 1028.549761] [drm:intel_dp_probe_oui] Sink OUI: 00e04c > [ 1028.550262] [drm:intel_dp_probe_oui] Branch OUI: 000000 > [ 1028.550343] [drm:intel_hdmi_detect] [CONNECTOR:21:HDMI-A-2] > [ 1028.550595] [drm:gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0050 r(1) > [ 1028.550611] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent > adapter i915 gmbus dpc > > ################################## > > After booting I am executing the below steps > > 1) unplug DP cable. > > 2) Mask the pin 18 (HPD) of DP cable using a paper strip then connect it > back > I have checked the dmesg output and the there is no messages related to > HPD. So kernel is > unaware that I have connected a DP monitor > > But still I see ubuntu desktop coming on the DP monitor. This means kernel > does not stop pumping display data after step 1. > > Is this the right behavior? . When kernel knows that the last existing > display is removed (via the HPD feature) it can save power by stopping the > data output to DP monitor (or shutting down the DP hardware related part.) > > Does anybody knows how to use the HPD feature to save power? Or anybody has > done this before? First things first, let's confirm what's actually happening. Do a fresh boot, and do your steps above. Annotate the dmesg with 'echo "step N" > /dev/kmsg' as root between steps, or split the dmesg at each step. Make sure your final dmesg(s) cover unplugging, plugging, re-plugging. I suspect the DP output does get switched off, and your re-plugging with HDP masked goes wrong, actually triggering another hotplug. But let's confirm that with the dmesgs. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center