{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
modesettingPtr ms = modesettingPTR(pScrn);
+ CustomizerPtr cust = ms->cust;
ScreenPtr pScreen = pScrn->pScreen;
int old_width, old_height;
PixmapPtr rootPixmap;
if (width == pScrn->virtualX && height == pScrn->virtualY)
return TRUE;
+ if (cust && cust->winsys_check_fb_size &&
+ !cust->winsys_check_fb_size(cust, width*pScrn->bitsPerPixel / 8,
+ height)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Requested framebuffer size %dx%dx%d will not fit "
+ "in display memory.\n",
+ width, height, pScrn->bitsPerPixel);
+ return FALSE;
+ }
+
old_width = pScrn->virtualX;
old_height = pScrn->virtualY;
pScrn->virtualX = width;
static int
output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
{
+ modesettingPtr ms = modesettingPTR(output->scrn);
+ CustomizerPtr cust = ms->cust;
+
+ if (cust && cust->winsys_check_fb_size &&
+ !cust->winsys_check_fb_size(cust, pMode->HDisplay *
+ output->scrn->bitsPerPixel / 8,
+ pMode->VDisplay))
+ return MODE_BAD;
+
return MODE_OK;
}
void (*winsys_context_throttle)(struct _CustomizerRec *cust,
struct pipe_context *pipe,
enum xorg_throttling_reason reason);
+ Bool (*winsys_check_fb_size) (struct _CustomizerRec *cust,
+ unsigned long pitch,
+ unsigned long height);
} CustomizerRec, *CustomizerPtr;
typedef struct _modesettingRec