modesetting: fix adjust frame crash

When SDL called this it was totally broken, actually hook
up to the underlying drmmode function.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64808

Thanks to Peter Wu <lekensteyn@gmail.com> for harassing me.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2013-06-11 10:29:25 +10:00
parent c64fa9a296
commit d4791dd97b
3 changed files with 4 additions and 11 deletions

View File

@ -956,16 +956,9 @@ static void
AdjustFrame(ADJUST_FRAME_ARGS_DECL)
{
SCRN_INFO_PTR(arg);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86OutputPtr output = config->output[config->compat_output];
xf86CrtcPtr crtc = output->crtc;
modesettingPtr ms = modesettingPTR(pScrn);
if (crtc && crtc->enabled) {
crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x,
y);
crtc->x = output->initial_x + x;
crtc->y = output->initial_y + y;
}
drmmode_adjust_frame(pScrn, &ms->drmmode, x, y);
}
static void

View File

@ -1267,7 +1267,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
return TRUE;
}
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags)
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86OutputPtr output = config->output[config->compat_output];

View File

@ -118,7 +118,7 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix,
#endif
extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags);
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y);
extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);