All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: imxfb: correct the bitmask for DMACR_HM/_TM
@ 2016-11-22  7:54 ` Martin Kaiser
  0 siblings, 0 replies; 20+ messages in thread
From: Martin Kaiser @ 2016-11-22  7:54 UTC (permalink / raw)
  To: Sascha Hauer, linux-fbdev; +Cc: linux-kernel, Martin Kaiser

The HM and TM fields in the LCDC DMA Control Register are 7 bits wide.
Use the correct mask to allow setting all possible bits.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---

This bug was discovered on a board that uses DMACR_TM(16). We ended up
with TM==0 in the register, the upper three bits were filtered out.

The LCD DMA Control Register is described in section 33.3.16 of the
IMX25 reference manual.

 include/linux/platform_data/video-imxfb.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/platform_data/video-imxfb.h b/include/linux/platform_data/video-imxfb.h
index 18e9083..858c66d 100644
--- a/include/linux/platform_data/video-imxfb.h
+++ b/include/linux/platform_data/video-imxfb.h
@@ -48,8 +48,8 @@
 #define LSCR1_GRAY1(x)            (((x) & 0xf))
 
 #define DMACR_BURST	(1 << 31)
-#define DMACR_HM(x)	(((x) & 0xf) << 16)
-#define DMACR_TM(x)	((x) & 0xf)
+#define DMACR_HM(x)	(((x) & 0x7f) << 16)
+#define DMACR_TM(x)	((x) & 0x7f)
 
 struct imx_fb_videomode {
 	struct fb_videomode mode;
-- 
1.7.10.4

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

end of thread, other threads:[~2017-01-11 12:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22  7:54 [PATCH] video: imxfb: correct the bitmask for DMACR_HM/_TM Martin Kaiser
2016-11-22  7:54 ` Martin Kaiser
2016-11-22  8:42 ` Uwe Kleine-König
2016-11-22  8:42   ` Uwe Kleine-König
2016-11-23  9:31   ` Martin Kaiser
2016-11-23  9:31     ` Martin Kaiser
2016-11-23  9:50     ` Uwe Kleine-König
2016-11-23  9:50       ` Uwe Kleine-König
2016-11-25  8:43       ` Martin Kaiser
2016-11-25  8:43         ` Martin Kaiser
2016-11-28 22:43         ` [PATCH] video: imxfb: remove the macros for initializing the DMACR Martin Kaiser
2016-11-28 22:43           ` Martin Kaiser
2016-11-29  7:49           ` Uwe Kleine-König
2016-11-29  7:49             ` Uwe Kleine-König
2016-11-29 19:50             ` [PATCH v2] " Martin Kaiser
2016-11-29 19:50               ` Martin Kaiser
2016-11-29 19:57               ` Uwe Kleine-König
2016-11-29 19:57                 ` Uwe Kleine-König
     [not found]                 ` <CGME20170111124006epcas5p138afe03766a09b68eac3f93a9047ee27@epcas5p1.samsung.com>
2017-01-11 12:39                   ` Bartlomiej Zolnierkiewicz
2017-01-11 12:39                     ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.