Hi Emil. > > > > Like this: > > > > static inline void via_write8_mask_or(struct drm_via_private *dev_priv, > > u32 reg, u32 mask) > > { > > u32 val; > > > > val = readb((void __iomem *)(dev_priv->mmio->handle + reg)); > > writeb(val | mask, (void __iomem *)(dev_priv->mmio->handle + reg)); > > } > > > > static inline void via_write8_mask_and(struct drm_via_private *dev_priv, > > u32 reg, u32 mask) > > { > > u32 val; > > > > val = readb((void __iomem *)(dev_priv->mmio->handle + reg)); > > writeb(val & mask, (void __iomem *)(dev_priv->mmio->handle + reg)); > > } > > > > Patches are almost ready, but if there is any quick feedback let me > > know. > > > > Don't think I've seen any "mask_and" "mask_or" API in DRM. The common > theme seems to be: > > mtk_cec_mask(driver_priv, offset, value, mask) > malidp_write32_mask(driver_priv, offset, mask, value) > nvif_mask(driver_priv, address, mask, value) Yep, this is better. Will send out an updated version. Hmm, some inconsistency in order of parameters. Decided for mask, value - seems a little bit more logical to me. Sam _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel