mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
drm/rockchip: fix VOP_REG_SUPPORT judge wrong
If the register isn't define at rockchip_vop_reg.c, the default value of reg.major is 0, this will lead to judge error. so we add reg.mask conditions because if it's defined register, the reg.mask can't be 0. Change-Id: I753b92476fda15a64f94e4a8a47894c5ac3a1a7f Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -51,10 +51,11 @@
|
||||
#define MAX_VOPS 2
|
||||
|
||||
#define VOP_REG_SUPPORT(vop, reg) \
|
||||
(!reg.major || (reg.major == VOP_MAJOR(vop->version) && \
|
||||
reg.begin_minor <= VOP_MINOR(vop->version) && \
|
||||
reg.end_minor >= VOP_MINOR(vop->version) && \
|
||||
reg.mask))
|
||||
(reg.mask && \
|
||||
(!reg.major || \
|
||||
(reg.major == VOP_MAJOR(vop->version) && \
|
||||
reg.begin_minor <= VOP_MINOR(vop->version) && \
|
||||
reg.end_minor >= VOP_MINOR(vop->version))))
|
||||
|
||||
#define VOP_WIN_SUPPORT(vop, win, name) \
|
||||
VOP_REG_SUPPORT(vop, win->phy->name)
|
||||
|
||||
Reference in New Issue
Block a user