From: Dave Airlie Subject: [PATCH] uxa: fix getmsc to not fail hard Date: Wed, 21 May 2014 12:41:58 +1000 Message-ID: <1400640118-32478-1-git-send-email-airlied@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E1BD6E2FA for ; Tue, 20 May 2014 19:42:00 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4L2g0Xh019770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 20 May 2014 22:42:00 -0400 Received: from dreadlord-bne-redhat-com.bne.redhat.com (dhcp-40-7.bne.redhat.com [10.64.40.7]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4L2fwRh019386 for ; Tue, 20 May 2014 22:41:59 -0400 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Dave Airlie If some outputs go away we race with this call and apps get X errors and fall over. Do what SNA does and don't bother trying. Signed-off-by: Dave Airlie --- src/uxa/intel_dri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index 0370034..5d1262a 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -1351,6 +1351,7 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc) /* Drawable not displayed, make up a *monotonic* value */ if (pipe == -1) { +fail: *ust = gettime_us(); *msc = 0; return TRUE; @@ -1369,7 +1370,7 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc) strerror(errno)); limit--; } - return FALSE; + goto fail; } *ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec; -- 1.9.0