From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Intel graphics driver community testing & development
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: Rename GGTT init functions
Date: Wed, 23 Mar 2016 17:41:42 +0200 [thread overview]
Message-ID: <20160323154142.GW4329@intel.com> (raw)
In-Reply-To: <1458738023-31292-1-git-send-email-joonas.lahtinen@linux.intel.com>
On Wed, Mar 23, 2016 at 03:00:22PM +0200, Joonas Lahtinen wrote:
> Rename and document the GGTT init functions to give a better
> idea of the context where they are called from.
>
> i915_gem_gtt_init => i915_init_ggtt_hw
Seems to me i915_ggtt_init_hw would match existing practices better.
> i915_gem_init_global_gtt => i915_gem_init_ggtt
> i915_global_gtt_cleanup => i915_cleanup_ggtt_hw
>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_dma.c | 14 +++++++-------
> drivers/gpu/drm/i915/i915_gem.c | 2 +-
> drivers/gpu/drm/i915/i915_gem_gtt.c | 18 +++++++++++++++---
> drivers/gpu/drm/i915/i915_gem_gtt.h | 7 +++----
> 4 files changed, 26 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index fc8ac98..124cefd 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1180,7 +1180,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
>
> intel_device_info_runtime_init(dev);
>
> - ret = i915_gem_gtt_init(dev);
> + ret = i915_init_ggtt_hw(dev);
> if (ret)
> return ret;
>
> @@ -1189,13 +1189,13 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
> ret = i915_kick_out_firmware_fb(dev_priv);
> if (ret) {
> DRM_ERROR("failed to remove conflicting framebuffer drivers\n");
> - goto out_gtt;
> + goto out_ggtt;
> }
>
> ret = i915_kick_out_vgacon(dev_priv);
> if (ret) {
> DRM_ERROR("failed to remove conflicting VGA console\n");
> - goto out_gtt;
> + goto out_ggtt;
> }
>
> pci_set_master(dev->pdev);
> @@ -1222,7 +1222,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
> aperture_size);
> if (dev_priv->ggtt.mappable == NULL) {
> ret = -EIO;
> - goto out_gtt;
> + goto out_ggtt;
> }
>
> dev_priv->ggtt.mtrr = arch_phys_wc_add(dev_priv->ggtt.mappable_base,
> @@ -1255,8 +1255,8 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
>
> return 0;
>
> -out_gtt:
> - i915_global_gtt_cleanup(dev);
> +out_ggtt:
> + i915_cleanup_ggtt_hw(dev);
>
> return ret;
> }
> @@ -1275,7 +1275,7 @@ static void i915_driver_cleanup_hw(struct drm_i915_private *dev_priv)
> pm_qos_remove_request(&dev_priv->pm_qos);
> arch_phys_wc_del(dev_priv->ggtt.mtrr);
> io_mapping_free(dev_priv->ggtt.mappable);
> - i915_global_gtt_cleanup(dev);
> + i915_cleanup_ggtt_hw(dev);
> }
>
> /**
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 8588c83..506a706 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4972,7 +4972,7 @@ int i915_gem_init(struct drm_device *dev)
> if (ret)
> goto out_unlock;
>
> - i915_gem_init_global_gtt(dev);
> + i915_gem_init_ggtt(dev);
>
> ret = i915_gem_context_init(dev);
> if (ret)
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 0715bb7..c23513b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2808,7 +2808,11 @@ static int i915_gem_setup_global_gtt(struct drm_device *dev,
> return 0;
> }
>
> -void i915_gem_init_global_gtt(struct drm_device *dev)
> +/**
> + * i915_gem_init_ggtt - Initialize GEM for Global GTT
> + * @dev: DRM device
> + */
> +void i915_gem_init_ggtt(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> u64 gtt_size, mappable_size;
> @@ -2819,7 +2823,11 @@ void i915_gem_init_global_gtt(struct drm_device *dev)
> i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size);
> }
>
> -void i915_global_gtt_cleanup(struct drm_device *dev)
> +/**
> + * i915_cleanup_ggtt_hw - Clean up GGTT hardware initialization
> + * @dev: DRM device
> + */
> +void i915_cleanup_ggtt_hw(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct i915_address_space *vm = &dev_priv->ggtt.base;
> @@ -3157,7 +3165,11 @@ static void i915_gmch_remove(struct i915_address_space *vm)
> intel_gmch_remove();
> }
>
> -int i915_gem_gtt_init(struct drm_device *dev)
> +/**
> + * i915_init_ggtt_hw - Initialize GGTT hardware
> + * @dev: DRM device
> + */
> +int i915_init_ggtt_hw(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct i915_ggtt *ggtt = &dev_priv->ggtt;
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index d804be0..95bf9a0 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -513,10 +513,9 @@ i915_page_dir_dma_addr(const struct i915_hw_ppgtt *ppgtt, const unsigned n)
> px_dma(ppgtt->base.scratch_pd);
> }
>
> -int i915_gem_gtt_init(struct drm_device *dev);
> -void i915_gem_init_global_gtt(struct drm_device *dev);
> -void i915_global_gtt_cleanup(struct drm_device *dev);
> -
> +int i915_init_ggtt_hw(struct drm_device *dev);
> +void i915_gem_init_ggtt(struct drm_device *dev);
> +void i915_cleanup_ggtt_hw(struct drm_device *dev);
>
> int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt);
> int i915_ppgtt_init_hw(struct drm_device *dev);
> --
> 2.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-23 15:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 13:00 [PATCH 1/2] drm/i915: Rename GGTT init functions Joonas Lahtinen
2016-03-23 13:00 ` [PATCH 2/2] drm/i915: Refer to GGTT VM consistently Joonas Lahtinen
2016-03-23 13:18 ` [PATCH v2] " Joonas Lahtinen
2016-03-23 13:25 ` [PATCH 2/2] " Chris Wilson
2016-03-24 14:37 ` Joonas Lahtinen
2016-03-30 12:13 ` [PATCH v3] " Joonas Lahtinen
2016-03-30 13:57 ` [PATCH v4] drm/i915: Refer to GGTT {,VM} consistently Joonas Lahtinen
2016-03-30 14:17 ` [PATCH v4] drm/i915: Refer to GGTT {, VM} consistently Chris Wilson
2016-03-23 13:04 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Rename GGTT init functions Patchwork
2016-03-23 13:35 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Rename GGTT init functions (rev2) Patchwork
2016-03-23 15:25 ` [PATCH 1/2] drm/i915: Rename GGTT init functions Mika Kuoppala
2016-03-23 15:41 ` Ville Syrjälä [this message]
2016-03-23 15:54 ` Mika Kuoppala
2016-03-23 16:02 ` Ville Syrjälä
2016-03-23 16:06 ` Chris Wilson
2016-03-24 7:40 ` Joonas Lahtinen
2016-03-24 16:01 ` Dave Gordon
2016-03-24 16:22 ` Chris Wilson
2016-03-24 14:40 ` Joonas Lahtinen
2016-03-24 14:47 ` [PATCH v2] " Joonas Lahtinen
2016-03-29 13:15 ` Joonas Lahtinen
2016-03-29 14:25 ` Chris Wilson
2016-03-30 9:12 ` Chris Wilson
2016-03-30 10:54 ` Joonas Lahtinen
2016-03-24 17:02 ` ✗ Fi.CI.BAT: warning for series starting with [v2] drm/i915: Rename GGTT init functions (rev3) Patchwork
2016-03-30 11:12 ` Joonas Lahtinen
2016-03-31 13:44 ` ✗ Fi.CI.BAT: warning for series starting with [v2] drm/i915: Rename GGTT init functions (rev5) Patchwork
2016-03-31 14:32 ` Joonas Lahtinen
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=20160323154142.GW4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@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 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.