From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>, Intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 01/15] drm/i915: Make I830 platform support optional
Date: Fri, 09 Feb 2018 13:26:44 +0200 [thread overview]
Message-ID: <87d11e8kuj.fsf@intel.com> (raw)
In-Reply-To: <20180208130606.15556-2-tvrtko.ursulin@linux.intel.com>
On Thu, 08 Feb 2018, Tvrtko Ursulin <tursulin@ursulin.net> wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/Kconfig | 5 +++++
> drivers/gpu/drm/i915/Kconfig.platforms | 6 ++++++
> drivers/gpu/drm/i915/i915_drv.h | 5 ++++-
> drivers/gpu/drm/i915/i915_pci.c | 4 ++++
> 4 files changed, 19 insertions(+), 1 deletion(-)
> create mode 100644 drivers/gpu/drm/i915/Kconfig.platforms
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index dfd95889f4b7..1363d05e6ec5 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -131,3 +131,8 @@ depends on DRM_I915
> depends on EXPERT
> source drivers/gpu/drm/i915/Kconfig.debug
> endmenu
> +
> +menu "Platform support"
> +depends on DRM_I915
> +source drivers/gpu/drm/i915/Kconfig.platforms
> +endmenu
> diff --git a/drivers/gpu/drm/i915/Kconfig.platforms b/drivers/gpu/drm/i915/Kconfig.platforms
> new file mode 100644
> index 000000000000..f3949fff21e9
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/Kconfig.platforms
> @@ -0,0 +1,6 @@
> +config DRM_I915_PLATFORM_INTEL_I830
> + bool "Intel i830 platform support"
> + default y
> + depends on DRM_I915
> + help
> + Include support for Intel i830 platform.
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 28a2671a26c7..6acd9789b452 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2575,7 +2575,10 @@ intel_info(const struct drm_i915_private *dev_priv)
>
> #define IS_PLATFORM(dev_priv, p) ((dev_priv)->info.platform_mask & BIT(p))
>
> -#define IS_I830(dev_priv) IS_PLATFORM(dev_priv, INTEL_I830)
> +#define IS_OPT_PLATFORM(dev_priv, p) \
> + (IS_ENABLED(CONFIG_DRM_I915_PLATFORM_##p) && IS_PLATFORM(dev_priv, p))
> +
> +#define IS_I830(dev_priv) IS_OPT_PLATFORM(dev_priv, INTEL_I830)
> #define IS_I845G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I845G)
> #define IS_I85X(dev_priv) IS_PLATFORM(dev_priv, INTEL_I85X)
> #define IS_I865G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I865G)
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 4e7a10c89782..81573073dceb 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -74,12 +74,14 @@
> GEN_DEFAULT_PAGE_SIZES, \
> CURSOR_OFFSETS
>
> +#ifdef CONFIG_DRM_I915_PLATFORM_INTEL_I830
> static const struct intel_device_info intel_i830_info = {
> GEN2_FEATURES,
> .platform = INTEL_I830,
> .is_mobile = 1, .cursor_needs_physical = 1,
> .num_pipes = 2, /* legal, last one wins */
> };
> +#endif
Is the compiler not smart enough to throw the device info away without
the #ifdefs? You're removing the only reference to it below after
all. Ditto throughout the series.
BR,
Jani.
>
> static const struct intel_device_info intel_i845g_info = {
> GEN2_FEATURES,
> @@ -599,7 +601,9 @@ static const struct intel_device_info intel_icelake_11_info = {
> * PCI ID matches, otherwise we'll use the wrong info struct above.
> */
> static const struct pci_device_id pciidlist[] = {
> +#ifdef CONFIG_DRM_I915_PLATFORM_INTEL_I830
> INTEL_I830_IDS(&intel_i830_info),
> +#endif
> INTEL_I845G_IDS(&intel_i845g_info),
> INTEL_I85X_IDS(&intel_i85x_info),
> INTEL_I865G_IDS(&intel_i865g_info),
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-09 11:26 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 13:05 [RFC 00/15] Selectable platform support Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 01/15] drm/i915: Make I830 platform support optional Tvrtko Ursulin
2018-02-08 13:23 ` Chris Wilson
2018-02-09 11:26 ` Jani Nikula [this message]
2018-02-08 13:05 ` [RFC 02/15] drm/i915: Make I845G " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 03/15] drm/i915: Make I85X " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 04/15] drm/i915: Make I865G " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 05/15] drm/i915: Make GEN2 " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 06/15] drm/i915: Make Gen3 platforms " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 07/15] drm/i915: Make Gen4 " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 08/15] drm/i915: Make Ironlake/Gen5 " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 09/15] drm/i915: Make Sandybridge/Gen6 " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 10/15] drm/i915: Make Gen7/7.5 platform " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 11/15] drm/i915: Use INTEL_GEN everywhere Tvrtko Ursulin
2018-02-09 10:14 ` Jani Nikula
2018-02-09 21:59 ` [PATCH] __gen__ Chris Wilson
2018-02-09 10:20 ` [RFC 11/15] drm/i915: Use INTEL_GEN everywhere Chris Wilson
2018-02-08 13:06 ` [RFC 12/15] drm/i915: Favour IS_GENx Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 13/15] drm/i915: IS_GEN range helpers Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 14/15] drm/i915: Use new " Tvrtko Ursulin
2018-02-08 14:22 ` Ville Syrjälä
2018-02-08 14:34 ` Tvrtko Ursulin
2018-02-08 14:46 ` Chris Wilson
2018-02-08 15:13 ` Mika Kuoppala
2018-02-08 15:53 ` Ville Syrjälä
2018-02-09 11:18 ` Jani Nikula
2018-02-09 14:48 ` Ville Syrjälä
2018-02-09 15:01 ` Chris Wilson
2018-02-09 15:12 ` Ville Syrjälä
2018-02-10 22:51 ` Chris Wilson
2018-02-08 13:06 ` [RFC 15/15] drm/i915: Replace some negative Gen checks Tvrtko Ursulin
2018-02-09 10:18 ` Jani Nikula
2018-02-09 10:19 ` Chris Wilson
2018-02-08 13:26 ` [RFC 00/15] Selectable platform support Chris Wilson
2018-02-08 14:06 ` Tvrtko Ursulin
2018-02-08 15:07 ` Joonas Lahtinen
2018-02-09 11:49 ` Jani Nikula
2018-02-09 12:02 ` Chris Wilson
2018-02-08 15:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-02-09 10:48 ` [RFC 00/15] " Tvrtko Ursulin
2018-02-09 10:50 ` Chris Wilson
2018-02-09 11:01 ` Tvrtko Ursulin
2018-02-09 11:19 ` Chris Wilson
2018-02-09 21:14 ` Chris Wilson
2018-02-09 11:32 ` Jani Nikula
2018-02-09 22:23 ` ✗ Fi.CI.BAT: failure for Selectable platform support (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=87d11e8kuj.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=tursulin@ursulin.net \
/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