1
0
Fork 0

MLK-20307 gpu: imx: dpu: extdst: Fix get_xval()

The function get_xval() returns the C_XVAL and L_XVAL fields of
the CURPIXELCNT and LASTPIXELCNT registers.  They are 16bit and
sit in the low 16bit of the registers.  This patch fixes the way
we mask the register and read the fields out.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
pull/10/head
Liu Ying 2018-11-09 17:20:27 +08:00
parent 846e41c2e7
commit 92899d70e5
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@
#define CURPIXELCNT 0x1C
static u16 get_xval(u32 pixel_cnt)
{
return pixel_cnt && 0xFF;
return pixel_cnt & 0xFFFF;
}
static u16 get_yval(u32 pixel_cnt)