drm/msm/dpu: Correct initialization of modifiers
authorFritz Koenig <frkoenig@google.com>
Tue, 11 Dec 2018 18:42:24 +0000 (10:42 -0800)
committerSean Paul <seanpaul@chromium.org>
Fri, 1 Feb 2019 15:35:54 +0000 (10:35 -0500)
allow_fb_modifiers needs to be set before drm_universal_plane_init
is called.

Signed-off-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

index 4d67b3c96702f93c12c1afcfc8d9615a7b5b47d2..56555c3a750a597ff2e3d6a6639c523c5a14ae6d 100644 (file)
@@ -926,16 +926,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
                goto hw_intr_init_err;
        }
 
-       /*
-        * _dpu_kms_drm_obj_init should create the DRM related objects
-        * i.e. CRTCs, planes, encoders, connectors and so forth
-        */
-       rc = _dpu_kms_drm_obj_init(dpu_kms);
-       if (rc) {
-               DPU_ERROR("modeset init failed: %d\n", rc);
-               goto drm_obj_init_err;
-       }
-
        dev->mode_config.min_width = 0;
        dev->mode_config.min_height = 0;
 
@@ -952,6 +942,16 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
         */
        dev->mode_config.allow_fb_modifiers = true;
 
+       /*
+        * _dpu_kms_drm_obj_init should create the DRM related objects
+        * i.e. CRTCs, planes, encoders, connectors and so forth
+        */
+       rc = _dpu_kms_drm_obj_init(dpu_kms);
+       if (rc) {
+               DPU_ERROR("modeset init failed: %d\n", rc);
+               goto drm_obj_init_err;
+       }
+
        dpu_vbif_init_memtypes(dpu_kms);
 
        pm_runtime_put_sync(&dpu_kms->pdev->dev);