compositor-drm: Handle more than two output crtcs per card
Allow proper handling of output->pipe > 1 to support triple-head graphics cards etc. by using the "high-crtc" support introduced in Linux 2.6.39 and libdrm 2.4.25 around May 2011. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
808170452b
commit
2ab4f4e384
@ -597,6 +597,17 @@ drm_output_set_gamma(struct weston_output *output_base,
|
||||
weston_log("set gamma failed: %m\n");
|
||||
}
|
||||
|
||||
static unsigned int drm_waitvblank_pipe(struct drm_output *output)
|
||||
{
|
||||
if (output->pipe > 1)
|
||||
return (output->pipe << DRM_VBLANK_HIGH_CRTC_SHIFT) &
|
||||
DRM_VBLANK_HIGH_CRTC_MASK;
|
||||
else if (output->pipe > 0)
|
||||
return DRM_VBLANK_SECONDARY;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
drm_output_repaint(struct weston_output *output_base,
|
||||
pixman_region32_t *damage)
|
||||
@ -668,8 +679,7 @@ drm_output_repaint(struct weston_output *output_base,
|
||||
weston_log("setplane failed: %d: %s\n",
|
||||
ret, strerror(errno));
|
||||
|
||||
if (output->pipe > 0)
|
||||
vbl.request.type |= DRM_VBLANK_SECONDARY;
|
||||
vbl.request.type |= drm_waitvblank_pipe(output);
|
||||
|
||||
/*
|
||||
* Queue a vblank signal so we know when the surface
|
||||
|
Loading…
x
Reference in New Issue
Block a user