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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user