All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 08/15] drm/i810: drop device_is_agp callback
Date: Wed, 25 Jan 2017 12:36:57 -0500	[thread overview]
Message-ID: <CADnq5_PDOEvhrCTHWySnuqem-FVOmoExtoN0SdWbLF=2FzxANg@mail.gmail.com> (raw)
In-Reply-To: <20170125062657.19270-9-daniel.vetter@ffwll.ch>

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Use the same trick we used for i915 when we still had ums support:
> Just initialize the agp support unconditionally in the driver load
> function.
>
> Unfortunately that means we need to export drm_agp_init again, but I
> think that's a lesser evil.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_agpsupport.c |  2 ++
>  drivers/gpu/drm/i810/i810_dma.c  | 24 ++++++++----------------
>  drivers/gpu/drm/i810/i810_drv.c  |  1 -
>  drivers/gpu/drm/i810/i810_drv.h  |  1 -
>  4 files changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
> index d621c8a4cf00..c89953449e96 100644
> --- a/drivers/gpu/drm/drm_agpsupport.c
> +++ b/drivers/gpu/drm/drm_agpsupport.c
> @@ -421,6 +421,8 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
>         head->base = head->agp_info.aper_base;
>         return head;
>  }
> +/* Only exported for i810.ko */
> +EXPORT_SYMBOL(drm_agp_init);
>
>  /**
>   * drm_legacy_agp_clear - Clear AGP resource list
> diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
> index ab4e6cbe1f8b..576a417690d4 100644
> --- a/drivers/gpu/drm/i810/i810_dma.c
> +++ b/drivers/gpu/drm/i810/i810_dma.c
> @@ -1190,6 +1190,14 @@ static int i810_flip_bufs(struct drm_device *dev, void *data,
>
>  int i810_driver_load(struct drm_device *dev, unsigned long flags)
>  {
> +       dev->agp = drm_agp_init(dev);
> +       if (dev->agp) {
> +               dev->agp->agp_mtrr = arch_phys_wc_add(
> +                       dev->agp->agp_info.aper_base,
> +                       dev->agp->agp_info.aper_size *
> +                       1024 * 1024);
> +       }
> +
>         /* Our userspace depends upon the agp mapping support. */
>         if (!dev->agp)
>                 return -EINVAL;
> @@ -1249,19 +1257,3 @@ const struct drm_ioctl_desc i810_ioctls[] = {
>  };
>
>  int i810_max_ioctl = ARRAY_SIZE(i810_ioctls);
> -
> -/**
> - * Determine if the device really is AGP or not.
> - *
> - * All Intel graphics chipsets are treated as AGP, even if they are really
> - * PCI-e.
> - *
> - * \param dev   The device to be tested.
> - *
> - * \returns
> - * A value of 1 is always retured to indictate every i810 is AGP.
> - */
> -int i810_driver_device_is_agp(struct drm_device *dev)
> -{
> -       return 1;
> -}
> diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
> index 02504a7cfaf2..37fd0906f807 100644
> --- a/drivers/gpu/drm/i810/i810_drv.c
> +++ b/drivers/gpu/drm/i810/i810_drv.c
> @@ -60,7 +60,6 @@ static struct drm_driver driver = {
>         .lastclose = i810_driver_lastclose,
>         .preclose = i810_driver_preclose,
>         .set_busid = drm_pci_set_busid,
> -       .device_is_agp = i810_driver_device_is_agp,
>         .dma_quiescent = i810_driver_dma_quiescent,
>         .ioctls = i810_ioctls,
>         .fops = &i810_driver_fops,
> diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
> index 93ec5dc4e7d3..c73d2f2da57b 100644
> --- a/drivers/gpu/drm/i810/i810_drv.h
> +++ b/drivers/gpu/drm/i810/i810_drv.h
> @@ -124,7 +124,6 @@ extern int i810_driver_load(struct drm_device *, unsigned long flags);
>  extern void i810_driver_lastclose(struct drm_device *dev);
>  extern void i810_driver_preclose(struct drm_device *dev,
>                                  struct drm_file *file_priv);
> -extern int i810_driver_device_is_agp(struct drm_device *dev);
>
>  extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
>  extern const struct drm_ioctl_desc i810_ioctls[];
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-25 17:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
2017-01-25 12:48   ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:19     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
2017-01-25  9:33   ` Archit Taneja
2017-01-25 12:40     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
2017-01-25 13:52   ` Eric Engestrom
2017-01-25  6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
2017-01-25 12:51   ` Gustavo Padovan
2017-01-25  6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
2017-01-25 12:55   ` Gustavo Padovan
2017-01-25 15:23     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
2017-01-25 12:57   ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:33     ` Daniel Vetter
2017-01-25 18:08       ` Gustavo Padovan
2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
2017-01-25 12:58   ` Gustavo Padovan
2017-01-26  0:11   ` Patrik Jakobsson
2017-01-25  6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
2017-01-25 17:36   ` Alex Deucher [this message]
2017-01-25  6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
2017-01-25 17:33   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 10/15] drm: " Daniel Vetter
2017-01-25 17:34   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
2017-01-25 17:40   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
2017-01-25 17:43   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
2017-01-26  9:49   ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
2017-01-25 17:31   ` Alex Deucher
2017-01-26  9:48     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
2017-01-25 14:26   ` Eric Engestrom
2017-01-25 15:36     ` Daniel Vetter
2017-01-25  7:54 ` ✗ Fi.CI.BAT: warning for More kerneldoc cleanup 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='CADnq5_PDOEvhrCTHWySnuqem-FVOmoExtoN0SdWbLF=2FzxANg@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.