drm/amd/display: Add Connection Manager boot option.
authorJimmy Kizito <Jimmy.Kizito@amd.com>
Thu, 7 Apr 2022 17:55:04 +0000 (13:55 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:43:55 +0000 (10:43 -0400)
[Why]
Boot up behaviour may differ depending on the Connection Manager
handling USB4 tunneling.

[How]
Send boot option to firmware to indicate Connection Manager.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c

index 56757a2..f5cb893 100644 (file)
@@ -243,6 +243,7 @@ struct dmub_srv_hw_params {
        bool power_optimization;
        bool dpia_supported;
        bool disable_dpia;
+       bool usb4_cm_version;
 };
 
 /**
index 05c8d91..e24f117 100644 (file)
@@ -350,8 +350,9 @@ union dmub_fw_boot_options {
                uint32_t power_optimization: 1;
                uint32_t diag_env: 1; /* 1 if diagnostic environment */
                uint32_t gpint_scratch8: 1; /* 1 if GPINT is in scratch8*/
+               uint32_t usb4_cm_version: 1; /**< USB4 CM Version */
 
-               uint32_t reserved : 18; /**< reserved */
+               uint32_t reserved : 17; /**< reserved */
        } bits; /**< boot bits */
        uint32_t all; /**< 32-bit access to bits */
 };
index 82c6515..7c9330a 100644 (file)
@@ -340,6 +340,7 @@ void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
        boot_options.bits.z10_disable = params->disable_z10;
        boot_options.bits.dpia_supported = params->dpia_supported;
        boot_options.bits.enable_dpia = params->disable_dpia ? 0 : 1;
+       boot_options.bits.usb4_cm_version = params->usb4_cm_version;
        boot_options.bits.power_optimization = params->power_optimization;
 
        boot_options.bits.sel_mux_phy_c_d_phy_f_g = (dmub->asic == DMUB_ASIC_DCN31B) ? 1 : 0;