diff mbox series

[5/5] drm/msm/dpu: Correct initialization of modifiers

Message ID 20181211184224.131478-5-frkoenig@google.com (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/msm/dpu: Remove unused format tables. | expand

Commit Message

Fritz Koenig Dec. 11, 2018, 6:42 p.m. UTC
allow_fb_modifiers needs to be set before drm_universal_plane_init
is called.

Signed-off-by: Fritz Koenig <frkoenig@google.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Sean Paul Dec. 12, 2018, 4:13 p.m. UTC | #1
On Tue, Dec 11, 2018 at 10:42:24AM -0800, Fritz Koenig wrote:
> allow_fb_modifiers needs to be set before drm_universal_plane_init
> is called.
> 
> Signed-off-by: Fritz Koenig <frkoenig@google.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 4d67b3c96702..56555c3a750a 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -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);
> -- 
> 2.20.0.rc2.403.gdbc3b29805-goog
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 4d67b3c96702..56555c3a750a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -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);