summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kaszewski <dominik.kaszewski@amd.com>2025-04-15 16:55:13 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-05-05 19:55:30 +0300
commit2f2c97089d69009d7085570a51f548c1f10b03c1 (patch)
tree76cd30e7c89b343e36c02a5455a3a3b3112d586a
parentbd3e84bc98f81b44f2c43936bdadc3241d654259 (diff)
downloadlinux-2f2c97089d69009d7085570a51f548c1f10b03c1.tar.xz
drm/amd/display: Prepare for Fused I2C-over-AUX
[Why] Passive DP-HDMI dongles use I2C-over-AUX protocol which is currently not supported using HDCP Locality Check FW path. [How] Prepare code for switching to I2C-over-AUX protocol. Passive dongle detection to be added in another commit. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com> Signed-off-by: Ray Wu <ray.wu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_fused_io.c12
-rw-r--r--drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h3
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_fused_io.c b/drivers/gpu/drm/amd/display/dc/dc_fused_io.c
index fff41b0a0a5a..fee69642fb93 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_fused_io.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_fused_io.c
@@ -11,7 +11,8 @@ static bool op_i2c_convert(
union dmub_rb_cmd *cmd,
const struct mod_hdcp_atomic_op_i2c *op,
enum dmub_cmd_fused_request_type type,
- uint32_t ddc_line
+ uint32_t ddc_line,
+ bool over_aux
)
{
struct dmub_cmd_fused_request *req = &cmd->fused_io.request;
@@ -23,6 +24,7 @@ static bool op_i2c_convert(
req->type = type;
loc->is_aux = false;
loc->ddc_line = ddc_line;
+ loc->over_aux = over_aux;
loc->address = op->address;
loc->offset = op->offset;
loc->length = op->size;
@@ -100,11 +102,13 @@ bool dm_atomic_write_poll_read_i2c(
if (!link)
return false;
+ const bool over_aux = false;
const uint32_t ddc_line = link->ddc->ddc_pin->pin_data->en;
+
union dmub_rb_cmd commands[3] = { 0 };
- const bool converted = op_i2c_convert(&commands[0], write, FUSED_REQUEST_WRITE, ddc_line)
- && op_i2c_convert(&commands[1], poll, FUSED_REQUEST_POLL, ddc_line)
- && op_i2c_convert(&commands[2], read, FUSED_REQUEST_READ, ddc_line);
+ const bool converted = op_i2c_convert(&commands[0], write, FUSED_REQUEST_WRITE, ddc_line, over_aux)
+ && op_i2c_convert(&commands[1], poll, FUSED_REQUEST_POLL, ddc_line, over_aux)
+ && op_i2c_convert(&commands[2], read, FUSED_REQUEST_READ, ddc_line, over_aux);
if (!converted)
return false;
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index b11cf41c2d51..3ae31449983a 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -5447,7 +5447,8 @@ struct dmub_cmd_fused_request {
struct dmub_cmd_fused_request_location_i2c {
uint8_t is_aux : 1; // False
uint8_t ddc_line : 3;
- uint8_t _reserved0 : 4;
+ uint8_t over_aux : 1;
+ uint8_t _reserved0 : 3;
uint8_t address;
uint8_t offset;
uint8_t length;