From patchwork Tue Nov 22 07:54:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 9440615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A105860237 for ; Tue, 22 Nov 2016 08:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FF3328478 for ; Tue, 22 Nov 2016 08:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9302028482; Tue, 22 Nov 2016 08:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7E1128478 for ; Tue, 22 Nov 2016 08:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755568AbcKVIfE (ORCPT ); Tue, 22 Nov 2016 03:35:04 -0500 Received: from botnar.kaiser.cx ([176.28.20.183]:43100 "EHLO botnar.kaiser.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755373AbcKVIfD (ORCPT ); Tue, 22 Nov 2016 03:35:03 -0500 X-Greylist: delayed 2413 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Nov 2016 03:35:03 EST Received: from p4fd79fc5.dip0.t-ipconnect.de ([79.215.159.197] helo=reykholt.kaiser.cx) by botnar.kaiser.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1c95ug-0006rL-CJ; Tue, 22 Nov 2016 08:54:46 +0100 From: Martin Kaiser To: Sascha Hauer , linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH] video: imxfb: correct the bitmask for DMACR_HM/_TM Date: Tue, 22 Nov 2016 08:54:18 +0100 Message-Id: <1479801258-3765-1-git-send-email-martin@kaiser.cx> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;