Do not set 'has_resized' in drmmode_xf86crtc_resize()
The field "has_resized" is used to determine when to trigger a switch
to blit mode during OMAPDRI2ScheduleSwap() (and to implement the swap as
a blit).
In truth, the only time we need to transition from flip to blit is when the
per-CRTC scanouts themselves have been resized or moved, not when the
root framebuffer has resized.
Therefore, rather confusingly, has_resized need not be set during
drmmode_xf86crtc_resize() - it only must be set when one of the per-CRTC
scanouts has changed, as is done in drmmode_update_scanouts().
This saves an unnecessary switch from flip->blit mode when an external
monitor is disconnected. In such a case, the framebuffer is shrunk, but
the internal CRTC is neither resized nor moved, so no transition to blit
mode is necessary to process the first post-resize flip to the internal
CRTC.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:35116
TEST=On veyron_pinky, daisy, peach_pi:
login / logout
suspend / resume
plug / unplug HDMI
Change-Id: Id575d7f9d327c492434dded40ebfe745b0b39163
Reviewed-on: https://chromium-review.googlesource.com/239031
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Trybot-Ready: Daniel Kurtz <djkurtz@chromium.org>
1 file changed