We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit 8affaade authored by Kenneth Graunke's avatar Kenneth Graunke Committed by Keith Packard

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's avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Tested-by: Jason Ekstrand's avatarJason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent b51f804b
......@@ -193,18 +193,8 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
static void
drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
#if 0
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
// 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);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_crtc->dpms_mode = mode;
#if 0
......@@ -347,6 +337,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
if (crtc->scrn->pScreen)
crtc->funcs->dpms(crtc, DPMSModeOn);
/* go through all the outputs and force DPMS them back on? */
for (i = 0; i < xf86_config->num_output; i++) {
xf86OutputPtr output = xf86_config->output[i];
......@@ -86,6 +86,7 @@ typedef struct {
drmmode_ptr drmmode;
drmModeCrtcPtr mode_crtc;
uint32_t vblank_pipe;
int dpms_mode;
struct dumb_bo *cursor_bo;
Bool cursor_up;
unsigned rotate_fb_id;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment