public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Intel-gfx@lists.freedesktop.org,
	Jani Nikula <jani.nikula@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 4/4] drm/i915: Introduce concept of a sub-platform
Date: Wed, 27 Mar 2019 11:35:41 +0000	[thread overview]
Message-ID: <9b481f42-aa12-a7c0-5555-896702aad13f@linux.intel.com> (raw)
In-Reply-To: <155359399563.15930.17373593728128232919@skylake-alporthouse-com>


On 26/03/2019 09:53, Chris Wilson wrote:
> Quoting Jani Nikula (2019-03-26 09:34:45)
>> Not to block this series, but looking further outside the box...
>>
>> I've still got the constant vs. runtime device info split
>> unfinished. We've got so many things that are mostly constant, but
>> occasionally need changes. And we've got so many things that could be
>> device info flags, but would lead to proliferation of plenty of almost
>> identical device info structures. Like this ULX/ULT and GT number.
>>
>> So I guess I'm wondering if we're doing the right thing by assigning
>> device info pointers to the struct pci_device_id driver_data member in
>> pciidlist[] table.
>>
>> For one thing, that's a whole lot of bits that could be used directly
>> for assigning platform and subplatform, or features.
>>
>> Of course, we'd then need another table besides pciidlist[] to map to
>> the device info, but we're sort of doing some of that with the ULX/ULT
>> parts.
>>
>> I just overall feel that there must be a better way to do all this, and
>> we just haven't figured it out yet, and we're partially putting
>> ourselves into a box we can't break out of.
>>
>> Thoughts?
> 
> I think intel_device_info is still fundamentally useful. The
> disadvantage of having the feature discovery separate from use is
> outweighed by having consistent stanzas for those features - it makes
> comparing platforms, finding feature sets much easier. (The cost being
> that with the setting of the feature flag far away from the code using
> it, people updating the cost are more likely to forget the flag.)
> 
> One end goal of this madness, is that we can recompile the kernel module
> to only support a single sku and dce the rest. But what are the
> diminishing returns here? Without measurement, I'd say a single
> platform.
> 
> So that dictates what can be in the static intel_device_info, features
> that are constant across a whole platform. And as you point out, we
> don't need a pointer to the device_info itself, just a platform field
> which is an index into the device_info block, with plenty of room for
> subplatform flags.
> 
> While that says how we hook up device_info, I don't think that reflects
> on the use of feature flags themselves, or our ability to statically
> determine a reduced feature set.
> 
> So not a box, just a mere wet paper bag.

To check if I follow.. we are talking about potentially abolishing 
device info in favour of constructing something at probe time, which 
could potentially have fewer and overall smaller static data portion?

Because I don't see how we can eliminate the pciidlist itself, or even 
shrink it's size? It has to have one entry per device id, just the 
question for what we use driver_data for?

Static vs runtime I think shouldn't have effect on the per platform 
builds. As long as all feature tests are done via macros, or small 
static inlines, code can still be compiled out.

I do have a small nagging feeling about this series as well, but I have 
managed to convince myself it is better than the device id listed in 
i915_drv.h. So don't know.. we can always drop it and just expand 
platform mask to u64 to solve the immediate need and leave the rest for 
later.

Regards,

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

  reply	other threads:[~2019-03-27 11:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26  7:40 [PATCH 0/4] Device id consolidation Tvrtko Ursulin
2019-03-26  7:40 ` [PATCH 1/4] drm/i915: Split Pineview device info into desktop and mobile Tvrtko Ursulin
2019-03-26  7:40 ` [PATCH 2/4] drm/i915: Remove redundant device id from IS_IRONLAKE_M macro Tvrtko Ursulin
2019-03-26  7:40 ` [PATCH 3/4] drm/i915: Split some PCI ids into separate groups Tvrtko Ursulin
2019-03-26  7:40 ` [PATCH 4/4] drm/i915: Introduce concept of a sub-platform Tvrtko Ursulin
2019-03-26  8:39   ` Jani Nikula
2019-03-26  9:34     ` Jani Nikula
2019-03-26  9:53       ` Chris Wilson
2019-03-27 11:35         ` Tvrtko Ursulin [this message]
2019-03-27 11:41           ` Chris Wilson
2019-03-27 12:03             ` Jani Nikula
2019-03-27 14:33               ` Tvrtko Ursulin
2019-03-27 15:06                 ` Jani Nikula
2019-03-27 11:37     ` Tvrtko Ursulin
2019-03-27 14:23   ` [PATCH v8 " Tvrtko Ursulin
2019-03-29  9:54     ` Jani Nikula
2019-03-29 12:10       ` Tvrtko Ursulin
2019-03-29 13:10         ` Jani Nikula
2019-03-26 15:59 ` ✗ Fi.CI.CHECKPATCH: warning for Device id consolidation Patchwork
2019-03-26 16:01 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-26 16:19 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-26 23:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-03-27 17:52 ` ✗ Fi.CI.CHECKPATCH: warning for Device id consolidation (rev2) Patchwork
2019-03-27 17:54 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-27 18:38 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-01 16:18   ` Tvrtko Ursulin
2019-03-28  9:23 ` [PATCH 0/4] Device id consolidation Tvrtko Ursulin
2019-03-28  9:39   ` Chris Wilson
2019-03-29  9:17     ` Tvrtko Ursulin
2019-03-28 12:43 ` ✓ Fi.CI.IGT: success for Device id consolidation (rev2) 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=9b481f42-aa12-a7c0-5555-896702aad13f@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=jani.nikula@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=paulo.r.zanoni@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