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>
This commit is contained in:
parent
e90124cb46
commit
4ae4b5c0db
@ -55,6 +55,11 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
|
|||||||
uint64_t modifier = fb->base.modifier;
|
uint64_t modifier = fb->base.modifier;
|
||||||
|
|
||||||
switch (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:
|
case DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED:
|
||||||
tiling->mode = TEGRA_BO_TILING_MODE_TILED;
|
tiling->mode = TEGRA_BO_TILING_MODE_TILED;
|
||||||
tiling->value = 0;
|
tiling->value = 0;
|
||||||
@ -91,9 +96,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* TODO: handle YUV formats? */
|
return -EINVAL;
|
||||||
*tiling = fb->planes[0]->tiling;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user