diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-14 15:11:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-14 15:12:27 +0000 |
commit | 699bde3991624c25d3b731caf7129ed87710b3b3 (patch) | |
tree | e2ac68676e4eaa8684fe66d5f056b26fc49cd3f6 | |
parent | 37dbd669415ac82a79b3699da0450aaf68cb1c4c (diff) |
sna: Guard use of DRM_MODE_OBJECT type ids
These are not currently exported on OpenBSD and cause the build to fail.
Hide their use behind an ifdef guard for the time being.
"I noticed the following when trying to compile xf86-video-intel git on OpenBSD:
/usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: 'DRM_MODE_OBJECT_CRTC' undeclared (first use in this function)
/usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: (Each undeclared identifier is reported only once
/usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2106: error: for each function it appears in.)
/usr/users/jsg/src/xf86-video-intel/src/sna/sna_display.c:2107: error: 'DRM_MODE_OBJECT_PLANE' undeclared (first use in this function)"
Reported-by: Jonathan Gray
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 15b27e40..e78f1f38 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2110,8 +2110,12 @@ sna_crtc_init__rotation(struct sna *sna, struct sna_crtc *sna_crtc) sna_crtc->primary_rotation.current = RR_Rotate_0; sna_crtc->sprite_rotation = sna_crtc->primary_rotation; +#ifdef DRM_MODE_OBJECT_CRTC rotation_init(sna, &sna_crtc->primary_rotation, sna_crtc->id, DRM_MODE_OBJECT_CRTC); +#endif +#ifdef DRM_MODE_OBJECT_PLANE rotation_init(sna, &sna_crtc->sprite_rotation, sna_crtc->sprite, DRM_MODE_OBJECT_PLANE); +#endif DBG(("%s: CRTC:%d [pipe=%d], primary: supported-rotations=%x, current-rotation=%x, sprite: supported-rotations=%x, current-rotation=%x\n", __FUNCTION__, sna_crtc->id, sna_crtc->pipe, |