Skip to contentSkip to conversation

drm/amd/display: allow 18 bit dp output on DCN3

PATCH In review Rodrigo Siqueira 2 participants 2 messages Oct 28, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: allow 18 bit dp output on DCN3

From: Dmytro Laktyushkin <[email protected]>

We need this to pass dp compliance.

---
 .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c  | 14 --------------
 .../amd/display/dc/dml/dcn30/display_mode_vba_30.c |  2 +-
 2 files changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +0 -14
index d1ed2a99bf65..d65496917e93 100644
@@ -2020,20 +2020,6 @@ static bool dcn30_internal_validate_bw(
 
 	dml_log_mode_support_params(&context->bw_ctx.dml);
 
-	/* TODO: Need to check calculated vlevel why that fails validation of below resolutions */
-	if (context->res_ctx.pipe_ctx[0].stream != NULL) {
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 640  && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 480)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 800)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 768)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 1024)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 2048 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 1536)
-			vlevel = 0;
-	}
-
 	if (vlevel == context->bw_ctx.dml.soc.num_states)
 		goto validate_fail;
 
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +1 -1
index 9e0ae18e71fa..0f668699809d 100644
@@ -3628,7 +3628,7 @@ static double TruncToValidBPP(
 			}
 		}
 	} else {
-		if (!((DSCEnable == false && (DesiredBPP == NonDSCBPP2 || DesiredBPP == NonDSCBPP1 || DesiredBPP == NonDSCBPP0)) ||
+		if (!((DSCEnable == false && (DesiredBPP == NonDSCBPP2 || DesiredBPP == NonDSCBPP1 || DesiredBPP == NonDSCBPP0 || DesiredBPP == 18)) ||
 				(DSCEnable && DesiredBPP >= MinDSCBPP && DesiredBPP <= MaxDSCBPP))) {
 			return BPP_INVALID;
 		} else {
Signature · 6 lines
2.29.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Reviewed-by Chris Park Acked-by Rodrigo Siqueira on v1 1/1
#1 lore raw

-----Original Message-----
From: Siqueira, Rodrigo <[email protected]>
Sent: Wednesday, October 28, 2020 6:08 PM
To: [email protected]
Cc: Cornij, Nikola <[email protected]>; Liu, Zhan <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Wentland, Harry <[email protected]>; Laktyushkin, Dmytro <[email protected]>; Park, Chris <[email protected]>
Subject: [PATCH] drm/amd/display: allow 18 bit dp output on DCN3

From: Dmytro Laktyushkin <[email protected]>

We need this to pass dp compliance.

---
 .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c  | 14 --------------  .../amd/display/dc/dml/dcn30/display_mode_vba_30.c |  2 +-
 2 files changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +0 -14
index d1ed2a99bf65..d65496917e93 100644
@@ -2020,20 +2020,6 @@ static bool dcn30_internal_validate_bw(
 
 	dml_log_mode_support_params(&context->bw_ctx.dml);
 
-	/* TODO: Need to check calculated vlevel why that fails validation of below resolutions */
-	if (context->res_ctx.pipe_ctx[0].stream != NULL) {
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 640  && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 480)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 800)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 768)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 1280 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 1024)
-			vlevel = 0;
-		if (context->res_ctx.pipe_ctx[0].stream->timing.h_addressable == 2048 && context->res_ctx.pipe_ctx[0].stream->timing.v_addressable == 1536)
-			vlevel = 0;
-	}
-
 	if (vlevel == context->bw_ctx.dml.soc.num_states)
 		goto validate_fail;
 
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +2 -1
index 9e0ae18e71fa..0f668699809d 100644
@@ -3628,7 +3628,7 @@ static double TruncToValidBPP(
 			}
 		}
 	} else {
-		if (!((DSCEnable == false && (DesiredBPP == NonDSCBPP2 || DesiredBPP == NonDSCBPP1 || DesiredBPP == NonDSCBPP0)) ||
+		if (!((DSCEnable == false && (DesiredBPP == NonDSCBPP2 || DesiredBPP 
+== NonDSCBPP1 || DesiredBPP == NonDSCBPP0 || DesiredBPP == 18)) ||
 				(DSCEnable && DesiredBPP >= MinDSCBPP && DesiredBPP <= MaxDSCBPP))) {
 			return BPP_INVALID;

} else {
--
2.29.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx