diff options
author | James Morris <james.morris@microsoft.com> | 2018-05-01 11:02:34 -0700 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2018-05-01 11:02:34 -0700 |
commit | b3859ee18ed287170b66b19a78191f7312ec3470 (patch) | |
tree | c52550132fdf6802b159531498bde8dcfbd26180 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
parent | b393a707c84bb56a7800c93849fd8b492f76ba42 (diff) | |
parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
download | talos-op-linux-b3859ee18ed287170b66b19a78191f7312ec3470.tar.gz talos-op-linux-b3859ee18ed287170b66b19a78191f7312ec3470.zip |
Merge tag 'v4.17-rc3' into next-general
Merge to Linux v4.17-rc3 which has stability bugfix.
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4e2f379ce217..1dd1142246c2 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4557,6 +4557,7 @@ static int dm_update_crtcs_state(struct dc *dc, struct amdgpu_dm_connector *aconnector = NULL; struct drm_connector_state *new_con_state = NULL; struct dm_connector_state *dm_conn_state = NULL; + struct drm_plane_state *new_plane_state = NULL; new_stream = NULL; @@ -4564,6 +4565,13 @@ static int dm_update_crtcs_state(struct dc *dc, dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); acrtc = to_amdgpu_crtc(crtc); + new_plane_state = drm_atomic_get_new_plane_state(state, new_crtc_state->crtc->primary); + + if (new_crtc_state->enable && new_plane_state && !new_plane_state->fb) { + ret = -EINVAL; + goto fail; + } + aconnector = amdgpu_dm_find_first_crtc_matching_connector(state, crtc); /* TODO This hack should go away */ @@ -4760,7 +4768,7 @@ static int dm_update_planes_state(struct dc *dc, if (!dm_old_crtc_state->stream) continue; - DRM_DEBUG_DRIVER("Disabling DRM plane: %d on DRM crtc %d\n", + DRM_DEBUG_ATOMIC("Disabling DRM plane: %d on DRM crtc %d\n", plane->base.id, old_plane_crtc->base.id); if (!dc_remove_plane_from_context( |