All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Feng Boqun <boqun.feng@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] fix interrupt request miss problem in bsd ring for g4x
Date: Wed, 27 Apr 2011 10:15:13 +0100	[thread overview]
Message-ID: <0d30dc$m0qaei@orsmga001.jf.intel.com> (raw)
In-Reply-To: <749B9D3DBF0F054390025D9EAFF47F224BDFB219@shsmsx501.ccr.corp.intel.com>

On Wed, 27 Apr 2011 16:23:00 +0800, "Feng, Boqun" <boqun.feng@intel.com> wrote:
> Err...I just send another two patches before read this letter. : )
> 
> Ironlake and g4x share the same bsd_ring, so they share the same
> bsd_ring_put/get_irq functions of the ring. Given this, we can't just
> change the function name to g4x_ring_put/get_irq. If we do so, we
> need ironlake_ring_put/get_irq, too.
> So I just use a if-else in bsd_ring_*_irq to find out the version of the
> chipset and do different work.
> Is that OK?

That's ok. We are slowly pushing the branches out to the initialisation so
that the code paths each generation takes are a little clearer.

At the moment, I'm more concerned about making sure our functions are
consistently named and prefixed with the chipset they first work with.

So we have:
  intel_ -> general functions, used by all
  i8xx_ -> gen2
  i915_ -> gen3 (915/945)
  g33_, pineview_ -> gen3 (blk/pnv) # perhaps just g33 as pnv = g33 + mobile?
  i965_ -> gen4 (brw/crl)
  g4x_ -> gen4 (egl/ctg)
  ironlake_, sandybridge_, ivybridge_ -> etc 

So ironlake can call a g4x function, but never vice versa.

[And I'd love to be able to bring the same level of consistency to our
register names. Along with making sure that they correspond with public
docs.]

The current best practice for enablement is then to introduce new
functions for new chipsets (copy and paste, then modify) ensure the
hardware is working, then reduce until we have the minimal code with no
regressions.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-04-27  9:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 10:12 [PATCH] fix interrupt request miss problem in bsd ring for g4x Feng, Boqun
2011-04-26 14:28 ` Chris Wilson
2011-04-27  6:08   ` Feng, Boqun
2011-04-27  7:39     ` Chris Wilson
2011-04-27  8:23       ` Feng, Boqun
2011-04-27  9:15         ` Chris Wilson [this message]
2011-04-27 11:07           ` Daniel Vetter
2011-04-27 16:07             ` Ben Widawsky
2011-04-26 17:55 ` Keith Packard
2011-04-27  4:58   ` Feng, Boqun

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='0d30dc$m0qaei@orsmga001.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=boqun.feng@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.