diff options
author | Thierry Reding <treding@nvidia.com> | 2018-03-15 16:45:45 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-03-15 19:06:19 +0100 |
commit | 4ae4b5c0dbaa499f2fd9215caac6e474c8dd477f (patch) | |
tree | 090110157d7c9c0cb370e3de4d76bc4965559241 /drivers/gpu/drm/tegra/fb.c | |
parent | e90124cb46bdb6b8dd642e0066207ace0fc3f972 (diff) |
drm/tegra: fb: Properly support linear modifier
Instead of relying on the tiling attached to a buffer object, make sure
to set the proper tiling for linear buffers.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/fb.c')
-rw-r--r-- | drivers/gpu/drm/tegra/fb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index 0786159edef3..e69434909a42 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -55,6 +55,11 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer, uint64_t modifier = fb->base.modifier; switch (modifier) { + case DRM_FORMAT_MOD_LINEAR: + tiling->mode = TEGRA_BO_TILING_MODE_PITCH; + tiling->value = 0; + break; + case DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED: tiling->mode = TEGRA_BO_TILING_MODE_TILED; tiling->value = 0; @@ -91,9 +96,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer, break; default: - /* TODO: handle YUV formats? */ - *tiling = fb->planes[0]->tiling; - break; + return -EINVAL; } return 0; |