From owner-svn-src-all@freebsd.org Tue May 10 18:18:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAD44B36B69; Tue, 10 May 2016 18:18:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CB1D13AD; Tue, 10 May 2016 18:18:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4AIITKo019939; Tue, 10 May 2016 18:18:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4AIITDW019938; Tue, 10 May 2016 18:18:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201605101818.u4AIITDW019938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 May 2016 18:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299381 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 18:18:30 -0000 Author: hselasky Date: Tue May 10 18:18:29 2016 New Revision: 299381 URL: https://svnweb.freebsd.org/changeset/base/299381 Log: Ensure waiting loops terminate during cold boot. This fixes boot with MacBookPro and i915kms_load="YES" in /boot/loader.conf. A lowlevel timeout in one of the display ports caused an infinite wait because a ticks/jiffies comparison was constant. The clock subsystem which makes ticks/jiffies increment is started after the initial driver probing is done. Refer to sys/kernel.h and SI_SUB_DRIVERS vs SI_SUB_CLOCKS . Discussed with: kmacy @ Modified: head/sys/dev/drm2/i915/intel_drv.h Modified: head/sys/dev/drm2/i915/intel_drv.h ============================================================================== --- head/sys/dev/drm2/i915/intel_drv.h Tue May 10 18:00:37 2016 (r299380) +++ head/sys/dev/drm2/i915/intel_drv.h Tue May 10 18:18:29 2016 (r299381) @@ -50,6 +50,8 @@ pause((WMSG), 1); \ else \ DELAY(1000); \ + if (cold) \ + end -= howmany(hz, 1000); \ } \ \ ret; \ @@ -68,6 +70,8 @@ } else { \ DELAY(1000); \ } \ + if (cold) \ + timeout__ -= howmany(hz, 1000); \ } \ ret__; \ })