]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/staging/xgifb/vb_util.h
0f6d5aac04f6917b5e7f6d7cd0eab48258af5852
1 /* SPDX-License-Identifier: GPL-2.0 */
4 static inline void xgifb_reg_set(unsigned long port
, u8 index
, u8 data
)
10 static inline u8
xgifb_reg_get(unsigned long port
, u8 index
)
16 static inline void xgifb_reg_and_or(unsigned long port
, u8 index
,
17 unsigned int data_and
, unsigned int data_or
)
21 temp
= xgifb_reg_get(port
, index
);
22 temp
= (u8
)((temp
& data_and
) | data_or
);
23 xgifb_reg_set(port
, index
, temp
);
26 static inline void xgifb_reg_and(unsigned long port
, u8 index
,
27 unsigned int data_and
)
31 temp
= xgifb_reg_get(port
, index
);
32 temp
= (u8
)(temp
& data_and
);
33 xgifb_reg_set(port
, index
, temp
);
36 static inline void xgifb_reg_or(unsigned long port
, u8 index
,
41 temp
= xgifb_reg_get(port
, index
);
43 xgifb_reg_set(port
, index
, temp
);