disp: msm: dp: update the definition of atomic_check function

Update the definition of the atomic_check function for
DisplayPort connectors to align with the DRM upstream changes.

Change-Id: Id942c8ef16ae773540c4bc7221e0b784354a527c
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Tatenda Chipeperekwa
2020-01-20 14:38:41 -08:00
parent 3b1a8807fd
commit cf71a83fba
2 changed files with 12 additions and 8 deletions

View File

@@ -498,18 +498,20 @@ void dp_connector_post_open(struct drm_connector *connector, void *display)
int dp_connector_atomic_check(struct drm_connector *connector, int dp_connector_atomic_check(struct drm_connector *connector,
void *display, void *display,
struct drm_connector_state *c_state) struct drm_atomic_state *a_state)
{ {
struct sde_connector *sde_conn; struct sde_connector *sde_conn;
struct drm_connector_state *old_state; struct drm_connector_state *old_state;
struct drm_connector_state *c_state;
if (!connector || !display) if (!connector || !display || a_state)
return -EINVAL; return -EINVAL;
c_state = drm_atomic_get_new_connector_state(a_state, connector);
old_state = old_state =
drm_atomic_get_old_connector_state(c_state->state, connector); drm_atomic_get_old_connector_state(a_state, connector);
if (!old_state) if (!old_state || !c_state)
return -EINVAL; return -EINVAL;
sde_conn = to_sde_connector(connector); sde_conn = to_sde_connector(connector);

View File

@@ -1390,11 +1390,11 @@ static struct dp_mst_bridge *_dp_mst_get_bridge_from_encoder(
} }
static int dp_mst_connector_atomic_check(struct drm_connector *connector, static int dp_mst_connector_atomic_check(struct drm_connector *connector,
void *display, struct drm_connector_state *new_conn_state) void *display, struct drm_atomic_state *state)
{ {
int rc = 0, slots, i; int rc = 0, slots, i;
struct drm_atomic_state *state;
struct drm_connector_state *old_conn_state; struct drm_connector_state *old_conn_state;
struct drm_connector_state *new_conn_state;
struct drm_crtc *old_crtc; struct drm_crtc *old_crtc;
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
struct dp_mst_bridge *bridge = NULL; struct dp_mst_bridge *bridge = NULL;
@@ -1412,13 +1412,15 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
if (mst->state == PM_SUSPEND) if (mst->state == PM_SUSPEND)
return rc; return rc;
if (!state)
return rc;
new_conn_state = drm_atomic_get_new_connector_state(state, connector);
if (!new_conn_state) if (!new_conn_state)
return rc; return rc;
mutex_lock(&mst->mst_lock); mutex_lock(&mst->mst_lock);
state = new_conn_state->state;
old_conn_state = drm_atomic_get_old_connector_state(state, connector); old_conn_state = drm_atomic_get_old_connector_state(state, connector);
if (!old_conn_state) if (!old_conn_state)
goto mode_set; goto mode_set;