All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 3/3] drm/i915: obliterate PCH types in favour of direct PCH id use
Date: Mon, 05 Feb 2018 11:49:05 +0200	[thread overview]
Message-ID: <87mv0nbwby.fsf@intel.com> (raw)
In-Reply-To: <151761024198.15322.3609979695149888981@mail.alporthouse.com>

On Fri, 02 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-02-02 20:01:00)
>> The PCH type is an unnecessary level of abstraction that's an extra
>> maintenance burden. Switch to using PCH ids directly. This also
>> simplifies the virtual PCH detection.
>
> But you are still using the PCH type, just computing it from the id
> inside the conditionals. Not sure if that's a good idea, remember the
> long chains of devid == X || devid == Y || ... we used to have?

I've forgotten, maybe I didn't learn from history... but you're right
I'm still using the "pch type". But the current code is using the devids
in addition to the types too.

> I guess a convincing argument that the abstraction is ill-conceived
> would be when it bloats the code, as that shows the abstraction's
> semantics do not match and are a hindrance to use. Maybe there's another
> transformation that improves usage?

To be honest, I wasn't happy with the end result either, but decided to
post the patches as RFC as I had them written, to provoke discussion.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-05  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 20:00 [RFC 0/3] drm/i915: nuke pch type :o Jani Nikula
2018-02-02 20:00 ` [RFC 1/3] drm/i915: introduce INTEL_PCH_ID() and use it Jani Nikula
2018-02-02 20:00 ` [RFC 2/3] drm/i915/debugfs: print PCH id instead of PCH type in i915 capabilities Jani Nikula
2018-02-02 20:01 ` [RFC 3/3] drm/i915: obliterate PCH types in favour of direct PCH id use Jani Nikula
2018-02-02 22:24   ` Chris Wilson
2018-02-05  9:49     ` Jani Nikula [this message]
2018-02-02 20:41 ` ✓ Fi.CI.BAT: success for drm/i915: nuke pch type :o Patchwork
2018-02-03  6:22 ` ✓ Fi.CI.IGT: " Patchwork

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=87mv0nbwby.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.