[PATCH] DRI2: Fix handling of drmmode_crtc_get_ust_msc return code
Alex Deucher
alexdeucher at gmail.com
Mon Jun 1 07:33:36 PDT 2015
On Mon, Jun 1, 2015 at 3:28 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes regression introduced in commit
> 76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 ("DRI2: Split out helper for
> getting UST and MSC of a specific CRTC").
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/radeon_dri2.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
> index 6bb3dc6..a1f0145 100644
> --- a/src/radeon_dri2.c
> +++ b/src/radeon_dri2.c
> @@ -988,11 +988,11 @@ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
> if (radeon_crtc_is_enabled(crtc)) {
> /* CRTC is running, read vblank counter and timestamp */
> ret = drmmode_crtc_get_ust_msc(crtc, ust, msc);
> + if (ret != Success)
> + return FALSE;
>
> - if (ret != Success) {
> - *msc += radeon_get_interpolated_vblanks(crtc);
> - *msc &= 0xffffffff;
> - }
> + *msc += radeon_get_interpolated_vblanks(crtc);
> + *msc &= 0xffffffff;
> } else {
> /* CRTC is not running, extrapolate MSC and timestamp */
> drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
> --
> 2.1.4
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list