[Openchrome-devel] xf86-video-openchrome: src/via_driver.c
James Simmons
jsimmons at kemper.freedesktop.org
Sun Jul 14 08:14:10 PDT 2013
src/via_driver.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
New commits:
commit c41db44466d9fc856fab1c4207483230deda6031
Author: James Simmons <jsimmons at infradead.org>
Date: Sun Jul 14 11:14:00 2013 -0400
With hotplug an output is enabled but its not attached to a crtc by default. When the display is issued a resize now when we encounter a disabled crtc a unbound ouput is then attached to it.
diff --git a/src/via_driver.c b/src/via_driver.c
index 0f24ebe..b1b6e16 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -807,7 +807,7 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
struct buffer_object *old_front = NULL, *new_front = NULL;
- int cpp = (scrn->bitsPerPixel + 7) >> 3, fd, i;
+ int cpp = (scrn->bitsPerPixel + 7) >> 3, fd, i, j;
int old_width, old_height, old_dwidth, format;
ScreenPtr screen = scrn->pScreen;
VIAPtr pVia = VIAPTR(scrn);
@@ -859,8 +859,18 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
drmmode_crtc_private_ptr drmmode_crtc;
drmmode_ptr drmmode;
- if (!xf86CrtcInUse(crtc) || !crtc->driver_private)
- continue;
+ if (!xf86CrtcInUse(crtc)) {
+ for (j = 0; j < xf86_config->num_output; j++) {
+ xf86OutputPtr output = xf86_config->output[j];
+
+ if (!output->crtc) {
+ output->crtc = crtc;
+ ret = TRUE;
+ }
+ }
+ if (!ret)
+ continue;
+ }
drmmode_crtc = crtc->driver_private;
drmmode = drmmode_crtc->drmmode;
More information about the Openchrome-devel
mailing list