diff options
author | Sean Paul <seanpaul@chromium.org> | 2015-02-04 09:29:15 -0800 |
---|---|---|
committer | Sean Paul <seanpaul@google.com> | 2015-02-04 14:46:27 -0800 |
commit | efb20cb773314e53a185d80454906243d7b9fb70 (patch) | |
tree | 08b778fead5da7d4f0e04a29ad87ed4ea8dc497a /hwcomposer.cpp | |
parent | eb9e75c1bf7f7118d4877103c17523a7efdffda5 (diff) | |
download | drm_hwcomposer-efb20cb773314e53a185d80454906243d7b9fb70.tar.gz |
drm_hwcomposer: Always perform a setcrtc initially
Always do a setcrtc on the first set(), this ensures things
are set up the way we expect them to be.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I4279d4de64339e72f0e7f9b315b2b9695704c78c
Diffstat (limited to 'hwcomposer.cpp')
-rw-r--r-- | hwcomposer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hwcomposer.cpp b/hwcomposer.cpp index dac7ed4..c06bd00 100644 --- a/hwcomposer.cpp +++ b/hwcomposer.cpp @@ -67,6 +67,7 @@ struct hwc_drm_display { int active_config; uint32_t active_crtc; int active_pipe; + bool initial_modeset_required; struct hwc_worker set_worker; @@ -200,6 +201,12 @@ static int hwc_modeset_required(struct hwc_drm_display *hd, drmModeCrtcPtr crtc; drmModeModeInfoPtr m; + if (hd->initial_modeset_required) { + *modeset_required = true; + hd->initial_modeset_required = false; + return 0; + } + crtc = drmModeGetCrtc(hd->ctx->fd, hd->active_crtc); if (!crtc) { ALOGE("Failed to get crtc for display %d", hd->display); @@ -1125,6 +1132,7 @@ static int hwc_initialize_display(struct hwc_context_t *ctx, int display, hd->display = display; hd->active_config = -1; hd->active_pipe = -1; + hd->initial_modeset_required = true; hd->connector_id = connector_id; ret = sw_sync_timeline_create(); |