drm/fb-helper: Eliminate the .best_encoder() usage
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 28 Jun 2018 13:13:07 +0000 (16:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 5 Jul 2018 13:52:07 +0000 (16:52 +0300)
commit0d99889109892396a8164bf6dd178e36d3fe3166
treeb40c0d143556d1fcb33013e8504374280d742579
parentc91b007ed137c8497fa89993cc6757a8e81ff99b
drm/fb-helper: Eliminate the .best_encoder() usage

Instead of using the .best_encoder() hook to figure out whether a given
connector+crtc combo will work, let's instead do what userspace does and
just iterate over all the encoders for the connector, and then check
each crtc against each encoder's possible_crtcs bitmask.

v2: Avoid oopsing on NULL encoders (Daniel)
    s/connector_crtc_ok/connector_has_possible_crtc/

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180628131315.14156-2-ville.syrjala@linux.intel.com
drivers/gpu/drm/drm_fb_helper.c