drm/amd/display: change dml vba cursor count define to correct one
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Wed, 20 Sep 2017 22:32:51 +0000 (18:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:45:43 +0000 (16:45 -0400)
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h

index 054b5067fc17ff0bdc9cd92f3549e56a0fdfef72..a11b37c50d9607314670b6f8c2dc7b88a7abb100 100644 (file)
@@ -633,7 +633,7 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib)
                mode_lib->vba.NumberOfCursors[mode_lib->vba.NumberOfActivePlanes] = 0;
                // The DML spreadsheet assumes that the two cursors utilize the same amount of bandwidth. We'll
                // calculate things a little more accurately
-               for (k = 0; k < DC__NUM_CURSOR; ++k) {
+               for (k = 0; k < DC__NUM_CURSOR__MAX; ++k) {
                        switch (k) {
                        case 0:
                                mode_lib->vba.CursorBPP[mode_lib->vba.NumberOfActivePlanes][0] =
index 5758c3fd39bae3be9094e3280938348303352e5c..63ad4a7bfeb51646b20e53ba33f317a60a23b811 100644 (file)
@@ -332,8 +332,8 @@ struct vba_vars_st {
        unsigned int BlendingAndTiming[DC__NUM_DPP__MAX];
        bool SynchronizedVBlank;
        unsigned int NumberOfCursors[DC__NUM_DPP__MAX];
-       unsigned int CursorWidth[DC__NUM_DPP__MAX][DC__NUM_CURSOR];
-       unsigned int CursorBPP[DC__NUM_DPP__MAX][DC__NUM_CURSOR];
+       unsigned int CursorWidth[DC__NUM_DPP__MAX][DC__NUM_CURSOR__MAX];
+       unsigned int CursorBPP[DC__NUM_DPP__MAX][DC__NUM_CURSOR__MAX];
        bool XFCEnabled[DC__NUM_DPP__MAX];
        bool ScalerEnabled[DC__NUM_DPP__MAX];