Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ae4b5c0 authored by Thierry Reding's avatar Thierry Reding
Browse files

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: default avatarThierry Reding <treding@nvidia.com>
parent e90124cb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;