1. 29 Sep, 2018 3 commits
    • Hans de Goede's avatar
      staging: vboxvideo: Temporarily remove page_flip support · 2fab6e75
      Hans de Goede authored
      drm_mode_page_flip_ioctl() cannot deal with the in between phase of
      the transitioning to atomic modeset support. Once we start using
      drm_helper_crtc_mode_set(), we start setting plane->state on the primary
      plane. But we are not fully atomic yet so then set both plane-state->fb
      and plane->fb.
      
      If both plane-state->fb and plane->fb are set drm_mode_page_flip_ioctl()
      gets confused and stops calling drm_framebuffer_get() on the new fb while
      still calling drm_framebuffer_put() on the old fb.
      
      The current page_flip implementation expects drm_mode_page_flip_ioctl()
      to take care of both and once we switch to drm_atomic_helper_page_flip()
      that will expect neither to be done, taking care of both itself.
      
      So for the transition we need to remove page_flip support and then after
      the transition is complete and we set DRIVER_ATOMIC in our driver_features,
      we can start using drm_atomic_helper_page_flip().
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fab6e75
    • Hans de Goede's avatar
      staging: vboxvideo: Remove empty encoder_helper_funcs · 880f7282
      Hans de Goede authored
      All the encoder_helper_funcs are optional, and even setting the
      drm_encoder_helper_funcs vtable itself is optional and may be left out
      when not using any of the helper funcs, so lets drop all of this.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      880f7282
    • Hans de Goede's avatar
      staging: vboxvideo: Cleanup vbox_set_up_input_mapping() · 8568209b
      Hans de Goede authored
      This cleanups 2 things:
      
      1) The first time we loop over the crtc-s, to compare framebuffers, fb1 may
      get set to NULL by the fb1 = CRTC_FB(crtci); statement and then we call
      to_vbox_framebuffer() on it. The result of this call is only used for
      an address comparison, so we don't end up dereferencing the bad pointer,
      but still it is better to not do this.
      
      2) Since we already figure out the first crtc with a fb in the first loop
      and store that in fb1, there is no need to loop over the crtc-s again just
      to find the first crtc with a fb again.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8568209b
  2. 28 Sep, 2018 37 commits