modesetting: Track the CRTC's DPMS mode.
We don't want to try to vblank synchronize to monitors which are off. In order to handle that properly, we need to know the CRTC's DPMS mode. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
b51f804b1c
commit
8affaade2c
|
@ -193,18 +193,8 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
|
||||||
static void
|
static void
|
||||||
drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
|
drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
|
||||||
{
|
{
|
||||||
#if 0
|
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
|
drmmode_crtc->dpms_mode = mode;
|
||||||
|
|
||||||
// drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
|
||||||
// drmmode_ptr drmmode = drmmode_crtc->drmmode;
|
|
||||||
|
|
||||||
/* bonghits in the randr 1.2 - uses dpms to disable crtc - bad buzz */
|
|
||||||
if (mode == DPMSModeOff) {
|
|
||||||
// drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
|
||||||
// 0, 0, 0, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -347,6 +337,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
|
||||||
|
|
||||||
if (crtc->scrn->pScreen)
|
if (crtc->scrn->pScreen)
|
||||||
xf86CrtcSetScreenSubpixelOrder(crtc->scrn->pScreen);
|
xf86CrtcSetScreenSubpixelOrder(crtc->scrn->pScreen);
|
||||||
|
|
||||||
|
crtc->funcs->dpms(crtc, DPMSModeOn);
|
||||||
|
|
||||||
/* go through all the outputs and force DPMS them back on? */
|
/* go through all the outputs and force DPMS them back on? */
|
||||||
for (i = 0; i < xf86_config->num_output; i++) {
|
for (i = 0; i < xf86_config->num_output; i++) {
|
||||||
xf86OutputPtr output = xf86_config->output[i];
|
xf86OutputPtr output = xf86_config->output[i];
|
||||||
|
|
|
@ -86,6 +86,7 @@ typedef struct {
|
||||||
drmmode_ptr drmmode;
|
drmmode_ptr drmmode;
|
||||||
drmModeCrtcPtr mode_crtc;
|
drmModeCrtcPtr mode_crtc;
|
||||||
uint32_t vblank_pipe;
|
uint32_t vblank_pipe;
|
||||||
|
int dpms_mode;
|
||||||
struct dumb_bo *cursor_bo;
|
struct dumb_bo *cursor_bo;
|
||||||
Bool cursor_up;
|
Bool cursor_up;
|
||||||
unsigned rotate_fb_id;
|
unsigned rotate_fb_id;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user