diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-06-07 07:48:15 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-10 11:25:30 -0400 |
commit | c2a441fe8f7f62571e47ce3f4fa3d97edd092dd9 (patch) | |
tree | 5fe2fbb1fa7d627b1d2cff0271e6f70859f86d9e | |
parent | 8438a73d762ff4955f877b03623cccfedff44c50 (diff) |
drm/bridge: dw-hdmi: Use drm_atomic_helper_best_encoder()
We have a 1:1 relationship between connectors and encoders, which means
we can rely on the drm_atomic_helper_best_encoder() behavior.
We still have to explicitly assign ->best_encoder() to
drm_atomic_helper_best_encoder(), because the automated fallback to
drm_atomic_helper_best_encoder() when ->best_encoder() is NULL is only
available when the DRM device is using the atomic helpers, and this bridge
is compatible with non-atomic and atomic devices.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-21-git-send-email-boris.brezillon@free-electrons.com
-rw-r--r-- | drivers/gpu/drm/bridge/dw-hdmi.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index c9d941283d30..70b1f7d4270b 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c | |||
@@ -1476,15 +1476,6 @@ dw_hdmi_connector_mode_valid(struct drm_connector *connector, | |||
1476 | return mode_status; | 1476 | return mode_status; |
1477 | } | 1477 | } |
1478 | 1478 | ||
1479 | static struct drm_encoder *dw_hdmi_connector_best_encoder(struct drm_connector | ||
1480 | *connector) | ||
1481 | { | ||
1482 | struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, | ||
1483 | connector); | ||
1484 | |||
1485 | return hdmi->encoder; | ||
1486 | } | ||
1487 | |||
1488 | static void dw_hdmi_connector_destroy(struct drm_connector *connector) | 1479 | static void dw_hdmi_connector_destroy(struct drm_connector *connector) |
1489 | { | 1480 | { |
1490 | drm_connector_unregister(connector); | 1481 | drm_connector_unregister(connector); |
@@ -1525,7 +1516,7 @@ static const struct drm_connector_funcs dw_hdmi_atomic_connector_funcs = { | |||
1525 | static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { | 1516 | static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { |
1526 | .get_modes = dw_hdmi_connector_get_modes, | 1517 | .get_modes = dw_hdmi_connector_get_modes, |
1527 | .mode_valid = dw_hdmi_connector_mode_valid, | 1518 | .mode_valid = dw_hdmi_connector_mode_valid, |
1528 | .best_encoder = dw_hdmi_connector_best_encoder, | 1519 | .best_encoder = drm_atomic_helper_best_encoder, |
1529 | }; | 1520 | }; |
1530 | 1521 | ||
1531 | static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { | 1522 | static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { |