• Lyude Paul's avatar
    drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx · 1c26b8e0
    Lyude Paul authored
    This is just an atomic version of mode_valid, which is intended to be
    used for situations where a driver might need to check the atomic state
    of objects other than the connector itself. One such example is with
    MST, where the maximum possible bandwidth on a connector can change
    dynamically irregardless of the display configuration.
    
    Changes since v1:
    * Use new drm logging functions
    * Make some corrections in the mode_valid_ctx kdoc
    * Return error codes or 0 from ->mode_valid_ctx() on fail, and store the
      drm_mode_status in an additional function parameter
    Changes since v2:
    * Don't accidentally assign ret to mode->status on success, or we'll
      squash legitimate mode validation results
    * Don't forget to assign MODE_OK to status in drm_connector_mode_valid()
      if we have no callbacks
    * Drop leftover hunk in drm_modes.h around enum drm_mode_status
    Changes since v3:
    * s/return ret/return 0/ in drm_mode_validate_pipeline()
    * Minor cleanup in drm_connector_mode_valid()
    Tested-by: default avatarImre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
    Cc: Lee Shawn C <shawn.c.lee@intel.com>
    Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200713170746.254388-2-lyude@redhat.com
    1c26b8e0
drm_modeset_helper_vtables.h 55.4 KB