diff options
author | Leo (Sunpeng) Li <sunpeng.li@amd.com> | 2017-11-01 10:24:51 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-02 13:06:26 -0400 |
commit | 4a74635ce23a4b8758047a733faf791e38032263 (patch) | |
tree | fb8dc36954d9db0f40735f7418a11e17e304846f | |
parent | b7fa8519057319aef8405923dc8fa6782fce969f (diff) |
drm/amd/display: Read resource_straps from registers for DCE12
Now that the registers exist, assign them to the resource_straps struct.
v2: Fix indentation
v3: Fix trailing whitespace and checkpatch warnings.
bug: https://bugs.freedesktop.org/show_bug.cgi?id=103404
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c index 3ed28a870e20..5c48c22d9d98 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | |||
@@ -501,12 +501,19 @@ static void read_dce_straps( | |||
501 | struct dc_context *ctx, | 501 | struct dc_context *ctx, |
502 | struct resource_straps *straps) | 502 | struct resource_straps *straps) |
503 | { | 503 | { |
504 | /* TODO: Registers are missing */ | 504 | uint32_t reg_val = dm_read_reg_soc15(ctx, mmCC_DC_MISC_STRAPS, 0); |
505 | /*REG_GET_2(CC_DC_HDMI_STRAPS, | 505 | |
506 | HDMI_DISABLE, &straps->hdmi_disable, | 506 | straps->audio_stream_number = get_reg_field_value(reg_val, |
507 | AUDIO_STREAM_NUMBER, &straps->audio_stream_number); | 507 | CC_DC_MISC_STRAPS, |
508 | 508 | AUDIO_STREAM_NUMBER); | |
509 | REG_GET(DC_PINSTRAPS, DC_PINSTRAPS_AUDIO, &straps->dc_pinstraps_audio);*/ | 509 | straps->hdmi_disable = get_reg_field_value(reg_val, |
510 | CC_DC_MISC_STRAPS, | ||
511 | HDMI_DISABLE); | ||
512 | |||
513 | reg_val = dm_read_reg_soc15(ctx, mmDC_PINSTRAPS, 0); | ||
514 | straps->dc_pinstraps_audio = get_reg_field_value(reg_val, | ||
515 | DC_PINSTRAPS, | ||
516 | DC_PINSTRAPS_AUDIO); | ||
510 | } | 517 | } |
511 | 518 | ||
512 | static struct audio *create_audio( | 519 | static struct audio *create_audio( |