[PATCH] xf86-video-ati/DRI2: fix high-crtc/vblank oversight/bug introduced in f0b7d7b449cc77bb2b281d81108507f8bc2e6018

Michel Dänzer michel at daenzer.net
Fri May 6 07:11:49 PDT 2011


On Fre, 2011-05-06 at 09:45 -0400, Ilija Hadzic wrote: 
> 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 <ihadzic at research.bell-labs.com>
> ---
>  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

Pushed, thanks and sorry for the oversight.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-driver-ati mailing list