All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "Thomas Hellstrom" <thellstrom@vmware.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	openchrome-devel@lists.freedesktop.org,
	"Kevin Brace" <kevinbrace@gmx.com>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>,
	"Ira Weiny" <ira.weiny@intel.com>,
	"Michel Dänzer" <michel@daenzer.net>,
	"Mike Marshall" <hubcap@omnibond.com>
Subject: Re: [PATCH v2 1/4] drm/via: drop use of DRM(READ|WRITE) macros
Date: Tue, 23 Jul 2019 21:01:29 +0200	[thread overview]
Message-ID: <20190723190129.GA26326@ravnborg.org> (raw)
In-Reply-To: <20190723114928.GA12807@arch-x1c3>

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
_______________________________________________
openchrome-devel mailing list
openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

  reply	other threads:[~2019-07-23 19:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  8:45 [PATCH v2 0/6] drm/via: drop use of deprecated headers drmP.h and drm_os_linux.h Sam Ravnborg
2019-07-20  8:45 ` [PATCH v2 1/4] drm/via: drop use of DRM(READ|WRITE) macros Sam Ravnborg
2019-07-22 15:38   ` Emil Velikov
2019-07-22 16:17     ` Sam Ravnborg
2019-07-22 16:27       ` Emil Velikov
2019-07-22 18:27         ` Sam Ravnborg
2019-07-23 11:49           ` Emil Velikov
2019-07-23 19:01             ` Sam Ravnborg [this message]
2019-07-20  8:45 ` [PATCH v2 2/4] drm/via: add VIA_WAIT_ON() Sam Ravnborg
2019-07-22 15:46   ` Emil Velikov
2019-07-22 16:18     ` Sam Ravnborg
2019-07-20  8:45 ` [PATCH v2 3/4] drm/via: make via_drv.h self-contained Sam Ravnborg
2019-07-22 16:21   ` Emil Velikov
2019-07-20  8:45 ` [PATCH v2 4/4] drm/via: drop use of drmP.h Sam Ravnborg
2019-07-22 16:22   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723190129.GA26326@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=gustavo@embeddedor.com \
    --cc=hubcap@omnibond.com \
    --cc=ira.weiny@intel.com \
    --cc=kevinbrace@gmx.com \
    --cc=michel@daenzer.net \
    --cc=openchrome-devel@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.