Re: [PATCH v2 1/4] drm/via: drop use of DRM(READ|WRITE) macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux