KMS-based HWComposer implementation.

  • Neil Armstrong's avatar
    drm_hwcomposer: pre-filter modes provided to HWC2 · b67d049c
    Neil Armstrong authored
    Currently LocalDisplayAdapter in AOSP filters out similar modes based
    on their currently limited supported attributes: width/height/refresh.
    
    This leads to a situation where important modes are discarded, like the
    preferred mode and/or the active mode, leading SurfaceFlinger to select
    an unwanted and potentially invalid  mode in the list provided by
    drm-hwcomposer to HWC2.
    
    Let's pre-filter the modes provided to HWC2 by :
    - systematically adding the preferred mode
    - systematically adding the current active mode, if different
      from preferred mode
    - keeping the interlaced modes filtering-out if no other non-interlace
      modes with same widthXheight exists (for HD-Ready 1080i TVs or CVBS)
    - discarding modes if a similar mode with same widthXheight@refresh was
      already selected for HWC2
    
    This mimics the behavior of LocalDisplayAdapter filtering algorithm,
    but keeps the important modes from the DRM Point Of View and drops the
    duplicate modes while keeping the mode ordering from DRM in account.
    
    This local filtering should ultimately go out when HWC2 can actually
    handle mode Attributes to describe Preferred mode, Interlaced, 3D...
    and LocalDisplayAdapter uses these Attributes for filtering duplicate
    modes.
    Signed-off-by: Neil Armstrong's avatarNeil Armstrong <narmstrong@baylibre.com>
    Tested-by: John Stultz's avatarJohn Stultz <john.stultz@linaro.org>
    b67d049c
Name
Last commit
Last update
compositor Loading commit data...
drm Loading commit data...
include Loading commit data...
platform Loading commit data...
tests Loading commit data...
utils Loading commit data...
.clang-format Loading commit data...
.gitlab-ci-checkcommit.sh Loading commit data...
.gitlab-ci.yml Loading commit data...
Android.bp Loading commit data...
MODULE_LICENSE_APACHE2 Loading commit data...
NOTICE Loading commit data...
README.md Loading commit data...
drmhwctwo.cpp Loading commit data...