summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-10-28 08:42:40 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2023-02-01 20:07:58 +0200
commitb74b67f0f321875492968f7097b9d6e82a66d7df (patch)
tree8f371ccc8c3bcdbed59f67a881294c32f339e3d0
parent1b69012e85bfc1dcc0b4fd32054def9451a3ea4f (diff)
sna: Shut up enum warnsHEADmaster
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>
-rw-r--r--src/sna/sna_present.c6
1 files 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);