• dbehr@chromium.org's avatar
    disable crtcs bigger than new screen size during mode switch · 2b573a57
    dbehr@chromium.org authored
    When switching modes, we disable CRTCs that do not fit on current freamebuffer,
    change framebuffer size, then enable required CRTCs in the right locations.
    This fails in a switch from extended desktop to mirror mode, e.g. from
    1366x768+1920x1080 to 1024x768 mirrored. Both CRTCs fit into current framebuffer
    but they are smaller than the framebuffer we are about to resize to (1024x768)
    so XRRSetScreenSize(1024,768) call fails because it cannot shrink framebuffer
    size below size of currently enabled CRTCs. The solution is to disable CRTCs
    that are bigger than minimum of current and new framebuffer.
    
    BUG=chromium:366280
    TEST=switch between mirror and extended desktop on Link or Squawks. Screen size\
    (in DISPLAY=:0.0 xrandr --verbose) should shrink when switching to mirror mode.
    R=djkurtz@chromium.org
    R=oshima@chromium.org
    Signed-off-by: default avatarDominik Behr <dbehr@chromium.org>
    
    Review URL: https://codereview.chromium.org/253513002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266095 0039d316-1c4b-4281-b951-d872f2087c98
    2b573a57
native_display_delegate_x11.h 5.78 KB