linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drm/tegra: plane: Permit tiling modifiers
@ 2018-08-18 16:03 Dmitry Osipenko
  2018-10-15 13:58 ` Dmitry Osipenko
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2018-08-18 16:03 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, dri-devel

Tiling modifier can't be applied to overlay planes because all tile
modifiers are filtered out.

Fixes: e90124cb46bdb ("drm/tegra: plane: Support format modifiers")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/drm/tegra/plane.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
index d068e8aa3553..cd6f7116d8f6 100644
--- a/drivers/gpu/drm/tegra/plane.c
+++ b/drivers/gpu/drm/tegra/plane.c
@@ -76,13 +76,17 @@ static bool tegra_plane_format_mod_supported(struct drm_plane *plane,
 					     uint32_t format,
 					     uint64_t modifier)
 {
-	const struct drm_format_info *info = drm_format_info(format);
-
-	if (modifier == DRM_FORMAT_MOD_LINEAR)
-		return true;
-
-	if (info->num_planes == 1)
+	switch (modifier) {
+	case DRM_FORMAT_MOD_LINEAR:
+	case DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED:
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0):
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1):
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2):
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3):
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4):
+	case DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5):
 		return true;
+	}
 
 	return false;
 }
-- 
2.18.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-15 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-18 16:03 [PATCH v1] drm/tegra: plane: Permit tiling modifiers Dmitry Osipenko
2018-10-15 13:58 ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).