mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Revert "ANDROID: drm: Add support for DP 1.4 Compliance edid corruption test"
A newer version of the patch is now available upstream.
This reverts commit 132de0efda.
Bug: 139653858
Change-Id: I5a1816bf843f81eb484a8f28fac13cf9660f62be
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:
parent
2f47611ced
commit
4e5eb362b0
4 changed files with 4 additions and 63 deletions
|
|
@ -336,41 +336,6 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
|
|||
}
|
||||
EXPORT_SYMBOL(drm_dp_dpcd_read_link_status);
|
||||
|
||||
/**
|
||||
* drm_dp_send_real_edid_checksum() - send back real edid checksum value
|
||||
* @aux: DisplayPort AUX channel
|
||||
* @real_edid_checksum: real edid checksum for the last block
|
||||
*
|
||||
* Returns true on success
|
||||
*/
|
||||
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
|
||||
u8 real_edid_checksum)
|
||||
{
|
||||
u8 link_edid_read = 0, auto_test_req = 0, test_resp = 0;
|
||||
|
||||
drm_dp_dpcd_read(aux, DP_DEVICE_SERVICE_IRQ_VECTOR, &auto_test_req, 1);
|
||||
auto_test_req &= DP_AUTOMATED_TEST_REQUEST;
|
||||
|
||||
drm_dp_dpcd_read(aux, DP_TEST_REQUEST, &link_edid_read, 1);
|
||||
link_edid_read &= DP_TEST_LINK_EDID_READ;
|
||||
|
||||
if (!auto_test_req || !link_edid_read) {
|
||||
DRM_DEBUG_KMS("Source DUT does not support TEST_EDID_READ\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
drm_dp_dpcd_write(aux, DP_DEVICE_SERVICE_IRQ_VECTOR, &auto_test_req, 1);
|
||||
|
||||
/* send back checksum for the last edid extension block data */
|
||||
drm_dp_dpcd_write(aux, DP_TEST_EDID_CHECKSUM, &real_edid_checksum, 1);
|
||||
|
||||
test_resp |= DP_TEST_EDID_CHECKSUM_WRITE;
|
||||
drm_dp_dpcd_write(aux, DP_TEST_RESPONSE, &test_resp, 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_dp_send_real_edid_checksum);
|
||||
|
||||
/**
|
||||
* drm_dp_link_probe() - probe a DisplayPort link for capabilities
|
||||
* @aux: DisplayPort AUX channel
|
||||
|
|
|
|||
|
|
@ -1358,22 +1358,11 @@ static int validate_displayid(u8 *displayid, int length, int idx);
|
|||
static int drm_edid_block_checksum(const u8 *raw_edid)
|
||||
{
|
||||
int i;
|
||||
u8 csum = 0, crc = 0;
|
||||
|
||||
for (i = 0; i < EDID_LENGTH - 1; i++)
|
||||
u8 csum = 0;
|
||||
for (i = 0; i < EDID_LENGTH; i++)
|
||||
csum += raw_edid[i];
|
||||
|
||||
crc = 0x100 - csum;
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
static bool drm_edid_block_checksum_diff(const u8 *raw_edid, u8 real_checksum)
|
||||
{
|
||||
if (raw_edid[EDID_LENGTH - 1] != real_checksum)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return csum;
|
||||
}
|
||||
|
||||
static bool drm_edid_is_zero(const u8 *in_edid, int length)
|
||||
|
|
@ -1431,7 +1420,7 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
|
|||
}
|
||||
|
||||
csum = drm_edid_block_checksum(raw_edid);
|
||||
if (drm_edid_block_checksum_diff(raw_edid, csum)) {
|
||||
if (csum) {
|
||||
if (edid_corrupt)
|
||||
*edid_corrupt = true;
|
||||
|
||||
|
|
@ -1572,11 +1561,6 @@ static void connector_bad_edid(struct drm_connector *connector,
|
|||
u8 *edid, int num_blocks)
|
||||
{
|
||||
int i;
|
||||
u8 num_of_ext = edid[0x7e];
|
||||
|
||||
/* Calculate real checksum for the last edid extension block data */
|
||||
connector->real_edid_checksum =
|
||||
drm_edid_block_checksum(edid + num_of_ext * EDID_LENGTH);
|
||||
|
||||
if (connector->bad_edid_counter++ && !(drm_debug & DRM_UT_KMS))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1401,12 +1401,6 @@ struct drm_connector {
|
|||
* rev1.1 4.2.2.6
|
||||
*/
|
||||
bool edid_corrupt;
|
||||
/**
|
||||
* @real_edid_checksum: real edid checksum for corrupted edid block.
|
||||
* Required in Displayport 1.4 compliance testing
|
||||
* rev1.1 4.2.2.6
|
||||
*/
|
||||
u8 real_edid_checksum;
|
||||
|
||||
/** @debugfs_entry: debugfs directory for this connector */
|
||||
struct dentry *debugfs_entry;
|
||||
|
|
|
|||
|
|
@ -1377,8 +1377,6 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
|||
int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
||||
int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
||||
int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
||||
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
|
||||
u8 real_edid_checksum);
|
||||
int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
|
||||
const u8 port_cap[4]);
|
||||
int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
|
||||
|
|
|
|||
Loading…
Reference in a new issue