Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Kill legeacy AGP for gen3 kms
Date: Thu, 14 Nov 2013 01:20:48 +0200	[thread overview]
Message-ID: <20131113232048.GL7819@intel.com> (raw)
In-Reply-To: <1384377256-22457-1-git-send-email-daniel.vetter@ffwll.ch>

On Wed, Nov 13, 2013 at 10:14:16PM +0100, Daniel Vetter wrote:
> Thus far we've tried to carefully work around the fact that old
> userspace relied on the AGP-backed legacy buffer mapping ioctls for a
> bit too long. But it's really horribly, and now some new users for it
> started to show up again:
> 
> http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg45547.html
> 
> This uses drmAgpSize to figure out the GTT size, which is both the
> wrong thing to inquire and also might force us to keep this crap
> around for another few years.
> 
> So I want to stop this particular zombie from raising ever again. Now
> it's only been 4 years since XvMC was fixed for gen3, so a bit early
> by the usual rules. But since Linus explicitly said that an ABI
> breakage only counts if someone actually observes it I want to tempt
> fate an accelarate the demise of AGP.
> 
> We probably need to wait 2-3 kernel releases with this shipping until
> we go on a killing spree code-wise.
> 
> v2: Remove intel_agp_enabled since it's unused (Ville).
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Dave Airlie <airlied@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/char/agp/intel-agp.c    |  5 -----
>  drivers/gpu/drm/i915/i915_drv.c | 17 +----------------
>  2 files changed, 1 insertion(+), 21 deletions(-)
> 
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index a426ee1f57a6..9ef0a48a5b28 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -14,9 +14,6 @@
>  #include "intel-agp.h"
>  #include <drm/intel-gtt.h>
>  
> -int intel_agp_enabled;
> -EXPORT_SYMBOL(intel_agp_enabled);
> -
>  static int intel_fetch_size(void)
>  {
>  	int i;
> @@ -814,8 +811,6 @@ static int agp_intel_probe(struct pci_dev *pdev,
>  found_gmch:
>  	pci_set_drvdata(pdev, bridge);
>  	err = agp_add_bridge(bridge);
> -	if (!err)
> -		intel_agp_enabled = 1;
>  	return err;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 8f93c1c1a622..9200c5c47d46 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -155,11 +155,6 @@ MODULE_PARM_DESC(prefault_disable,
>  		"Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only.");
>  
>  static struct drm_driver driver;
> -#if IS_ENABLED(CONFIG_AGP_INTEL)
> -extern int intel_agp_enabled;
> -#else
> -static int intel_agp_enabled = 1;
> -#endif
>  
>  static const struct intel_device_info intel_i830_info = {
>  	.gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
> @@ -829,17 +824,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (PCI_FUNC(pdev->devfn))
>  		return -ENODEV;
>  
> -	/* We've managed to ship a kms-enabled ddx that shipped with an XvMC
> -	 * implementation for gen3 (and only gen3) that used legacy drm maps
> -	 * (gasp!) to share buffers between X and the client. Hence we need to
> -	 * keep around the fake agp stuff for gen3, even when kms is enabled. */
> -	if (intel_info->gen != 3) {
> -		driver.driver_features &=
> -			~(DRIVER_USE_AGP | DRIVER_REQUIRE_AGP);
> -	} else if (!intel_agp_enabled) {
> -		DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
> -		return -ENODEV;
> -	}
> +	driver.driver_features &= ~(DRIVER_USE_AGP | DRIVER_REQUIRE_AGP);
>  
>  	return drm_get_pci_dev(pdev, ent, &driver);
>  }
> -- 
> 1.8.4.3

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-11-13 23:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  8:35 [PATCH 0/3] Deprecate legacy crap Daniel Vetter
2013-11-11  8:35 ` [PATCH 1/3] drm/i915: Make AGP=n work even on gen3 Daniel Vetter
2013-11-13 18:59   ` Ville Syrjälä
2013-11-13 20:21     ` Daniel Vetter
2013-11-13 23:24       ` Ville Syrjälä
2013-11-14  0:43         ` Daniel Vetter
2013-11-11  8:35 ` [PATCH 2/3] drm/i915: Kill legeacy AGP for gen3 kms Daniel Vetter
2013-11-13 19:00   ` Ville Syrjälä
2013-11-13 21:14   ` [PATCH] " Daniel Vetter
2013-11-13 23:20     ` Ville Syrjälä [this message]
2013-11-11  8:35 ` [PATCH 3/3] drm/i915: Deprecated UMS support Daniel Vetter
2013-11-13 19:01   ` Ville Syrjälä
2013-11-13 21:11   ` [PATCH] " Daniel Vetter
2013-11-13 23:18     ` 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=20131113232048.GL7819@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox