diff options
author | Zeyu Fan <Zeyu.Fan@amd.com> | 2017-02-16 16:15:30 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:15:22 -0400 |
commit | 2b230ea3e76f6238b31fd270cab76d55394f3293 (patch) | |
tree | dc087031626d150c63c5e6a14ebf7b3fdbf4cc1a /drivers | |
parent | 70063a5957126087f167ff3890784d7b3b36c844 (diff) |
drm/amd/display: Add query_ddc_data function
Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 25 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc.h | 11 |
2 files changed, 35 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 84412e752017..6516c275e0c7 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c | |||
@@ -1725,6 +1725,31 @@ bool dc_read_dpcd( | |||
1725 | return r == DDC_RESULT_SUCESSFULL; | 1725 | return r == DDC_RESULT_SUCESSFULL; |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | bool dc_query_ddc_data( | ||
1729 | struct dc *dc, | ||
1730 | uint32_t link_index, | ||
1731 | uint32_t address, | ||
1732 | uint8_t *write_buf, | ||
1733 | uint32_t write_size, | ||
1734 | uint8_t *read_buf, | ||
1735 | uint32_t read_size) { | ||
1736 | |||
1737 | struct core_dc *core_dc = DC_TO_CORE(dc); | ||
1738 | |||
1739 | struct core_link *link = core_dc->links[link_index]; | ||
1740 | |||
1741 | bool result = dal_ddc_service_query_ddc_data( | ||
1742 | link->ddc, | ||
1743 | address, | ||
1744 | write_buf, | ||
1745 | write_size, | ||
1746 | read_buf, | ||
1747 | read_size); | ||
1748 | |||
1749 | return result; | ||
1750 | } | ||
1751 | |||
1752 | |||
1728 | bool dc_write_dpcd( | 1753 | bool dc_write_dpcd( |
1729 | struct dc *dc, | 1754 | struct dc *dc, |
1730 | uint32_t link_index, | 1755 | uint32_t link_index, |
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 71d7dde79ae0..2d84b18f48b0 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h | |||
@@ -720,7 +720,16 @@ bool dc_write_dpcd( | |||
720 | uint32_t link_index, | 720 | uint32_t link_index, |
721 | uint32_t address, | 721 | uint32_t address, |
722 | const uint8_t *data, | 722 | const uint8_t *data, |
723 | uint32_t size); | 723 | uint32_t size); |
724 | |||
725 | bool dc_query_ddc_data( | ||
726 | struct dc *dc, | ||
727 | uint32_t link_index, | ||
728 | uint32_t address, | ||
729 | uint8_t *write_buf, | ||
730 | uint32_t write_size, | ||
731 | uint8_t *read_buf, | ||
732 | uint32_t read_size); | ||
724 | 733 | ||
725 | bool dc_submit_i2c( | 734 | bool dc_submit_i2c( |
726 | struct dc *dc, | 735 | struct dc *dc, |