drm/amd/display: handle "18" case in TruncToValidBPP
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Thu, 3 Oct 2019 18:48:10 +0000 (14:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Oct 2019 20:29:32 +0000 (16:29 -0400)
Handle 18 DecimalBPP like other cases

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c

index fd707e7459b53c562b97816e645b156a4bd362c6..ba77957aefe38361c4d19fb0bfcd4453a16d8b56 100644 (file)
@@ -3380,6 +3380,8 @@ static unsigned int TruncToValidBPP(
                                return 30;
                        else if (DecimalBPP >= 24 && (DesiredBPP == 0 || DesiredBPP == 24))
                                return 24;
+                       else if (DecimalBPP >= 18 && (DesiredBPP == 0 || DesiredBPP == 18))
+                               return 18;
                        else
                                return BPP_INVALID;
                }