disp: msm: obtain bridge from bridge chain
Commit 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") creates a bridge chain linked list. This change updates the relevant changes to msm driver to use the list to find the bridge associated to the encoder. Change-Id: I59eb2910be96f4fff7bdbeb040d6ad204c41d747 Signed-off-by: Samantha Tran <samtran@codeaurora.org> Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
@@ -5218,6 +5218,7 @@ int sde_encoder_update_caps_for_cont_splash(struct drm_encoder *encoder,
|
||||
struct sde_connector_state *sde_conn_state = NULL;
|
||||
struct drm_display_mode *drm_mode = NULL;
|
||||
struct sde_encoder_phys *phys_enc;
|
||||
struct drm_bridge *bridge;
|
||||
int ret = 0, i;
|
||||
|
||||
if (!encoder) {
|
||||
@@ -5318,7 +5319,8 @@ int sde_encoder_update_caps_for_cont_splash(struct drm_encoder *encoder,
|
||||
drm_mode->hdisplay, drm_mode->vdisplay);
|
||||
drm_set_preferred_mode(conn, drm_mode->hdisplay, drm_mode->vdisplay);
|
||||
|
||||
if (encoder->bridge) {
|
||||
bridge = drm_bridge_chain_get_first_bridge(encoder);
|
||||
if (bridge) {
|
||||
SDE_DEBUG_ENC(sde_enc, "Bridge mapped to encoder\n");
|
||||
/*
|
||||
* For cont-splash use case, we update the mode
|
||||
@@ -5328,11 +5330,7 @@ int sde_encoder_update_caps_for_cont_splash(struct drm_encoder *encoder,
|
||||
* be updated with the current drm mode by
|
||||
* calling the bridge mode set ops.
|
||||
*/
|
||||
if (encoder->bridge->funcs) {
|
||||
SDE_DEBUG_ENC(sde_enc, "calling mode_set\n");
|
||||
encoder->bridge->funcs->mode_set(encoder->bridge,
|
||||
drm_mode, drm_mode);
|
||||
}
|
||||
drm_bridge_chain_mode_set(bridge, drm_mode, drm_mode);
|
||||
} else {
|
||||
SDE_ERROR_ENC(sde_enc, "No bridge attached to encoder\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user