diff options
Diffstat (limited to 'drivers/gpu')
42 files changed, 98 insertions, 49 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 1859dd3ad622..799416651f2f 100644 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c | |||
| @@ -217,6 +217,7 @@ static struct drm_plane *arc_pgu_plane_init(struct drm_device *drm) | |||
| 217 | 217 | ||
| 218 | ret = drm_universal_plane_init(drm, plane, 0xff, &arc_pgu_plane_funcs, | 218 | ret = drm_universal_plane_init(drm, plane, 0xff, &arc_pgu_plane_funcs, |
| 219 | formats, ARRAY_SIZE(formats), | 219 | formats, ARRAY_SIZE(formats), |
| 220 | NULL, | ||
| 220 | DRM_PLANE_TYPE_PRIMARY, NULL); | 221 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 221 | if (ret) | 222 | if (ret) |
| 222 | return ERR_PTR(ret); | 223 | return ERR_PTR(ret); |
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index 16e1e20cf04c..72b22b805412 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c | |||
| @@ -315,6 +315,7 @@ static struct drm_plane *hdlcd_plane_init(struct drm_device *drm) | |||
| 315 | 315 | ||
| 316 | ret = drm_universal_plane_init(drm, plane, 0xff, &hdlcd_plane_funcs, | 316 | ret = drm_universal_plane_init(drm, plane, 0xff, &hdlcd_plane_funcs, |
| 317 | formats, ARRAY_SIZE(formats), | 317 | formats, ARRAY_SIZE(formats), |
| 318 | NULL, | ||
| 318 | DRM_PLANE_TYPE_PRIMARY, NULL); | 319 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 319 | if (ret) { | 320 | if (ret) { |
| 320 | return ERR_PTR(ret); | 321 | return ERR_PTR(ret); |
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 600fa7bd7f52..60402e27882f 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c | |||
| @@ -398,7 +398,7 @@ int malidp_de_planes_init(struct drm_device *drm) | |||
| 398 | DRM_PLANE_TYPE_OVERLAY; | 398 | DRM_PLANE_TYPE_OVERLAY; |
| 399 | ret = drm_universal_plane_init(drm, &plane->base, crtcs, | 399 | ret = drm_universal_plane_init(drm, &plane->base, crtcs, |
| 400 | &malidp_de_plane_funcs, formats, | 400 | &malidp_de_plane_funcs, formats, |
| 401 | n, plane_type, NULL); | 401 | n, NULL, plane_type, NULL); |
| 402 | if (ret < 0) | 402 | if (ret < 0) |
| 403 | goto cleanup; | 403 | goto cleanup; |
| 404 | 404 | ||
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index 1ffba91fbaae..1d01ad24fe52 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c | |||
| @@ -1269,6 +1269,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev, | |||
| 1269 | &armada_primary_plane_funcs, | 1269 | &armada_primary_plane_funcs, |
| 1270 | armada_primary_formats, | 1270 | armada_primary_formats, |
| 1271 | ARRAY_SIZE(armada_primary_formats), | 1271 | ARRAY_SIZE(armada_primary_formats), |
| 1272 | NULL, | ||
| 1272 | DRM_PLANE_TYPE_PRIMARY, NULL); | 1273 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 1273 | if (ret) { | 1274 | if (ret) { |
| 1274 | kfree(primary); | 1275 | kfree(primary); |
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index 677b44f3534b..edc44910d79f 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c | |||
| @@ -460,6 +460,7 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs) | |||
| 460 | &armada_ovl_plane_funcs, | 460 | &armada_ovl_plane_funcs, |
| 461 | armada_ovl_formats, | 461 | armada_ovl_formats, |
| 462 | ARRAY_SIZE(armada_ovl_formats), | 462 | ARRAY_SIZE(armada_ovl_formats), |
| 463 | NULL, | ||
| 463 | DRM_PLANE_TYPE_OVERLAY, NULL); | 464 | DRM_PLANE_TYPE_OVERLAY, NULL); |
| 464 | if (ret) { | 465 | if (ret) { |
| 465 | kfree(dplane); | 466 | kfree(dplane); |
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index b5bd9b005225..ba532bf101e0 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | |||
| @@ -1087,7 +1087,8 @@ static int atmel_hlcdc_plane_create(struct drm_device *dev, | |||
| 1087 | ret = drm_universal_plane_init(dev, &plane->base, 0, | 1087 | ret = drm_universal_plane_init(dev, &plane->base, 0, |
| 1088 | &layer_plane_funcs, | 1088 | &layer_plane_funcs, |
| 1089 | desc->formats->formats, | 1089 | desc->formats->formats, |
| 1090 | desc->formats->nformats, type, NULL); | 1090 | desc->formats->nformats, |
| 1091 | NULL, type, NULL); | ||
| 1091 | if (ret) | 1092 | if (ret) |
| 1092 | return ret; | 1093 | return ret; |
| 1093 | 1094 | ||
diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c index 2b33825f2f93..9cb1eede0b4d 100644 --- a/drivers/gpu/drm/drm_modeset_helper.c +++ b/drivers/gpu/drm/drm_modeset_helper.c | |||
| @@ -124,6 +124,7 @@ static struct drm_plane *create_primary_plane(struct drm_device *dev) | |||
| 124 | &drm_primary_helper_funcs, | 124 | &drm_primary_helper_funcs, |
| 125 | safe_modeset_formats, | 125 | safe_modeset_formats, |
| 126 | ARRAY_SIZE(safe_modeset_formats), | 126 | ARRAY_SIZE(safe_modeset_formats), |
| 127 | NULL, | ||
| 127 | DRM_PLANE_TYPE_PRIMARY, NULL); | 128 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 128 | if (ret) { | 129 | if (ret) { |
| 129 | kfree(primary); | 130 | kfree(primary); |
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 5dc8c4350602..d3fc561d7b48 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c | |||
| @@ -70,6 +70,8 @@ static unsigned int drm_num_planes(struct drm_device *dev) | |||
| 70 | * @funcs: callbacks for the new plane | 70 | * @funcs: callbacks for the new plane |
| 71 | * @formats: array of supported formats (DRM_FORMAT\_\*) | 71 | * @formats: array of supported formats (DRM_FORMAT\_\*) |
| 72 | * @format_count: number of elements in @formats | 72 | * @format_count: number of elements in @formats |
| 73 | * @format_modifiers: array of struct drm_format modifiers terminated by | ||
| 74 | * DRM_FORMAT_MOD_INVALID | ||
| 73 | * @type: type of plane (overlay, primary, cursor) | 75 | * @type: type of plane (overlay, primary, cursor) |
| 74 | * @name: printf style format string for the plane name, or NULL for default name | 76 | * @name: printf style format string for the plane name, or NULL for default name |
| 75 | * | 77 | * |
| @@ -82,10 +84,12 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, | |||
| 82 | uint32_t possible_crtcs, | 84 | uint32_t possible_crtcs, |
| 83 | const struct drm_plane_funcs *funcs, | 85 | const struct drm_plane_funcs *funcs, |
| 84 | const uint32_t *formats, unsigned int format_count, | 86 | const uint32_t *formats, unsigned int format_count, |
| 87 | const uint64_t *format_modifiers, | ||
| 85 | enum drm_plane_type type, | 88 | enum drm_plane_type type, |
| 86 | const char *name, ...) | 89 | const char *name, ...) |
| 87 | { | 90 | { |
| 88 | struct drm_mode_config *config = &dev->mode_config; | 91 | struct drm_mode_config *config = &dev->mode_config; |
| 92 | unsigned int format_modifier_count = 0; | ||
| 89 | int ret; | 93 | int ret; |
| 90 | 94 | ||
| 91 | ret = drm_mode_object_add(dev, &plane->base, DRM_MODE_OBJECT_PLANE); | 95 | ret = drm_mode_object_add(dev, &plane->base, DRM_MODE_OBJECT_PLANE); |
| @@ -105,6 +109,31 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, | |||
| 105 | return -ENOMEM; | 109 | return -ENOMEM; |
| 106 | } | 110 | } |
| 107 | 111 | ||
| 112 | /* | ||
| 113 | * First driver to need more than 64 formats needs to fix this. Each | ||
| 114 | * format is encoded as a bit and the current code only supports a u64. | ||
| 115 | */ | ||
| 116 | if (WARN_ON(format_count > 64)) | ||
| 117 | return -EINVAL; | ||
| 118 | |||
| 119 | if (format_modifiers) { | ||
| 120 | const uint64_t *temp_modifiers = format_modifiers; | ||
| 121 | while (*temp_modifiers++ != DRM_FORMAT_MOD_INVALID) | ||
| 122 | format_modifier_count++; | ||
| 123 | } | ||
| 124 | |||
| 125 | plane->modifier_count = format_modifier_count; | ||
| 126 | plane->modifiers = kmalloc_array(format_modifier_count, | ||
| 127 | sizeof(format_modifiers[0]), | ||
| 128 | GFP_KERNEL); | ||
| 129 | |||
| 130 | if (format_modifier_count && !plane->modifiers) { | ||
| 131 | DRM_DEBUG_KMS("out of memory when allocating plane\n"); | ||
| 132 | kfree(plane->format_types); | ||
| 133 | drm_mode_object_unregister(dev, &plane->base); | ||
| 134 | return -ENOMEM; | ||
| 135 | } | ||
| 136 | |||
| 108 | if (name) { | 137 | if (name) { |
| 109 | va_list ap; | 138 | va_list ap; |
| 110 | 139 | ||
| @@ -117,12 +146,15 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, | |||
| 117 | } | 146 | } |
| 118 | if (!plane->name) { | 147 | if (!plane->name) { |
| 119 | kfree(plane->format_types); | 148 | kfree(plane->format_types); |
| 149 | kfree(plane->modifiers); | ||
| 120 | drm_mode_object_unregister(dev, &plane->base); | 150 | drm_mode_object_unregister(dev, &plane->base); |
| 121 | return -ENOMEM; | 151 | return -ENOMEM; |
| 122 | } | 152 | } |
| 123 | 153 | ||
| 124 | memcpy(plane->format_types, formats, format_count * sizeof(uint32_t)); | 154 | memcpy(plane->format_types, formats, format_count * sizeof(uint32_t)); |
| 125 | plane->format_count = format_count; | 155 | plane->format_count = format_count; |
| 156 | memcpy(plane->modifiers, format_modifiers, | ||
| 157 | format_modifier_count * sizeof(format_modifiers[0])); | ||
| 126 | plane->possible_crtcs = possible_crtcs; | 158 | plane->possible_crtcs = possible_crtcs; |
| 127 | plane->type = type; | 159 | plane->type = type; |
| 128 | 160 | ||
| @@ -205,7 +237,8 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane, | |||
| 205 | 237 | ||
| 206 | type = is_primary ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; | 238 | type = is_primary ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; |
| 207 | return drm_universal_plane_init(dev, plane, possible_crtcs, funcs, | 239 | return drm_universal_plane_init(dev, plane, possible_crtcs, funcs, |
| 208 | formats, format_count, type, NULL); | 240 | formats, format_count, |
| 241 | NULL, type, NULL); | ||
| 209 | } | 242 | } |
| 210 | EXPORT_SYMBOL(drm_plane_init); | 243 | EXPORT_SYMBOL(drm_plane_init); |
| 211 | 244 | ||
| @@ -224,6 +257,7 @@ void drm_plane_cleanup(struct drm_plane *plane) | |||
| 224 | drm_modeset_lock_fini(&plane->mutex); | 257 | drm_modeset_lock_fini(&plane->mutex); |
| 225 | 258 | ||
| 226 | kfree(plane->format_types); | 259 | kfree(plane->format_types); |
| 260 | kfree(plane->modifiers); | ||
| 227 | drm_mode_object_unregister(dev, &plane->base); | 261 | drm_mode_object_unregister(dev, &plane->base); |
| 228 | 262 | ||
| 229 | BUG_ON(list_empty(&plane->head)); | 263 | BUG_ON(list_empty(&plane->head)); |
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index 39c203ad59db..dc9fd109de14 100644 --- a/drivers/gpu/drm/drm_simple_kms_helper.c +++ b/drivers/gpu/drm/drm_simple_kms_helper.c | |||
| @@ -199,6 +199,7 @@ EXPORT_SYMBOL(drm_simple_display_pipe_attach_bridge); | |||
| 199 | * @funcs: callbacks for the display pipe (optional) | 199 | * @funcs: callbacks for the display pipe (optional) |
| 200 | * @formats: array of supported formats (DRM_FORMAT\_\*) | 200 | * @formats: array of supported formats (DRM_FORMAT\_\*) |
| 201 | * @format_count: number of elements in @formats | 201 | * @format_count: number of elements in @formats |
| 202 | * @format_modifiers: array of formats modifiers | ||
| 202 | * @connector: connector to attach and register (optional) | 203 | * @connector: connector to attach and register (optional) |
| 203 | * | 204 | * |
| 204 | * Sets up a display pipeline which consist of a really simple | 205 | * Sets up a display pipeline which consist of a really simple |
| @@ -219,6 +220,7 @@ int drm_simple_display_pipe_init(struct drm_device *dev, | |||
| 219 | struct drm_simple_display_pipe *pipe, | 220 | struct drm_simple_display_pipe *pipe, |
| 220 | const struct drm_simple_display_pipe_funcs *funcs, | 221 | const struct drm_simple_display_pipe_funcs *funcs, |
| 221 | const uint32_t *formats, unsigned int format_count, | 222 | const uint32_t *formats, unsigned int format_count, |
| 223 | const uint64_t *format_modifiers, | ||
| 222 | struct drm_connector *connector) | 224 | struct drm_connector *connector) |
| 223 | { | 225 | { |
| 224 | struct drm_encoder *encoder = &pipe->encoder; | 226 | struct drm_encoder *encoder = &pipe->encoder; |
| @@ -233,6 +235,7 @@ int drm_simple_display_pipe_init(struct drm_device *dev, | |||
| 233 | ret = drm_universal_plane_init(dev, plane, 0, | 235 | ret = drm_universal_plane_init(dev, plane, 0, |
| 234 | &drm_simple_kms_plane_funcs, | 236 | &drm_simple_kms_plane_funcs, |
| 235 | formats, format_count, | 237 | formats, format_count, |
| 238 | format_modifiers, | ||
| 236 | DRM_PLANE_TYPE_PRIMARY, NULL); | 239 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 237 | if (ret) | 240 | if (ret) |
| 238 | return ret; | 241 | return ret; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index 611b6fd65433..e5099bc9f21a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c | |||
| @@ -283,7 +283,7 @@ int exynos_plane_init(struct drm_device *dev, | |||
| 283 | &exynos_plane_funcs, | 283 | &exynos_plane_funcs, |
| 284 | config->pixel_formats, | 284 | config->pixel_formats, |
| 285 | config->num_pixel_formats, | 285 | config->num_pixel_formats, |
| 286 | config->type, NULL); | 286 | NULL, config->type, NULL); |
| 287 | if (err) { | 287 | if (err) { |
| 288 | DRM_ERROR("failed to initialize plane\n"); | 288 | DRM_ERROR("failed to initialize plane\n"); |
| 289 | return err; | 289 | return err; |
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c index 0a20723aa6e1..9554b245746e 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | |||
| @@ -224,7 +224,7 @@ struct drm_plane *fsl_dcu_drm_primary_create_plane(struct drm_device *dev) | |||
| 224 | &fsl_dcu_drm_plane_funcs, | 224 | &fsl_dcu_drm_plane_funcs, |
| 225 | fsl_dcu_drm_plane_formats, | 225 | fsl_dcu_drm_plane_formats, |
| 226 | ARRAY_SIZE(fsl_dcu_drm_plane_formats), | 226 | ARRAY_SIZE(fsl_dcu_drm_plane_formats), |
| 227 | DRM_PLANE_TYPE_PRIMARY, NULL); | 227 | NULL, DRM_PLANE_TYPE_PRIMARY, NULL); |
| 228 | if (ret) { | 228 | if (ret) { |
| 229 | kfree(primary); | 229 | kfree(primary); |
| 230 | primary = NULL; | 230 | primary = NULL; |
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c index 54a4542a40f1..bec0a8726c6b 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | |||
| @@ -181,6 +181,7 @@ static struct drm_plane *hibmc_plane_init(struct hibmc_drm_private *priv) | |||
| 181 | ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs, | 181 | ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs, |
| 182 | channel_formats1, | 182 | channel_formats1, |
| 183 | ARRAY_SIZE(channel_formats1), | 183 | ARRAY_SIZE(channel_formats1), |
| 184 | NULL, | ||
| 184 | DRM_PLANE_TYPE_PRIMARY, | 185 | DRM_PLANE_TYPE_PRIMARY, |
| 185 | NULL); | 186 | NULL); |
| 186 | if (ret) { | 187 | if (ret) { |
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 706efd0c4190..9882ebd8751c 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | |||
| @@ -910,7 +910,7 @@ static int ade_plane_init(struct drm_device *dev, struct ade_plane *aplane, | |||
| 910 | return ret; | 910 | return ret; |
| 911 | 911 | ||
| 912 | ret = drm_universal_plane_init(dev, &aplane->base, 1, &ade_plane_funcs, | 912 | ret = drm_universal_plane_init(dev, &aplane->base, 1, &ade_plane_funcs, |
| 913 | fmts, fmts_cnt, type, NULL); | 913 | fmts, fmts_cnt, NULL, type, NULL); |
| 914 | if (ret) { | 914 | if (ret) { |
| 915 | DRM_ERROR("fail to init plane, ch=%d\n", aplane->ch); | 915 | DRM_ERROR("fail to init plane, ch=%d\n", aplane->ch); |
| 916 | return ret; | 916 | return ret; |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e92fd14c06c7..8998d6a27288 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -13809,18 +13809,21 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) | |||
| 13809 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, | 13809 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, |
| 13810 | 0, &intel_plane_funcs, | 13810 | 0, &intel_plane_funcs, |
| 13811 | intel_primary_formats, num_formats, | 13811 | intel_primary_formats, num_formats, |
| 13812 | NULL, | ||
| 13812 | DRM_PLANE_TYPE_PRIMARY, | 13813 | DRM_PLANE_TYPE_PRIMARY, |
| 13813 | "plane 1%c", pipe_name(pipe)); | 13814 | "plane 1%c", pipe_name(pipe)); |
| 13814 | else if (INTEL_GEN(dev_priv) >= 5 || IS_G4X(dev_priv)) | 13815 | else if (INTEL_GEN(dev_priv) >= 5 || IS_G4X(dev_priv)) |
| 13815 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, | 13816 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, |
| 13816 | 0, &intel_plane_funcs, | 13817 | 0, &intel_plane_funcs, |
| 13817 | intel_primary_formats, num_formats, | 13818 | intel_primary_formats, num_formats, |
| 13819 | NULL, | ||
| 13818 | DRM_PLANE_TYPE_PRIMARY, | 13820 | DRM_PLANE_TYPE_PRIMARY, |
| 13819 | "primary %c", pipe_name(pipe)); | 13821 | "primary %c", pipe_name(pipe)); |
| 13820 | else | 13822 | else |
| 13821 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, | 13823 | ret = drm_universal_plane_init(&dev_priv->drm, &primary->base, |
| 13822 | 0, &intel_plane_funcs, | 13824 | 0, &intel_plane_funcs, |
| 13823 | intel_primary_formats, num_formats, | 13825 | intel_primary_formats, num_formats, |
| 13826 | NULL, | ||
| 13824 | DRM_PLANE_TYPE_PRIMARY, | 13827 | DRM_PLANE_TYPE_PRIMARY, |
| 13825 | "plane %c", plane_name(primary->plane)); | 13828 | "plane %c", plane_name(primary->plane)); |
| 13826 | if (ret) | 13829 | if (ret) |
| @@ -13906,7 +13909,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv, | |||
| 13906 | 0, &intel_cursor_plane_funcs, | 13909 | 0, &intel_cursor_plane_funcs, |
| 13907 | intel_cursor_formats, | 13910 | intel_cursor_formats, |
| 13908 | ARRAY_SIZE(intel_cursor_formats), | 13911 | ARRAY_SIZE(intel_cursor_formats), |
| 13909 | DRM_PLANE_TYPE_CURSOR, | 13912 | NULL, DRM_PLANE_TYPE_CURSOR, |
| 13910 | "cursor %c", pipe_name(pipe)); | 13913 | "cursor %c", pipe_name(pipe)); |
| 13911 | if (ret) | 13914 | if (ret) |
| 13912 | goto fail; | 13915 | goto fail; |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 94f9a1332dbf..4c6b387fa9dc 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
| @@ -1171,13 +1171,13 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv, | |||
| 1171 | ret = drm_universal_plane_init(&dev_priv->drm, &intel_plane->base, | 1171 | ret = drm_universal_plane_init(&dev_priv->drm, &intel_plane->base, |
| 1172 | possible_crtcs, &intel_plane_funcs, | 1172 | possible_crtcs, &intel_plane_funcs, |
| 1173 | plane_formats, num_plane_formats, | 1173 | plane_formats, num_plane_formats, |
| 1174 | DRM_PLANE_TYPE_OVERLAY, | 1174 | NULL, DRM_PLANE_TYPE_OVERLAY, |
| 1175 | "plane %d%c", plane + 2, pipe_name(pipe)); | 1175 | "plane %d%c", plane + 2, pipe_name(pipe)); |
| 1176 | else | 1176 | else |
| 1177 | ret = drm_universal_plane_init(&dev_priv->drm, &intel_plane->base, | 1177 | ret = drm_universal_plane_init(&dev_priv->drm, &intel_plane->base, |
| 1178 | possible_crtcs, &intel_plane_funcs, | 1178 | possible_crtcs, &intel_plane_funcs, |
| 1179 | plane_formats, num_plane_formats, | 1179 | plane_formats, num_plane_formats, |
| 1180 | DRM_PLANE_TYPE_OVERLAY, | 1180 | NULL, DRM_PLANE_TYPE_OVERLAY, |
| 1181 | "sprite %c", sprite_name(pipe, plane)); | 1181 | "sprite %c", sprite_name(pipe, plane)); |
| 1182 | if (ret) | 1182 | if (ret) |
| 1183 | goto fail; | 1183 | goto fail; |
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 0847cc0d96a4..debde2dae7bf 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c | |||
| @@ -718,8 +718,8 @@ struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu, | |||
| 718 | 718 | ||
| 719 | ret = drm_universal_plane_init(dev, &ipu_plane->base, possible_crtcs, | 719 | ret = drm_universal_plane_init(dev, &ipu_plane->base, possible_crtcs, |
| 720 | &ipu_plane_funcs, ipu_plane_formats, | 720 | &ipu_plane_funcs, ipu_plane_formats, |
| 721 | ARRAY_SIZE(ipu_plane_formats), type, | 721 | ARRAY_SIZE(ipu_plane_formats), |
| 722 | NULL); | 722 | NULL, type, NULL); |
| 723 | if (ret) { | 723 | if (ret) { |
| 724 | DRM_ERROR("failed to initialize plane\n"); | 724 | DRM_ERROR("failed to initialize plane\n"); |
| 725 | kfree(ipu_plane); | 725 | kfree(ipu_plane); |
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c index 1a59b9ab4aa8..6f121891430f 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c | |||
| @@ -175,7 +175,7 @@ int mtk_plane_init(struct drm_device *dev, struct drm_plane *plane, | |||
| 175 | 175 | ||
| 176 | err = drm_universal_plane_init(dev, plane, possible_crtcs, | 176 | err = drm_universal_plane_init(dev, plane, possible_crtcs, |
| 177 | &mtk_plane_funcs, formats, | 177 | &mtk_plane_funcs, formats, |
| 178 | ARRAY_SIZE(formats), type, NULL); | 178 | ARRAY_SIZE(formats), NULL, type, NULL); |
| 179 | if (err) { | 179 | if (err) { |
| 180 | DRM_ERROR("failed to initialize plane\n"); | 180 | DRM_ERROR("failed to initialize plane\n"); |
| 181 | return err; | 181 | return err; |
diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c index a32d3b6e2e12..17e96fa47868 100644 --- a/drivers/gpu/drm/meson/meson_plane.c +++ b/drivers/gpu/drm/meson/meson_plane.c | |||
| @@ -223,6 +223,7 @@ int meson_plane_create(struct meson_drm *priv) | |||
| 223 | &meson_plane_funcs, | 223 | &meson_plane_funcs, |
| 224 | supported_drm_formats, | 224 | supported_drm_formats, |
| 225 | ARRAY_SIZE(supported_drm_formats), | 225 | ARRAY_SIZE(supported_drm_formats), |
| 226 | NULL, | ||
| 226 | DRM_PLANE_TYPE_PRIMARY, "meson_primary_plane"); | 227 | DRM_PLANE_TYPE_PRIMARY, "meson_primary_plane"); |
| 227 | 228 | ||
| 228 | drm_plane_helper_add(plane, &meson_plane_helper_funcs); | 229 | drm_plane_helper_add(plane, &meson_plane_helper_funcs); |
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c index a20e3d644523..7a1ad3af08e3 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | |||
| @@ -401,7 +401,7 @@ struct drm_plane *mdp4_plane_init(struct drm_device *dev, | |||
| 401 | type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; | 401 | type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; |
| 402 | ret = drm_universal_plane_init(dev, plane, 0xff, &mdp4_plane_funcs, | 402 | ret = drm_universal_plane_init(dev, plane, 0xff, &mdp4_plane_funcs, |
| 403 | mdp4_plane->formats, mdp4_plane->nformats, | 403 | mdp4_plane->formats, mdp4_plane->nformats, |
| 404 | type, NULL); | 404 | NULL, type, NULL); |
| 405 | if (ret) | 405 | if (ret) |
| 406 | goto fail; | 406 | goto fail; |
| 407 | 407 | ||
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c index fe3a4de1a433..61dfea791f3f 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | |||
| @@ -1139,12 +1139,12 @@ struct drm_plane *mdp5_plane_init(struct drm_device *dev, | |||
| 1139 | ret = drm_universal_plane_init(dev, plane, 0xff, | 1139 | ret = drm_universal_plane_init(dev, plane, 0xff, |
| 1140 | &mdp5_cursor_plane_funcs, | 1140 | &mdp5_cursor_plane_funcs, |
| 1141 | mdp5_plane->formats, mdp5_plane->nformats, | 1141 | mdp5_plane->formats, mdp5_plane->nformats, |
| 1142 | type, NULL); | 1142 | NULL, type, NULL); |
| 1143 | else | 1143 | else |
| 1144 | ret = drm_universal_plane_init(dev, plane, 0xff, | 1144 | ret = drm_universal_plane_init(dev, plane, 0xff, |
| 1145 | &mdp5_plane_funcs, | 1145 | &mdp5_plane_funcs, |
| 1146 | mdp5_plane->formats, mdp5_plane->nformats, | 1146 | mdp5_plane->formats, mdp5_plane->nformats, |
| 1147 | type, NULL); | 1147 | NULL, type, NULL); |
| 1148 | if (ret) | 1148 | if (ret) |
| 1149 | goto fail; | 1149 | goto fail; |
| 1150 | 1150 | ||
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index a34f41ce3599..93c38eb6d187 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c | |||
| @@ -190,7 +190,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags) | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs, | 192 | ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs, |
| 193 | mxsfb_formats, ARRAY_SIZE(mxsfb_formats), | 193 | mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL, |
| 194 | &mxsfb->connector); | 194 | &mxsfb->connector); |
| 195 | if (ret < 0) { | 195 | if (ret < 0) { |
| 196 | dev_err(drm->dev, "Cannot setup simple display pipe\n"); | 196 | dev_err(drm->dev, "Cannot setup simple display pipe\n"); |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 7abfb561b00c..bd1199b67eb4 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
| @@ -1083,8 +1083,9 @@ nv50_wndw_ctor(const struct nv50_wndw_func *func, struct drm_device *dev, | |||
| 1083 | wndw->func = func; | 1083 | wndw->func = func; |
| 1084 | wndw->dmac = dmac; | 1084 | wndw->dmac = dmac; |
| 1085 | 1085 | ||
| 1086 | ret = drm_universal_plane_init(dev, &wndw->plane, 0, &nv50_wndw, format, | 1086 | ret = drm_universal_plane_init(dev, &wndw->plane, 0, &nv50_wndw, |
| 1087 | nformat, type, "%s-%d", name, index); | 1087 | format, nformat, NULL, |
| 1088 | type, "%s-%d", name, index); | ||
| 1088 | if (ret) | 1089 | if (ret) |
| 1089 | return ret; | 1090 | return ret; |
| 1090 | 1091 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 2160f64548e0..b92a8f1d0155 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -291,7 +291,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 291 | 291 | ||
| 292 | ret = drm_universal_plane_init(dev, plane, possible_crtcs, | 292 | ret = drm_universal_plane_init(dev, plane, possible_crtcs, |
| 293 | &omap_plane_funcs, formats, | 293 | &omap_plane_funcs, formats, |
| 294 | nformats, type, NULL); | 294 | nformats, NULL, type, NULL); |
| 295 | if (ret < 0) | 295 | if (ret < 0) |
| 296 | goto error; | 296 | goto error; |
| 297 | 297 | ||
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index c6ca4f1bbd49..f0139fa58d55 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c | |||
| @@ -457,7 +457,7 @@ int pl111_display_init(struct drm_device *drm) | |||
| 457 | ret = drm_simple_display_pipe_init(drm, &priv->pipe, | 457 | ret = drm_simple_display_pipe_init(drm, &priv->pipe, |
| 458 | &pl111_display_funcs, | 458 | &pl111_display_funcs, |
| 459 | formats, ARRAY_SIZE(formats), | 459 | formats, ARRAY_SIZE(formats), |
| 460 | &priv->connector.connector); | 460 | NULL, &priv->connector.connector); |
| 461 | if (ret) | 461 | if (ret) |
| 462 | return ret; | 462 | return ret; |
| 463 | 463 | ||
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 5eeae89c138d..14c5613b4388 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c | |||
| @@ -784,7 +784,7 @@ static struct drm_plane *qxl_create_plane(struct qxl_device *qdev, | |||
| 784 | 784 | ||
| 785 | err = drm_universal_plane_init(&qdev->ddev, plane, possible_crtcs, | 785 | err = drm_universal_plane_init(&qdev->ddev, plane, possible_crtcs, |
| 786 | funcs, formats, num_formats, | 786 | funcs, formats, num_formats, |
| 787 | type, NULL); | 787 | NULL, type, NULL); |
| 788 | if (err) | 788 | if (err) |
| 789 | goto free_plane; | 789 | goto free_plane; |
| 790 | 790 | ||
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index dcde6288da6c..2b02eccbfb70 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c | |||
| @@ -743,8 +743,8 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) | |||
| 743 | 743 | ||
| 744 | ret = drm_universal_plane_init(rcdu->ddev, &plane->plane, crtcs, | 744 | ret = drm_universal_plane_init(rcdu->ddev, &plane->plane, crtcs, |
| 745 | &rcar_du_plane_funcs, formats, | 745 | &rcar_du_plane_funcs, formats, |
| 746 | ARRAY_SIZE(formats), type, | 746 | ARRAY_SIZE(formats), |
| 747 | NULL); | 747 | NULL, type, NULL); |
| 748 | if (ret < 0) | 748 | if (ret < 0) |
| 749 | return ret; | 749 | return ret; |
| 750 | 750 | ||
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index f870445ebc8d..7362d80d236b 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c | |||
| @@ -439,8 +439,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp) | |||
| 439 | 1 << vsp->index, | 439 | 1 << vsp->index, |
| 440 | &rcar_du_vsp_plane_funcs, | 440 | &rcar_du_vsp_plane_funcs, |
| 441 | formats_kms, | 441 | formats_kms, |
| 442 | ARRAY_SIZE(formats_kms), type, | 442 | ARRAY_SIZE(formats_kms), |
| 443 | NULL); | 443 | NULL, type, NULL); |
| 444 | if (ret < 0) | 444 | if (ret < 0) |
| 445 | return ret; | 445 | return ret; |
| 446 | 446 | ||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index ee4a12da78ab..ab18659e2a6f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c | |||
| @@ -1288,7 +1288,7 @@ static int vop_create_crtc(struct vop *vop) | |||
| 1288 | 0, &vop_plane_funcs, | 1288 | 0, &vop_plane_funcs, |
| 1289 | win_data->phy->data_formats, | 1289 | win_data->phy->data_formats, |
| 1290 | win_data->phy->nformats, | 1290 | win_data->phy->nformats, |
| 1291 | win_data->type, NULL); | 1291 | NULL, win_data->type, NULL); |
| 1292 | if (ret) { | 1292 | if (ret) { |
| 1293 | DRM_DEV_ERROR(vop->dev, "failed to init plane %d\n", | 1293 | DRM_DEV_ERROR(vop->dev, "failed to init plane %d\n", |
| 1294 | ret); | 1294 | ret); |
| @@ -1327,7 +1327,7 @@ static int vop_create_crtc(struct vop *vop) | |||
| 1327 | &vop_plane_funcs, | 1327 | &vop_plane_funcs, |
| 1328 | win_data->phy->data_formats, | 1328 | win_data->phy->data_formats, |
| 1329 | win_data->phy->nformats, | 1329 | win_data->phy->nformats, |
| 1330 | win_data->type, NULL); | 1330 | NULL, win_data->type, NULL); |
| 1331 | if (ret) { | 1331 | if (ret) { |
| 1332 | DRM_DEV_ERROR(vop->dev, "failed to init overlay %d\n", | 1332 | DRM_DEV_ERROR(vop->dev, "failed to init overlay %d\n", |
| 1333 | ret); | 1333 | ret); |
diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c index 5b3a41f74f21..f31cbe898eb3 100644 --- a/drivers/gpu/drm/sti/sti_cursor.c +++ b/drivers/gpu/drm/sti/sti_cursor.c | |||
| @@ -392,7 +392,7 @@ struct drm_plane *sti_cursor_create(struct drm_device *drm_dev, | |||
| 392 | &sti_cursor_plane_helpers_funcs, | 392 | &sti_cursor_plane_helpers_funcs, |
| 393 | cursor_supported_formats, | 393 | cursor_supported_formats, |
| 394 | ARRAY_SIZE(cursor_supported_formats), | 394 | ARRAY_SIZE(cursor_supported_formats), |
| 395 | DRM_PLANE_TYPE_CURSOR, NULL); | 395 | NULL, DRM_PLANE_TYPE_CURSOR, NULL); |
| 396 | if (res) { | 396 | if (res) { |
| 397 | DRM_ERROR("Failed to initialize universal plane\n"); | 397 | DRM_ERROR("Failed to initialize universal plane\n"); |
| 398 | goto err_plane; | 398 | goto err_plane; |
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 5ee0503945c8..dceedbe702d7 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c | |||
| @@ -931,7 +931,7 @@ struct drm_plane *sti_gdp_create(struct drm_device *drm_dev, | |||
| 931 | &sti_gdp_plane_helpers_funcs, | 931 | &sti_gdp_plane_helpers_funcs, |
| 932 | gdp_supported_formats, | 932 | gdp_supported_formats, |
| 933 | ARRAY_SIZE(gdp_supported_formats), | 933 | ARRAY_SIZE(gdp_supported_formats), |
| 934 | type, NULL); | 934 | NULL, type, NULL); |
| 935 | if (res) { | 935 | if (res) { |
| 936 | DRM_ERROR("Failed to initialize universal plane\n"); | 936 | DRM_ERROR("Failed to initialize universal plane\n"); |
| 937 | goto err; | 937 | goto err; |
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index 53a46dda8bd5..f11230853116 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c | |||
| @@ -1298,7 +1298,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev, | |||
| 1298 | &sti_hqvdp_plane_helpers_funcs, | 1298 | &sti_hqvdp_plane_helpers_funcs, |
| 1299 | hqvdp_supported_formats, | 1299 | hqvdp_supported_formats, |
| 1300 | ARRAY_SIZE(hqvdp_supported_formats), | 1300 | ARRAY_SIZE(hqvdp_supported_formats), |
| 1301 | DRM_PLANE_TYPE_OVERLAY, NULL); | 1301 | NULL, DRM_PLANE_TYPE_OVERLAY, NULL); |
| 1302 | if (res) { | 1302 | if (res) { |
| 1303 | DRM_ERROR("Failed to initialize universal plane\n"); | 1303 | DRM_ERROR("Failed to initialize universal plane\n"); |
| 1304 | return NULL; | 1304 | return NULL; |
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 04cc66d6b96f..ae9eb0fff06b 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c | |||
| @@ -735,7 +735,7 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev, | |||
| 735 | 735 | ||
| 736 | ret = drm_universal_plane_init(ddev, plane, possible_crtcs, | 736 | ret = drm_universal_plane_init(ddev, plane, possible_crtcs, |
| 737 | <dc_plane_funcs, formats, nb_fmt, | 737 | <dc_plane_funcs, formats, nb_fmt, |
| 738 | type, NULL); | 738 | NULL, type, NULL); |
| 739 | if (ret < 0) | 739 | if (ret < 0) |
| 740 | return 0; | 740 | return 0; |
| 741 | 741 | ||
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index ead4f9d4c1ee..d45f3a1a0a29 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c | |||
| @@ -115,7 +115,7 @@ static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm, | |||
| 115 | ret = drm_universal_plane_init(drm, &layer->plane, 0, | 115 | ret = drm_universal_plane_init(drm, &layer->plane, 0, |
| 116 | &sun4i_backend_layer_funcs, | 116 | &sun4i_backend_layer_funcs, |
| 117 | plane->formats, plane->nformats, | 117 | plane->formats, plane->nformats, |
| 118 | plane->type, NULL); | 118 | NULL, plane->type, NULL); |
| 119 | if (ret) { | 119 | if (ret) { |
| 120 | dev_err(drm->dev, "Couldn't initialize layer\n"); | 120 | dev_err(drm->dev, "Couldn't initialize layer\n"); |
| 121 | return ERR_PTR(ret); | 121 | return ERR_PTR(ret); |
diff --git a/drivers/gpu/drm/sun4i/sun8i_layer.c b/drivers/gpu/drm/sun4i/sun8i_layer.c index e627eeece658..23810ff72684 100644 --- a/drivers/gpu/drm/sun4i/sun8i_layer.c +++ b/drivers/gpu/drm/sun4i/sun8i_layer.c | |||
| @@ -90,7 +90,7 @@ static struct sun8i_layer *sun8i_layer_init_one(struct drm_device *drm, | |||
| 90 | ret = drm_universal_plane_init(drm, &layer->plane, 0, | 90 | ret = drm_universal_plane_init(drm, &layer->plane, 0, |
| 91 | &sun8i_mixer_layer_funcs, | 91 | &sun8i_mixer_layer_funcs, |
| 92 | plane->formats, plane->nformats, | 92 | plane->formats, plane->nformats, |
| 93 | plane->type, NULL); | 93 | NULL, plane->type, NULL); |
| 94 | if (ret) { | 94 | if (ret) { |
| 95 | dev_err(drm->dev, "Couldn't initialize layer\n"); | 95 | dev_err(drm->dev, "Couldn't initialize layer\n"); |
| 96 | return ERR_PTR(ret); | 96 | return ERR_PTR(ret); |
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 0cb9b90e2e68..4df39112e38e 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c | |||
| @@ -678,8 +678,8 @@ static struct drm_plane *tegra_dc_primary_plane_create(struct drm_device *drm, | |||
| 678 | 678 | ||
| 679 | err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, | 679 | err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, |
| 680 | &tegra_primary_plane_funcs, formats, | 680 | &tegra_primary_plane_funcs, formats, |
| 681 | num_formats, DRM_PLANE_TYPE_PRIMARY, | 681 | num_formats, NULL, |
| 682 | NULL); | 682 | DRM_PLANE_TYPE_PRIMARY, NULL); |
| 683 | if (err < 0) { | 683 | if (err < 0) { |
| 684 | kfree(plane); | 684 | kfree(plane); |
| 685 | return ERR_PTR(err); | 685 | return ERR_PTR(err); |
| @@ -844,8 +844,8 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm, | |||
| 844 | 844 | ||
| 845 | err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, | 845 | err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, |
| 846 | &tegra_cursor_plane_funcs, formats, | 846 | &tegra_cursor_plane_funcs, formats, |
| 847 | num_formats, DRM_PLANE_TYPE_CURSOR, | 847 | num_formats, NULL, |
| 848 | NULL); | 848 | DRM_PLANE_TYPE_CURSOR, NULL); |
| 849 | if (err < 0) { | 849 | if (err < 0) { |
| 850 | kfree(plane); | 850 | kfree(plane); |
| 851 | return ERR_PTR(err); | 851 | return ERR_PTR(err); |
| @@ -906,8 +906,8 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm, | |||
| 906 | 906 | ||
| 907 | err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, | 907 | err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, |
| 908 | &tegra_overlay_plane_funcs, formats, | 908 | &tegra_overlay_plane_funcs, formats, |
| 909 | num_formats, DRM_PLANE_TYPE_OVERLAY, | 909 | num_formats, NULL, |
| 910 | NULL); | 910 | DRM_PLANE_TYPE_OVERLAY, NULL); |
| 911 | if (err < 0) { | 911 | if (err < 0) { |
| 912 | kfree(plane); | 912 | kfree(plane); |
| 913 | return ERR_PTR(err); | 913 | return ERR_PTR(err); |
diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c index ec43fb7ad9e4..26823a4a07d8 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | |||
| @@ -225,7 +225,7 @@ tinydrm_display_pipe_init(struct tinydrm_device *tdev, | |||
| 225 | return PTR_ERR(connector); | 225 | return PTR_ERR(connector); |
| 226 | 226 | ||
| 227 | ret = drm_simple_display_pipe_init(drm, &tdev->pipe, funcs, formats, | 227 | ret = drm_simple_display_pipe_init(drm, &tdev->pipe, funcs, formats, |
| 228 | format_count, connector); | 228 | format_count, NULL, connector); |
| 229 | if (ret) | 229 | if (ret) |
| 230 | return ret; | 230 | return ret; |
| 231 | 231 | ||
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 8853e9a4f005..2968b3ebb895 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c | |||
| @@ -902,7 +902,7 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev, | |||
| 902 | ret = drm_universal_plane_init(dev, plane, 0, | 902 | ret = drm_universal_plane_init(dev, plane, 0, |
| 903 | &vc4_plane_funcs, | 903 | &vc4_plane_funcs, |
| 904 | formats, num_formats, | 904 | formats, num_formats, |
| 905 | type, NULL); | 905 | NULL, type, NULL); |
| 906 | 906 | ||
| 907 | drm_plane_helper_add(plane, &vc4_plane_helper_funcs); | 907 | drm_plane_helper_add(plane, &vc4_plane_helper_funcs); |
| 908 | 908 | ||
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index adcdbd0abef6..71ba455af915 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c | |||
| @@ -298,7 +298,7 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, | |||
| 298 | ret = drm_universal_plane_init(dev, plane, 1 << index, | 298 | ret = drm_universal_plane_init(dev, plane, 1 << index, |
| 299 | &virtio_gpu_plane_funcs, | 299 | &virtio_gpu_plane_funcs, |
| 300 | formats, nformats, | 300 | formats, nformats, |
| 301 | type, NULL); | 301 | NULL, type, NULL); |
| 302 | if (ret) | 302 | if (ret) |
| 303 | goto err_plane_init; | 303 | goto err_plane_init; |
| 304 | 304 | ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c index 6391069498d6..b8a09807c5de 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | |||
| @@ -428,7 +428,7 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 428 | 0, &vmw_ldu_plane_funcs, | 428 | 0, &vmw_ldu_plane_funcs, |
| 429 | vmw_primary_plane_formats, | 429 | vmw_primary_plane_formats, |
| 430 | ARRAY_SIZE(vmw_primary_plane_formats), | 430 | ARRAY_SIZE(vmw_primary_plane_formats), |
| 431 | DRM_PLANE_TYPE_PRIMARY, NULL); | 431 | NULL, DRM_PLANE_TYPE_PRIMARY, NULL); |
| 432 | if (ret) { | 432 | if (ret) { |
| 433 | DRM_ERROR("Failed to initialize primary plane"); | 433 | DRM_ERROR("Failed to initialize primary plane"); |
| 434 | goto err_free; | 434 | goto err_free; |
| @@ -443,7 +443,7 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 443 | 0, &vmw_ldu_cursor_funcs, | 443 | 0, &vmw_ldu_cursor_funcs, |
| 444 | vmw_cursor_plane_formats, | 444 | vmw_cursor_plane_formats, |
| 445 | ARRAY_SIZE(vmw_cursor_plane_formats), | 445 | ARRAY_SIZE(vmw_cursor_plane_formats), |
| 446 | DRM_PLANE_TYPE_CURSOR, NULL); | 446 | NULL, DRM_PLANE_TYPE_CURSOR, NULL); |
| 447 | if (ret) { | 447 | if (ret) { |
| 448 | DRM_ERROR("Failed to initialize cursor plane"); | 448 | DRM_ERROR("Failed to initialize cursor plane"); |
| 449 | drm_plane_cleanup(&ldu->base.primary); | 449 | drm_plane_cleanup(&ldu->base.primary); |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index 854403509216..d1552d3e0652 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | |||
| @@ -624,7 +624,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 624 | 0, &vmw_sou_plane_funcs, | 624 | 0, &vmw_sou_plane_funcs, |
| 625 | vmw_primary_plane_formats, | 625 | vmw_primary_plane_formats, |
| 626 | ARRAY_SIZE(vmw_primary_plane_formats), | 626 | ARRAY_SIZE(vmw_primary_plane_formats), |
| 627 | DRM_PLANE_TYPE_PRIMARY, NULL); | 627 | NULL, DRM_PLANE_TYPE_PRIMARY, NULL); |
| 628 | if (ret) { | 628 | if (ret) { |
| 629 | DRM_ERROR("Failed to initialize primary plane"); | 629 | DRM_ERROR("Failed to initialize primary plane"); |
| 630 | goto err_free; | 630 | goto err_free; |
| @@ -639,7 +639,7 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 639 | 0, &vmw_sou_cursor_funcs, | 639 | 0, &vmw_sou_cursor_funcs, |
| 640 | vmw_cursor_plane_formats, | 640 | vmw_cursor_plane_formats, |
| 641 | ARRAY_SIZE(vmw_cursor_plane_formats), | 641 | ARRAY_SIZE(vmw_cursor_plane_formats), |
| 642 | DRM_PLANE_TYPE_CURSOR, NULL); | 642 | NULL, DRM_PLANE_TYPE_CURSOR, NULL); |
| 643 | if (ret) { | 643 | if (ret) { |
| 644 | DRM_ERROR("Failed to initialize cursor plane"); | 644 | DRM_ERROR("Failed to initialize cursor plane"); |
| 645 | drm_plane_cleanup(&sou->base.primary); | 645 | drm_plane_cleanup(&sou->base.primary); |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c index ed9404a7f457..c4de4ad0543b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | |||
| @@ -1475,7 +1475,7 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 1475 | 0, &vmw_stdu_plane_funcs, | 1475 | 0, &vmw_stdu_plane_funcs, |
| 1476 | vmw_primary_plane_formats, | 1476 | vmw_primary_plane_formats, |
| 1477 | ARRAY_SIZE(vmw_primary_plane_formats), | 1477 | ARRAY_SIZE(vmw_primary_plane_formats), |
| 1478 | DRM_PLANE_TYPE_PRIMARY, NULL); | 1478 | NULL, DRM_PLANE_TYPE_PRIMARY, NULL); |
| 1479 | if (ret) { | 1479 | if (ret) { |
| 1480 | DRM_ERROR("Failed to initialize primary plane"); | 1480 | DRM_ERROR("Failed to initialize primary plane"); |
| 1481 | goto err_free; | 1481 | goto err_free; |
| @@ -1490,7 +1490,7 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) | |||
| 1490 | 0, &vmw_stdu_cursor_funcs, | 1490 | 0, &vmw_stdu_cursor_funcs, |
| 1491 | vmw_cursor_plane_formats, | 1491 | vmw_cursor_plane_formats, |
| 1492 | ARRAY_SIZE(vmw_cursor_plane_formats), | 1492 | ARRAY_SIZE(vmw_cursor_plane_formats), |
| 1493 | DRM_PLANE_TYPE_CURSOR, NULL); | 1493 | NULL, DRM_PLANE_TYPE_CURSOR, NULL); |
| 1494 | if (ret) { | 1494 | if (ret) { |
| 1495 | DRM_ERROR("Failed to initialize cursor plane"); | 1495 | DRM_ERROR("Failed to initialize cursor plane"); |
| 1496 | drm_plane_cleanup(&stdu->base.primary); | 1496 | drm_plane_cleanup(&stdu->base.primary); |
diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c index 4a6252720c10..18e763493264 100644 --- a/drivers/gpu/drm/zte/zx_plane.c +++ b/drivers/gpu/drm/zte/zx_plane.c | |||
| @@ -540,7 +540,7 @@ int zx_plane_init(struct drm_device *drm, struct zx_plane *zplane, | |||
| 540 | 540 | ||
| 541 | ret = drm_universal_plane_init(drm, plane, VOU_CRTC_MASK, | 541 | ret = drm_universal_plane_init(drm, plane, VOU_CRTC_MASK, |
| 542 | &zx_plane_funcs, formats, format_count, | 542 | &zx_plane_funcs, formats, format_count, |
| 543 | type, NULL); | 543 | NULL, type, NULL); |
| 544 | if (ret) { | 544 | if (ret) { |
| 545 | DRM_DEV_ERROR(dev, "failed to init universal plane: %d\n", ret); | 545 | DRM_DEV_ERROR(dev, "failed to init universal plane: %d\n", ret); |
| 546 | return ret; | 546 | return ret; |
