drm/msm/dpu: Initialize supported modifiers
authorFritz Koenig <frkoenig@google.com>
Tue, 11 Dec 2018 18:42:23 +0000 (10:42 -0800)
committerSean Paul <seanpaul@chromium.org>
Fri, 1 Feb 2019 15:35:54 +0000 (10:35 -0500)
Pass list of supported modifiers to plane init.

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

index 020a23ca606a44080da2653ddc22da33905546e0..b01183b309b9e301ec3337e58ab5ad074d1d22b1 100644 (file)
@@ -119,6 +119,12 @@ struct dpu_plane {
        bool debugfs_default_scale;
 };
 
+static const uint64_t supported_format_modifiers[] = {
+       DRM_FORMAT_MOD_QCOM_COMPRESSED,
+       DRM_FORMAT_MOD_LINEAR,
+       DRM_FORMAT_MOD_INVALID
+};
+
 #define to_dpu_plane(x) container_of(x, struct dpu_plane, base)
 
 static struct dpu_kms *_dpu_plane_get_kms(struct drm_plane *plane)
@@ -1519,7 +1525,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 
        ret = drm_universal_plane_init(dev, plane, 0xff, &dpu_plane_funcs,
                                format_list, num_formats,
-                               NULL, type, NULL);
+                               supported_format_modifiers, type, NULL);
        if (ret)
                goto clean_sspp;