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:
parent
c64fa9a296
commit
d4791dd97b
|
@ -956,16 +956,9 @@ static void
|
||||||
AdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
AdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
||||||
{
|
{
|
||||||
SCRN_INFO_PTR(arg);
|
SCRN_INFO_PTR(arg);
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
xf86OutputPtr output = config->output[config->compat_output];
|
|
||||||
xf86CrtcPtr crtc = output->crtc;
|
|
||||||
|
|
||||||
if (crtc && crtc->enabled) {
|
drmmode_adjust_frame(pScrn, &ms->drmmode, x, y);
|
||||||
crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x,
|
|
||||||
y);
|
|
||||||
crtc->x = output->initial_x + x;
|
|
||||||
crtc->y = output->initial_y + y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1267,7 +1267,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
|
||||||
return TRUE;
|
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);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
xf86OutputPtr output = config->output[config->compat_output];
|
xf86OutputPtr output = config->output[config->compat_output];
|
||||||
|
|
|
@ -118,7 +118,7 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
|
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_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
|
||||||
extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
|
extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue