From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Ensure that while(INREG()) are bounded. Date: Fri, 06 Aug 2010 22:39:48 +0100 Message-ID: <89kc63$hm7jul@fmsmga002.fm.intel.com> References: <1281107514-3876-1-git-send-email-chris@chris-wilson.co.uk> <87lj8jmo4m.fsf@pollan.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id D3D7C9E9AE for ; Fri, 6 Aug 2010 14:39:59 -0700 (PDT) In-Reply-To: <87lj8jmo4m.fsf@pollan.anholt.net> 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: Eric Anholt , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 06 Aug 2010 14:23:37 -0700, Eric Anholt wrote: > On Fri, 6 Aug 2010 16:11:54 +0100, Chris Wilson wrote: > > Add a new macro, wait_for, to simplify the act of waiting on a register > > to change state. wait_for() takes three arguments, the condition to > > inspect on every loop, the maximum amount of time to wait and whether to > > yield the cpu for a length of time after each check. > > These failures seem DRM_ERROR()-worthy. What do you think? But I do > like the looks of this patch. Yes, I made them DRM_ERROR, noticed that surrounding code didn't seem to treat them as errors and made them debug instead. The ultimate goal I have in mind here is to return the error code and fail gracefully. Lofty ideals. In the meantime, it persistently report: [drm:ironlake_crtc_dpms] *ERROR* failed to turn off cpu pipe which is worrying (and indeed the reason why Adam first added the timeout). -- Chris Wilson, Intel Open Source Technology Centre