From b74b67f0f321875492968f7097b9d6e82a66d7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> Date: Fri, 28 Oct 2022 08:42:40 +0300 Subject: [PATCH 7/7] sna: Shut up enum warns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The libdrm enum usage is a mess, and modern gcc is unhappy about the implicit conversions: ../src/sna/sna_present.c:229:26: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum drm_vblank_seq_type’ [-Wenum-conversion] Just cast to an integer type to silence the warns. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- src/sna/sna_present.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c index b86dc97e..96be088a 100644 --- a/src/sna/sna_present.c +++ b/src/sna/sna_present.c @@ -226,7 +226,7 @@ static CARD32 sna_fake_vblank_handler(OsTimerPtr timer, CARD32 now, void *data) assert(info->queued); VG_CLEAR(vbl); - vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.type = (uint32_t)DRM_VBLANK_RELATIVE; vbl.request.sequence = 0; if (sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc)) == 0) { ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec); @@ -261,7 +261,7 @@ static CARD32 sna_fake_vblank_handler(OsTimerPtr timer, CARD32 now, void *data) * Less than a millisecond for (hopefully) a rare case. */ DBG(("%s: blocking wait!\n", __FUNCTION__)); - vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.type = (uint32_t)DRM_VBLANK_ABSOLUTE; vbl.request.sequence = info->target_msc; if (sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc)) == 0) { ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec); @@ -430,7 +430,7 @@ sna_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc) } VG_CLEAR(vbl); - vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.type = (uint32_t)DRM_VBLANK_RELATIVE; vbl.request.sequence = 0; if (sna_wait_vblank(sna, &vbl, sna_crtc_pipe(crtc->devPrivate)) == 0) { *ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec); -- 2.40.1