mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-25 20:15:01 +00:00
drm/amd/display: Pass panel inst to a PSR command
[why] PSR set power command wasn't setting panel instance and command version which caused both streams to overwrite the same PSR state. [how] Pass panel instance to the set power command function and to DMUB and set command version enum Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Anson Jacob <Anson.Jacob@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ebd1e71969
commit
f0d0c39149
@ -2997,7 +2997,7 @@ bool dc_link_set_psr_allow_active(struct dc_link *link, const bool *allow_active
|
||||
link->psr_settings.psr_power_opt = *power_opts;
|
||||
|
||||
if (psr != NULL && link->psr_settings.psr_feature_enabled && psr->funcs->psr_set_power_opt)
|
||||
psr->funcs->psr_set_power_opt(psr, link->psr_settings.psr_power_opt);
|
||||
psr->funcs->psr_set_power_opt(psr, link->psr_settings.psr_power_opt, panel_inst);
|
||||
}
|
||||
|
||||
/* Enable or Disable PSR */
|
||||
|
||||
@ -230,7 +230,7 @@ static void dmub_psr_set_level(struct dmub_psr *dmub, uint16_t psr_level, uint8_
|
||||
/**
|
||||
* Set PSR power optimization flags.
|
||||
*/
|
||||
static void dmub_psr_set_power_opt(struct dmub_psr *dmub, unsigned int power_opt)
|
||||
static void dmub_psr_set_power_opt(struct dmub_psr *dmub, unsigned int power_opt, uint8_t panel_inst)
|
||||
{
|
||||
union dmub_rb_cmd cmd;
|
||||
struct dc_context *dc = dmub->ctx;
|
||||
@ -239,7 +239,9 @@ static void dmub_psr_set_power_opt(struct dmub_psr *dmub, unsigned int power_opt
|
||||
cmd.psr_set_power_opt.header.type = DMUB_CMD__PSR;
|
||||
cmd.psr_set_power_opt.header.sub_type = DMUB_CMD__SET_PSR_POWER_OPT;
|
||||
cmd.psr_set_power_opt.header.payload_bytes = sizeof(struct dmub_cmd_psr_set_power_opt_data);
|
||||
cmd.psr_set_power_opt.psr_set_power_opt_data.cmd_version = DMUB_CMD_PSR_CONTROL_VERSION_1;
|
||||
cmd.psr_set_power_opt.psr_set_power_opt_data.power_opt = power_opt;
|
||||
cmd.psr_set_power_opt.psr_set_power_opt_data.panel_inst = panel_inst;
|
||||
|
||||
dc_dmub_srv_cmd_queue(dc->dmub_srv, &cmd);
|
||||
dc_dmub_srv_cmd_execute(dc->dmub_srv);
|
||||
|
||||
@ -46,7 +46,7 @@ struct dmub_psr_funcs {
|
||||
void (*psr_force_static)(struct dmub_psr *dmub, uint8_t panel_inst);
|
||||
void (*psr_get_residency)(struct dmub_psr *dmub, uint32_t *residency,
|
||||
uint8_t panel_inst);
|
||||
void (*psr_set_power_opt)(struct dmub_psr *dmub, unsigned int power_opt);
|
||||
void (*psr_set_power_opt)(struct dmub_psr *dmub, unsigned int power_opt, uint8_t panel_inst);
|
||||
};
|
||||
|
||||
struct dmub_psr *dmub_psr_create(struct dc_context *ctx);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user