* [PATCH v1] drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
@ 2021-05-30 19:55 Dmitry Osipenko
2021-05-31 9:03 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2021-05-30 19:55 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter, Mikko Perttunen; +Cc: dri-devel, linux-tegra
The format modifier is 64bit, while DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
uses BIT() macro that is 32bit on ARM32.
The (modifier &= ~DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) doesn't work as
expected on ARM32 and tegra_fb_get_tiling() fails for the tiled formats
on 32bit Tegra because modifier mask isn't applied properly. Use the
BIT_ULL() macro to fix this trouble.
Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/gpu/drm/tegra/drm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 87df251c1fcf..0cb868065348 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -25,7 +25,7 @@
#include "trace.h"
/* XXX move to include/uapi/drm/drm_fourcc.h? */
-#define DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT BIT(22)
+#define DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT BIT_ULL(22)
struct reset_control;
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1] drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
2021-05-30 19:55 [PATCH v1] drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT Dmitry Osipenko
@ 2021-05-31 9:03 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2021-05-31 9:03 UTC (permalink / raw)
To: Mikko Perttunen, Thierry Reding, Dmitry Osipenko, Jonathan Hunter
Cc: dri-devel, linux-tegra
From: Thierry Reding <treding@nvidia.com>
On Sun, 30 May 2021 22:55:06 +0300, Dmitry Osipenko wrote:
> The format modifier is 64bit, while DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
> uses BIT() macro that is 32bit on ARM32.
>
> The (modifier &= ~DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) doesn't work as
> expected on ARM32 and tegra_fb_get_tiling() fails for the tiled formats
> on 32bit Tegra because modifier mask isn't applied properly. Use the
> BIT_ULL() macro to fix this trouble.
Applied, thanks!
[1/1] drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
commit: cdbbb5978467469a2ee2311ef0efc407f8c0bfea
Best regards,
--
Thierry Reding <treding@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-31 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-30 19:55 [PATCH v1] drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT Dmitry Osipenko
2021-05-31 9:03 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox