Merge tag 'staging-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[deliverable/linux.git] / drivers / gpu / drm / drm_plane_helper.c
index d384ebcf0aaf52a63125c9599553fc24e6a7f87b..369d2898ff9ecdfc452818235642ef5d6502a641 100644 (file)
  * by the atomic helpers.
  *
  * Again drivers are strongly urged to switch to the new interfaces.
+ *
+ * The plane helpers share the function table structures with other helpers,
+ * specifically also the atomic helpers. See struct &drm_plane_helper_funcs for
+ * the details.
  */
 
 /*
@@ -164,6 +168,8 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
        vscale = drm_rect_calc_vscale(src, dest, min_scale, max_scale);
        if (hscale < 0 || vscale < 0) {
                DRM_DEBUG_KMS("Invalid scaling of plane\n");
+               drm_rect_debug_print("src: ", src, true);
+               drm_rect_debug_print("dst: ", dest, false);
                return -ERANGE;
        }
 
@@ -180,6 +186,8 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
 
        if (!can_position && !drm_rect_equals(dest, clip)) {
                DRM_DEBUG_KMS("Plane must cover entire CRTC\n");
+               drm_rect_debug_print("dst: ", dest, false);
+               drm_rect_debug_print("clip: ", clip, false);
                return -EINVAL;
        }
 
@@ -367,7 +375,7 @@ static struct drm_plane *create_primary_plane(struct drm_device *dev)
                                       &drm_primary_helper_funcs,
                                       safe_modeset_formats,
                                       ARRAY_SIZE(safe_modeset_formats),
-                                      DRM_PLANE_TYPE_PRIMARY);
+                                      DRM_PLANE_TYPE_PRIMARY, NULL);
        if (ret) {
                kfree(primary);
                primary = NULL;
@@ -394,7 +402,8 @@ int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
        struct drm_plane *primary;
 
        primary = create_primary_plane(dev);
-       return drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs);
+       return drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs,
+                                        NULL);
 }
 EXPORT_SYMBOL(drm_crtc_init);
 
This page took 0.025566 seconds and 5 git commands to generate.