diff options
author | Eric Anholt <eric@anholt.net> | 2018-10-25 09:26:35 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2018-10-30 13:01:50 -0700 |
commit | dff906c3f91c642ef04731e63c3b5f0e520f7778 (patch) | |
tree | 328aa24cad066eb702d5b34d9e3a6c94f3ecdcb1 /drivers/gpu/drm/tinydrm | |
parent | 01f23459cf93a57d11bd93e660460f135b237af5 (diff) |
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/tinydrm')
-rw-r--r-- | drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c index 255341ee4eb9..9af51d982a33 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -146,6 +146,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev, drm->dev_private = tdev; drm_mode_config_init(drm); drm->mode_config.funcs = &tinydrm_mode_config_funcs; + drm->mode_config.allow_fb_modifiers = true; return 0; } diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c index 7e8e24d0b7a7..eacfc0ec8ff1 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c @@ -184,6 +184,10 @@ tinydrm_display_pipe_init(struct tinydrm_device *tdev, struct drm_display_mode mode_copy; struct drm_connector *connector; int ret; + static const uint64_t modifiers[] = { + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID + }; drm_mode_copy(&mode_copy, mode); ret = tinydrm_rotate_mode(&mode_copy, rotation); @@ -202,6 +206,6 @@ tinydrm_display_pipe_init(struct tinydrm_device *tdev, return PTR_ERR(connector); return drm_simple_display_pipe_init(drm, &tdev->pipe, funcs, formats, - format_count, NULL, connector); + format_count, modifiers, connector); } EXPORT_SYMBOL(tinydrm_display_pipe_init); |