1
0
xorg-x11-server/xorg-server-commit-d1bb5e3.diff

42 lines
1.4 KiB
Diff

commit 1feb69eb63e6739ff5db255ad529e84adf941a10
Author: Luc Verhaegen <libv@skynet.be>
Date: Wed Oct 8 14:55:29 2008 +0200
DGA: Fix ProcXF86DGASetViewPort for missing support in driver.
Fixes a segfault when trying to activate a DGA mode without checking
whether DGA modesetting is at all possible.
diff --git a/hw/xfree86/dixmods/extmod/xf86dga.c b/hw/xfree86/dixmods/extmod/xf86dga.c
index 0736167..c66bca2 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga.c
@@ -93,7 +93,7 @@ ProcXF86DGADirectVideo(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
- if (!DGAAvailable(stuff->screen))
+ if (!DGAAvailable(stuff->screen))
return DGAErrorBase + XF86DGANoDirectVideoMode;
if (stuff->enable & XF86DGADirectGraphics) {
@@ -128,7 +128,7 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
- if (!DGAAvailable(stuff->screen))
+ if (!DGAAvailable(stuff->screen))
return (DGAErrorBase + XF86DGANoDirectVideoMode);
if(!(num = DGAGetOldDGAMode(stuff->screen)))
@@ -153,6 +153,9 @@ ProcXF86DGASetViewPort(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
+ if (!DGAAvailable(stuff->screen))
+ return (DGAErrorBase + XF86DGANoDirectVideoMode);
+
if (!DGAActive(stuff->screen))
{
int num;