diff options
author | Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> | 2019-11-12 15:33:37 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-12-05 16:30:35 -0500 |
commit | d4bbcecb596296834aeafb93008474671c7988cf (patch) | |
tree | 94f4db3516739b99d88110c4e4617ae6f60cf862 /drivers/gpu/drm/amd/display/dc/bios | |
parent | drm/amd/display: Return a correct error value (diff) | |
download | linux-dev-d4bbcecb596296834aeafb93008474671c7988cf.tar.xz linux-dev-d4bbcecb596296834aeafb93008474671c7988cf.zip |
drm/amd/display: Split DMUB cmd type into type/subtype
[Why]
Commands will be considered a stable ABI between driver and firmware.
Commands are also split between DC commands, DAL feature commands,
and VBIOS commands.
Commands are currently not designated to a specific ID and the enum
does not provide a stable ABI.
We currently group all of these into a single command type of 8-bits.
With the stable ABI consideration in mind it's not unreasonable to
run out of command IDs.
For cleaner separation and versioning split the commands into a main
type and a subtype.
[How]
For commands where performance matters (like reg sequences) these
are still considered main commands.
Sub commands will be split by ownership/feature.
Update existing command sequences to reflect new changes.
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c index 1836f16bb7fe..2cb7a4288cb7 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c @@ -111,7 +111,8 @@ static void encoder_control_dmcub( { struct dmub_rb_cmd_digx_encoder_control encoder_control = { 0 }; - encoder_control.header.type = DMUB_CMD__DIGX_ENCODER_CONTROL; + encoder_control.header.type = DMUB_CMD__VBIOS; + encoder_control.header.sub_type = DMUB_CMD__VBIOS_DIGX_ENCODER_CONTROL; encoder_control.encoder_control.dig.stream_param = *dig; dc_dmub_srv_cmd_queue(dmcub, &encoder_control.header); @@ -219,7 +220,9 @@ static void transmitter_control_dmcub( { struct dmub_rb_cmd_dig1_transmitter_control transmitter_control; - transmitter_control.header.type = DMUB_CMD__DIG1_TRANSMITTER_CONTROL; + transmitter_control.header.type = DMUB_CMD__VBIOS; + transmitter_control.header.sub_type = + DMUB_CMD__VBIOS_DIG1_TRANSMITTER_CONTROL; transmitter_control.transmitter_control.dig = *dig; dc_dmub_srv_cmd_queue(dmcub, &transmitter_control.header); @@ -302,7 +305,8 @@ static void set_pixel_clock_dmcub( { struct dmub_rb_cmd_set_pixel_clock pixel_clock = { 0 }; - pixel_clock.header.type = DMUB_CMD__SET_PIXEL_CLOCK; + pixel_clock.header.type = DMUB_CMD__VBIOS; + pixel_clock.header.sub_type = DMUB_CMD__VBIOS_SET_PIXEL_CLOCK; pixel_clock.pixel_clock.clk = *clk; dc_dmub_srv_cmd_queue(dmcub, &pixel_clock.header); @@ -650,7 +654,8 @@ static void enable_disp_power_gating_dmcub( { struct dmub_rb_cmd_enable_disp_power_gating power_gating; - power_gating.header.type = DMUB_CMD__ENABLE_DISP_POWER_GATING; + power_gating.header.type = DMUB_CMD__VBIOS; + power_gating.header.sub_type = DMUB_CMD__VBIOS_ENABLE_DISP_POWER_GATING; power_gating.power_gating.pwr = *pwr; dc_dmub_srv_cmd_queue(dmcub, &power_gating.header); |