intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/i915: replace platform flags with a platform enum
Date: Mon, 21 Nov 2016 11:27:53 +0200	[thread overview]
Message-ID: <87polpxjvq.fsf@intel.com> (raw)
In-Reply-To: <02b8a377-011e-6d5b-d5e3-e7912aa2bb0b@linux.intel.com>

On Fri, 18 Nov 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> On 18/11/2016 14:20, Jani Nikula wrote:
>> The platform flags in device info are (mostly) mutually
>> exclusive. Replace the flags with an enum. Add the platform enum also
>> for platforms that previously didn't have a flag, and give them codename
>> logging in dmesg.
>
> It just saddens me a bit that it prevents the compiler optimisation of 
> our IS_THIS || IS_THAT || IS_TAT ugliness. :I On the basis on that I 
> cannot quite make myself to support it, although it conceptually does 
> make more sense.

Personally I think making more sense conceptually trumps possible
compiler optimizations, especially when the code paths where this
actually matters are extremely rare. (Can you even point me at an
example where this makes a difference?)

That said, does doing something silly like this make a difference:

enum intel_platform {
	INTEL_PLATFORM_UNINITIALIZED = 0,
	INTEL_I830		= BIT(0),
	INTEL_I845G		= BIT(1),
	INTEL_I85X		= BIT(2),
	INTEL_I865G		= BIT(3),
	INTEL_I915G		= BIT(4),
	INTEL_I915GM		= BIT(5),
	INTEL_I945G		= BIT(6),
	INTEL_I945GM		= BIT(7),
	INTEL_G33		= BIT(8),
	INTEL_G4X		= BIT(9),
	INTEL_PINEVIEW		= BIT(10),
	INTEL_BROADWATER	= BIT(11),
	INTEL_CRESTLINE		= BIT(12),
	INTEL_IRONLAKE		= BIT(13),
	INTEL_SANDYBRIDGE	= BIT(14),
	INTEL_IVYBRIDGE		= BIT(15),
	INTEL_VALLEYVIEW	= BIT(16),
	INTEL_CHERRYVIEW	= BIT(17),
	INTEL_HASWELL		= BIT(18),
	INTEL_BROADWELL		= BIT(19),
	INTEL_SKYLAKE		= BIT(20),
	INTEL_BROXTON		= BIT(21),
	INTEL_KABYLAKE		= BIT(22),
};

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:[~2016-11-21  9:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 14:20 [RFC PATCH] drm/i915: replace platform flags with a platform enum Jani Nikula
2016-11-18 14:26 ` Chris Wilson
2016-11-18 14:27 ` Tvrtko Ursulin
2016-11-21  9:27   ` Jani Nikula [this message]
2016-11-21  9:53     ` Tvrtko Ursulin
2016-11-21 13:24       ` Jani Nikula
2016-11-18 15:16 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-21 14:15 ` [RFC PATCH] " Ville Syrjälä

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=87polpxjvq.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@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).