diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_dp.c')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_dp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 5bf825dfaa09..8d74de82456e 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
@@ -178,6 +178,13 @@ radeon_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) | |||
178 | switch (msg->request & ~DP_AUX_I2C_MOT) { | 178 | switch (msg->request & ~DP_AUX_I2C_MOT) { |
179 | case DP_AUX_NATIVE_WRITE: | 179 | case DP_AUX_NATIVE_WRITE: |
180 | case DP_AUX_I2C_WRITE: | 180 | case DP_AUX_I2C_WRITE: |
181 | /* The atom implementation only supports writes with a max payload of | ||
182 | * 12 bytes since it uses 4 bits for the total count (header + payload) | ||
183 | * in the parameter space. The atom interface supports 16 byte | ||
184 | * payloads for reads. The hw itself supports up to 16 bytes of payload. | ||
185 | */ | ||
186 | if (WARN_ON_ONCE(msg->size > 12)) | ||
187 | return -E2BIG; | ||
181 | /* tx_size needs to be 4 even for bare address packets since the atom | 188 | /* tx_size needs to be 4 even for bare address packets since the atom |
182 | * table needs the info in tx_buf[3]. | 189 | * table needs the info in tx_buf[3]. |
183 | */ | 190 | */ |