提交 a39438f0 编写于 作者: H Harry Wentland 提交者: Alex Deucher

drm/amd/display: Debug print when validate_stream fails

It might be good to understand why validate fails.
Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 25292028
...@@ -2801,6 +2801,7 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector, ...@@ -2801,6 +2801,7 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
/* TODO: Unhardcode stream count */ /* TODO: Unhardcode stream count */
struct dc_stream_state *stream; struct dc_stream_state *stream;
struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector); struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
enum dc_status dc_result = DC_OK;
if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || if ((mode->flags & DRM_MODE_FLAG_INTERLACE) ||
(mode->flags & DRM_MODE_FLAG_DBLSCAN)) (mode->flags & DRM_MODE_FLAG_DBLSCAN))
...@@ -2833,8 +2834,15 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector, ...@@ -2833,8 +2834,15 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
stream->src.height = mode->vdisplay; stream->src.height = mode->vdisplay;
stream->dst = stream->src; stream->dst = stream->src;
if (dc_validate_stream(adev->dm.dc, stream) == DC_OK) dc_result = dc_validate_stream(adev->dm.dc, stream);
if (dc_result == DC_OK)
result = MODE_OK; result = MODE_OK;
else
DRM_DEBUG_KMS("Mode %dx%d (clk %d) failed DC validation\n",
mode->vdisplay,
mode->hdisplay,
mode->clock);
dc_stream_release(stream); dc_stream_release(stream);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册