summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2022-01-05 16:13:40 -0800
committerDouglas Anderson <dianders@chromium.org>2022-01-05 16:13:40 -0800
commitef1270e99460055ee7d66a4a22dd74bf61c17aa5 (patch)
tree9cde5969ac70f1cdf84a4bbcc8adc2deacf4bb47 /drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
parent1a4af2e40c98b62c8aaf7cb692cd9600291d339b (diff)
parentcb6846fbb83b574c85c2a80211b402a6347b60b1 (diff)
Merge remote-tracking branch 'drm/drm-next' into drm-tip
# Conflicts: # drivers/gpu/drm/nouveau/nouveau_fence.c
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
index 16e7059393fa..2e9cbfa7663b 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
@@ -276,7 +276,7 @@ static const struct dc_plane_cap plane_cap = {
.argb8888 = true,
.nv12 = true,
.fp16 = true,
- .p010 = false,
+ .p010 = true,
.ayuv = false,
},
.max_upscale_factor = {
@@ -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