Skip to content
  • Daniele Castagna's avatar
    drm/rockchip: Fix YUV buffers color rendering · 24e3ff30
    Daniele Castagna authored and Ezequiel Garcia's avatar Ezequiel Garcia committed
    
    
    Currently, YUV hardware overlays are converted to RGB using
    a color space conversion different than BT.601.
    
    The result is that colors of e.g. NV12 buffers don't match
    colors of YUV hardware overlays.
    
    In order to fix this, enable YUV2YUV and set appropriate coefficients
    for formats such as NV12 to be displayed correctly.
    
    This commit was tested using modetest, gstreamer and chromeos (hardware
    accelerated video playback). Before the commit, tests rendering
    with NV12 format resulted in colors not displayed correctly.
    
    Test examples (RK3399 Ficus board connected to HDMI monitor):
    
      $ modetest 39@32:1920x1080@NV12
      $ gst-launch-1.0 videotestrc ! video/x-raw,format=NV12 ! kmssink
    
    Signed-off-by: default avatarDaniele Castagna <dcastagna@chromium.org>
    [ezequiel: rebase on linux-next and massage commit log]
    Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
    24e3ff30