summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_simple_kms_helper.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-10-25 19:26:35 +0300
committerEric Anholt <eric@anholt.net>2018-10-30 23:01:50 +0300
commitdff906c3f91c642ef04731e63c3b5f0e520f7778 (patch)
tree328aa24cad066eb702d5b34d9e3a6c94f3ecdcb1 /drivers/gpu/drm/drm_simple_kms_helper.c
parent01f23459cf93a57d11bd93e660460f135b237af5 (diff)
downloadlinux-dff906c3f91c642ef04731e63c3b5f0e520f7778.tar.xz
drm/tinydrm: Advertise that we can do only DRM_FORMAT_MOD_LINEAR.
Without this, the xserver relies on what the 3D driver exposes and assumes that the display can handle it, and then the DRM driver happily tries to scan out a tiled format. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181025162635.6689-1-eric@anholt.net Acked-by: Noralf Trønnes <noralf@tronnes.org>
Diffstat (limited to 'drivers/gpu/drm/drm_simple_kms_helper.c')
-rw-r--r--drivers/gpu/drm/drm_simple_kms_helper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 51fa978f0d23..917812448d1b 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -190,6 +190,13 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane,
pipe->funcs->cleanup_fb(pipe, state);
}
+static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane,
+ uint32_t format,
+ uint64_t modifier)
+{
+ return modifier == DRM_FORMAT_MOD_LINEAR;
+}
+
static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = {
.prepare_fb = drm_simple_kms_plane_prepare_fb,
.cleanup_fb = drm_simple_kms_plane_cleanup_fb,
@@ -204,6 +211,7 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
.reset = drm_atomic_helper_plane_reset,
.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
+ .format_mod_supported = drm_simple_kms_format_mod_supported,
};
/**