From patchwork Fri May 6 13:45:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilija Hadzic X-Patchwork-Id: 762272 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p46Dk00p002197 for ; Fri, 6 May 2011 13:46:20 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B47D29E8AF for ; Fri, 6 May 2011 06:45:59 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from ihemail3.lucent.com (ihemail3.lucent.com [135.245.0.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E0F49E75D for ; Fri, 6 May 2011 06:45:52 -0700 (PDT) Received: from usnavsmail4.ndc.alcatel-lucent.com (usnavsmail4.ndc.alcatel-lucent.com [135.3.39.12]) by ihemail3.lucent.com (8.13.8/IER-o) with ESMTP id p46Djhjs007273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 May 2011 08:45:43 -0500 (CDT) Received: from umail.lucent.com (umail-ce2.ndc.lucent.com [135.3.40.63]) by usnavsmail4.ndc.alcatel-lucent.com (8.14.3/8.14.3/GMO) with ESMTP id p46Djgbi009632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 6 May 2011 08:45:43 -0500 Received: from charon.research.bell-labs.com (charon.research.bell-labs.com [135.104.120.113]) by umail.lucent.com (8.13.8/TPES) with ESMTP id p46DjeRn012020; Fri, 6 May 2011 08:45:40 -0500 (CDT) From: Ilija Hadzic To: alexdeucher@gmail.com, michel@daenzer.net, dri-devel@lists.freedesktop.org, xorg-driver-ati@lists.x.org Subject: [PATCH] xf86-video-ati/DRI2: fix high-crtc/vblank oversight/bug introduced in f0b7d7b449cc77bb2b281d81108507f8bc2e6018 Date: Fri, 6 May 2011 09:45:23 -0400 Message-Id: <1304689523-2799-1-git-send-email-ihadzic@research.bell-labs.com> X-Mailer: git-send-email 1.7.4.1 X-Scanned-By: MIMEDefang 2.57 on 135.245.2.37 X-Scanned-By: MIMEDefang 2.64 on 135.3.39.12 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 13:46:20 +0000 (UTC) improvements to high-crtc handling done in f0b7d7b449cc77bb2b281d81108507f8bc2e6018 introduced a bug that caused the populate_vbl_request_type to never use the high-crtc field even when it should. The reason is that the offending patch put the code under #ifdef DRM_VBLANK_HIGH_CRTC_MASK which is not visible outside the enum type, so #else was always taken in compilation type. This patch fixes it by basing #ifdef on (pre-processor visible) DRM_VBLANK_HIGH_CRTC_SHIFT constant Signed-off-by: Ilija Hadzic --- src/radeon_dri2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index e618cc5..bbe1a94 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -778,7 +778,7 @@ static drmVBlankSeqType populate_vbl_request_type(RADEONInfoPtr info, int crtc) if (crtc == 1) type |= DRM_VBLANK_SECONDARY; else if (crtc > 1) -#ifdef DRM_VBLANK_HIGH_CRTC_MASK +#ifdef DRM_VBLANK_HIGH_CRTC_SHIFT type |= (crtc << DRM_VBLANK_HIGH_CRTC_SHIFT) & DRM_VBLANK_HIGH_CRTC_MASK; #else