intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Mika Kahola <mika.kahola@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Generalize transcoder looping
Date: Thu, 02 Nov 2017 13:05:30 +0200	[thread overview]
Message-ID: <1509620730.3274.209.camel@intel.com> (raw)
In-Reply-To: <87ineudnpr.fsf@intel.com>

On Wed, 2017-11-01 at 17:26 +0200, Jani Nikula wrote:
> On Wed, 01 Nov 2017, Mika Kahola <mika.kahola@intel.com> wrote:
> > 
> > To make looping through transcoders in intel_ddi.c more generic,
> > let's switch
> > to use 'for_each_pipe()' macro to do this.
> > 
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > b/drivers/gpu/drm/i915/intel_ddi.c
> > index ace674c..3df991b 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -1717,7 +1717,7 @@ bool intel_ddi_get_hw_state(struct
> > intel_encoder *encoder,
> >  		goto out;
> >  	}
> >  
> > -	for (i = TRANSCODER_A; i <= TRANSCODER_C; i++) {
> > +	for_each_pipe(dev_priv, i) {
> It gives me an uneasy feeling to conflate pipes and transcoders like
> this. I think we've tried to be more clear about the distinction
> elsewhere.
I had a same kind of feeling myself. First, I was thinking of creating
a new macro like for_each_transcoder() which would indicate that now we
are dealing with transcoders instead of pipes. Maybe going to that
direction here?

> 
> BR,
> Jani.
> 
> > 
> >  		tmp = I915_READ(TRANS_DDI_FUNC_CTL(i));
> >  
> >  		if ((tmp & TRANS_DDI_PORT_MASK) ==
> > TRANS_DDI_SELECT_PORT(port)) {
-- 
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-11-02 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 11:50 [PATCH] drm/i915: Generalize transcoder looping Mika Kahola
2017-11-01 13:09 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-01 15:26 ` [PATCH] " Jani Nikula
2017-11-02 11:05   ` Mika Kahola [this message]
2017-11-02 11:18     ` Jani Nikula

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=1509620730.3274.209.camel@intel.com \
    --to=mika.kahola@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).