drm/amd/display: Fix LTTPR not Enabled on HP ZBook G8 laptop
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix LTTPR not Enabled on HP ZBook G8 laptop
From: Angus Wang <[email protected]>
[WHY]
Previous LTTPR change has caused a regression that led to an issue where LTTPR is disabled
[HOW]
Extended changes from previous fix to DCN30X
--- .../amd/display/dc/dcn301/dcn301_resource.c | 18 ++++++++++++++++++ .../amd/display/dc/dcn302/dcn302_resource.c | 18 ++++++++++++++++++ .../amd/display/dc/dcn303/dcn303_resource.c | 17 +++++++++++++++++ 3 files changed, 53 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +18 -0
@@ -1485,6 +1485,24 @@ static bool dcn301_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ + +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else if (dc->ctx->dce_environment ==DCE_ENV_FPGA_MAXIMUS ) {
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +18 -0
@@ -1557,6 +1557,24 @@ static bool dcn302_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, + &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +17 -0
@@ -1500,6 +1500,23 @@ static bool dcn303_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else
Signature · 1 line
2.30.2
Lakha, Bhawanpreet
Reviewed-by Reviewed-by Wesley Chalmers Reviewed-by Martin Leung Acked-by Qingqing Zhuo on v1 1/1[AMD Official Use Only]
________________________________
From: Aurabindo Pillai <[email protected]>
Sent: November 15, 2021 2:59 PM
To: [email protected] <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Wang, Angus <[email protected]>; Chalmers, Wesley <[email protected]>; Leung, Martin <[email protected]>; Zhuo, Qingqing <[email protected]>
Subject: [PATCH] drm/amd/display: Fix LTTPR not Enabled on HP ZBook G8 laptop
From: Angus Wang <[email protected]>
[WHY]
Previous LTTPR change has caused a regression that led to an issue where LTTPR is disabled
[HOW]
Extended changes from previous fix to DCN30X
--- .../amd/display/dc/dcn301/dcn301_resource.c | 18 ++++++++++++++++++ .../amd/display/dc/dcn302/dcn302_resource.c | 18 ++++++++++++++++++ .../amd/display/dc/dcn303/dcn303_resource.c | 17 +++++++++++++++++ 3 files changed, 53 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +18 -0
@@ -1485,6 +1485,24 @@ static bool dcn301_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ + +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else if (dc->ctx->dce_environment ==DCE_ENV_FPGA_MAXIMUS ) {
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +18 -0
@@ -1557,6 +1557,24 @@ static bool dcn302_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, + &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +17 -0
@@ -1500,6 +1500,23 @@ static bool dcn303_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else
--
2.30.2