aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c5
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c8
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c5
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c8
4 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
index 84c5b13b33c9..fc1cdfa371ce 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
@@ -740,6 +740,9 @@ void mdp4_crtc_attach(struct drm_crtc *crtc, struct drm_plane *plane)
740 740
741void mdp4_crtc_detach(struct drm_crtc *crtc, struct drm_plane *plane) 741void mdp4_crtc_detach(struct drm_crtc *crtc, struct drm_plane *plane)
742{ 742{
743 /* don't actually detatch our primary plane: */
744 if (to_mdp4_crtc(crtc)->plane == plane)
745 return;
743 set_attach(crtc, mdp4_plane_pipe(plane), NULL); 746 set_attach(crtc, mdp4_plane_pipe(plane), NULL);
744} 747}
745 748
@@ -791,7 +794,7 @@ struct drm_crtc *mdp4_crtc_init(struct drm_device *dev,
791 794
792 INIT_FENCE_CB(&mdp4_crtc->pageflip_cb, pageflip_cb); 795 INIT_FENCE_CB(&mdp4_crtc->pageflip_cb, pageflip_cb);
793 796
794 drm_crtc_init(dev, crtc, &mdp4_crtc_funcs); 797 drm_crtc_init_with_planes(dev, crtc, plane, NULL, &mdp4_crtc_funcs);
795 drm_crtc_helper_add(crtc, &mdp4_crtc_helper_funcs); 798 drm_crtc_helper_add(crtc, &mdp4_crtc_helper_funcs);
796 799
797 mdp4_plane_install_properties(mdp4_crtc->plane, &crtc->base); 800 mdp4_plane_install_properties(mdp4_crtc->plane, &crtc->base);
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c
index 1e893dd13859..66f33dba1ebb 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c
@@ -222,6 +222,7 @@ struct drm_plane *mdp4_plane_init(struct drm_device *dev,
222 struct drm_plane *plane = NULL; 222 struct drm_plane *plane = NULL;
223 struct mdp4_plane *mdp4_plane; 223 struct mdp4_plane *mdp4_plane;
224 int ret; 224 int ret;
225 enum drm_plane_type type;
225 226
226 mdp4_plane = kzalloc(sizeof(*mdp4_plane), GFP_KERNEL); 227 mdp4_plane = kzalloc(sizeof(*mdp4_plane), GFP_KERNEL);
227 if (!mdp4_plane) { 228 if (!mdp4_plane) {
@@ -237,9 +238,10 @@ struct drm_plane *mdp4_plane_init(struct drm_device *dev,
237 mdp4_plane->nformats = mdp4_get_formats(pipe_id, mdp4_plane->formats, 238 mdp4_plane->nformats = mdp4_get_formats(pipe_id, mdp4_plane->formats,
238 ARRAY_SIZE(mdp4_plane->formats)); 239 ARRAY_SIZE(mdp4_plane->formats));
239 240
240 drm_plane_init(dev, plane, 0xff, &mdp4_plane_funcs, 241 type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY;
241 mdp4_plane->formats, mdp4_plane->nformats, 242 drm_universal_plane_init(dev, plane, 0xff, &mdp4_plane_funcs,
242 private_plane); 243 mdp4_plane->formats, mdp4_plane->nformats,
244 type);
243 245
244 mdp4_plane_install_properties(plane, &plane->base); 246 mdp4_plane_install_properties(plane, &plane->base);
245 247
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
index f2794021f086..54afdb2fc32e 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
@@ -524,6 +524,9 @@ void mdp5_crtc_attach(struct drm_crtc *crtc, struct drm_plane *plane)
524 524
525void mdp5_crtc_detach(struct drm_crtc *crtc, struct drm_plane *plane) 525void mdp5_crtc_detach(struct drm_crtc *crtc, struct drm_plane *plane)
526{ 526{
527 /* don't actually detatch our primary plane: */
528 if (to_mdp5_crtc(crtc)->plane == plane)
529 return;
527 set_attach(crtc, mdp5_plane_pipe(plane), NULL); 530 set_attach(crtc, mdp5_plane_pipe(plane), NULL);
528} 531}
529 532
@@ -559,7 +562,7 @@ struct drm_crtc *mdp5_crtc_init(struct drm_device *dev,
559 562
560 INIT_FENCE_CB(&mdp5_crtc->pageflip_cb, pageflip_cb); 563 INIT_FENCE_CB(&mdp5_crtc->pageflip_cb, pageflip_cb);
561 564
562 drm_crtc_init(dev, crtc, &mdp5_crtc_funcs); 565 drm_crtc_init_with_planes(dev, crtc, plane, NULL, &mdp5_crtc_funcs);
563 drm_crtc_helper_add(crtc, &mdp5_crtc_helper_funcs); 566 drm_crtc_helper_add(crtc, &mdp5_crtc_helper_funcs);
564 567
565 mdp5_plane_install_properties(mdp5_crtc->plane, &crtc->base); 568 mdp5_plane_install_properties(mdp5_crtc->plane, &crtc->base);
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index 0ac8bb5e7e85..47f7bbb9c15a 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -358,6 +358,7 @@ struct drm_plane *mdp5_plane_init(struct drm_device *dev,
358 struct drm_plane *plane = NULL; 358 struct drm_plane *plane = NULL;
359 struct mdp5_plane *mdp5_plane; 359 struct mdp5_plane *mdp5_plane;
360 int ret; 360 int ret;
361 enum drm_plane_type type;
361 362
362 mdp5_plane = kzalloc(sizeof(*mdp5_plane), GFP_KERNEL); 363 mdp5_plane = kzalloc(sizeof(*mdp5_plane), GFP_KERNEL);
363 if (!mdp5_plane) { 364 if (!mdp5_plane) {
@@ -373,9 +374,10 @@ struct drm_plane *mdp5_plane_init(struct drm_device *dev,
373 mdp5_plane->nformats = mdp5_get_formats(pipe, mdp5_plane->formats, 374 mdp5_plane->nformats = mdp5_get_formats(pipe, mdp5_plane->formats,
374 ARRAY_SIZE(mdp5_plane->formats)); 375 ARRAY_SIZE(mdp5_plane->formats));
375 376
376 drm_plane_init(dev, plane, 0xff, &mdp5_plane_funcs, 377 type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY;
377 mdp5_plane->formats, mdp5_plane->nformats, 378 drm_universal_plane_init(dev, plane, 0xff, &mdp5_plane_funcs,
378 private_plane); 379 mdp5_plane->formats, mdp5_plane->nformats,
380 type);
379 381
380 mdp5_plane_install_properties(plane, &plane->base); 382 mdp5_plane_install_properties(plane, &plane->base);
381 383