Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-xe@lists.freedesktop.org
Cc: "Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Shankar, Uma" <uma.shankar@intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [Intel-xe] [RFC] drm/i915: add kconfig option to enable/disable legacy platform support
Date: Tue, 14 Mar 2023 18:42:56 +0200	[thread overview]
Message-ID: <874jqn708f.fsf@intel.com> (raw)
In-Reply-To: <36d68f73-d344-92b1-171e-5e39ed1af651@linux.intel.com>

On Tue, 14 Mar 2023, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> On 14/03/2023 11:43, Jani Nikula wrote:
>> On Thu, 09 Mar 2023, Jani Nikula <jani.nikula@intel.com> wrote:
>>> Add config option DRM_I915_LEGACY to enable/disable legacy platform
>>> support. This is primarily for the benefit of the drm/xe driver, and
>>> legacy is defined in terms of the platforms drm/xe does not support,
>>> i.e. anything before Tigerlake.
>>>
>>> While the kconfig option will be CONFIG_DRM_I915_LEGACY, the intention
>>> is that it's not used in code. Instead, we'll pass -DI915_LEGACY=1 in
>>> the i915 Makefile for CONFIG_DRM_I915_LEGACY=y, while the xe Makefile
>>> does no such thing, regardless of the kconfig value.
>>>
>>> Initially, the knob does the bare minimum: drops the legacy platforms
>>> from module PCI ID table (and the compiler in turn automagically drops
>>> all the unreferenced device infos).
>>>
>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> 
>> The discussion stalled a bit.
>> 
>> Do we have consensus to start adding this to upstream i915?
>
> I always liked the idea of compiling out platform support so I could be 
> convinced. I view that as a "power user" use case - compiles their own 
> kernel for a targeted machine. It also translates to building smaller 
> images in production settings although that is kind of not interesting 
> with the storage amounts these days. So overall feels could be 
> justified. There is some benefit and could be done with minimal 
> maintenance cost.
>
> But to add a Kconfig calling something "legacy", by the definition of 
> what Xe will support feels maybe a bit premature. Sure it will become 
> super useful once Xe is in the tree, to allow exactly the same class 
> use-case as above, but until then it feels questionable under your own 
> criteria too.

I don't disagree. Partially the idea with "legacy" was to be a bit
vague, so we could tweak what it really means later.

> If you could add a set of more generic options, which Xe could later tie 
> into that would work for me. For instance we have some more natural 
> cross-over points than Tigerlake. So if not per individual platform, 
> maybe for like ring buffer -> execlists -> GuC transitions. And naming 
> them without saying legacy for now, but use some descriptive names, and 
> listing platform code names in help text. "Select this to support 
> Broadwell, Skylake, etc..", "Select this to support Sandybridge..". Out 
> of the tree Xe build can then just not use the corresponding defines in 
> its own build and it would achieve what you need?

I kind of wanted to avoid adding a lot of config options, because I
think they'll be difficult to maintain and get all the combos right. I
don't particularly want all the build bot reports about various kconfig
combos failing.

One other problem is that I can't think of a way to do this by using the
kconfig CONFIG_FOO macros directly; you have to add separate variables
because the same files are built for two drivers. You can't force the
CONFIG_FOO macros to different settings for different drivers. So we'd
get a lot of proxy macros too.

I wonder if there's a name we could use instead of legacy to reasonably
match what Xe needs to avoid adding tons of configs at once?

BR,
Jani.


>
> Once in tree we can have a "legacy" kconfig which toggles a whole group 
> of those. Like "CONFIG_DRM_I915_SUPPORT_XE_PLATFORMS" or something.




-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-03-14 16:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 19:19 [Intel-xe] [RFC] drm/i915: add kconfig option to enable/disable legacy platform support Jani Nikula
2023-03-10  9:06 ` Tvrtko Ursulin
2023-03-10 10:11   ` Jani Nikula
2023-03-10 13:14     ` Ville Syrjälä
2023-03-10 13:36       ` Jani Nikula
2023-03-10 13:47         ` Ville Syrjälä
2023-03-10 13:54           ` Jani Nikula
2023-03-10 13:57             ` Ville Syrjälä
2023-03-10 14:26               ` Jani Nikula
2023-03-13 17:03 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-03-13 17:04 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-13 17:08 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-03-14 11:43 ` [Intel-xe] [RFC] " Jani Nikula
2023-03-14 12:52   ` Tvrtko Ursulin
2023-03-14 16:42     ` Jani Nikula [this message]
2023-03-14 17:22       ` Lucas De Marchi
2023-03-14 18:27         ` Tvrtko Ursulin
2023-03-14 18:48           ` Jani Nikula
2023-03-14 19:16           ` Mauro Carvalho Chehab
2023-03-14 19:17             ` Mauro Carvalho Chehab

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=874jqn708f.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@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