From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 06/10] drm/i915: extract l3_parity substruct from dev_priv
Date: Fri, 2 Nov 2012 12:10:25 -0700 [thread overview]
Message-ID: <20121102121025.4a3e4a64@jbarnes-desktop> (raw)
In-Reply-To: <1351882511-21290-7-git-send-email-daniel.vetter@ffwll.ch>
On Fri, 2 Nov 2012 19:55:07 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Pretty astonishing how far apart these two members landed ... Especially since
> I've already removed almost 200 lines in between.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 10 +++++++---
> drivers/gpu/drm/i915/i915_gem.c | 8 ++++----
> drivers/gpu/drm/i915/i915_irq.c | 6 +++---
> drivers/gpu/drm/i915/i915_sysfs.c | 6 +++---
> 4 files changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 07da179..b30ac11 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -599,6 +599,11 @@ struct i915_dri1_state {
> uint32_t counter;
> };
>
> +struct intel_l3_parity {
> + u32 *remap_info;
> + struct work_struct error_work;
> +};
> +
> struct intel_fbc_state {
> enum no_fbc_reason no_fbc_reason;
>
> @@ -767,8 +772,6 @@ typedef struct drm_i915_private {
> /** PPGTT used for aliasing the PPGTT with the GTT */
> struct i915_hw_ppgtt *aliasing_ppgtt;
>
> - u32 *l3_remap_info;
> -
> struct shrinker inactive_shrinker;
>
> /**
> @@ -872,6 +875,8 @@ typedef struct drm_i915_private {
>
> bool mchbar_need_disable;
>
> + struct intel_l3_parity l3_parity;
> +
> /* gen6+ rps state */
> struct intel_gen6_power_mgmt rps;
>
> @@ -891,7 +896,6 @@ typedef struct drm_i915_private {
> struct drm_property *broadcast_rgb_property;
> struct drm_property *force_audio_property;
>
> - struct work_struct parity_error_work;
> bool hw_contexts_disabled;
> uint32_t hw_context_size;
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 50bf8c2..4c19d25 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3834,7 +3834,7 @@ void i915_gem_l3_remap(struct drm_device *dev)
> if (!IS_IVYBRIDGE(dev))
> return;
>
> - if (!dev_priv->mm.l3_remap_info)
> + if (!dev_priv->l3_parity.remap_info)
> return;
>
> misccpctl = I915_READ(GEN7_MISCCPCTL);
> @@ -3843,12 +3843,12 @@ void i915_gem_l3_remap(struct drm_device *dev)
>
> for (i = 0; i < GEN7_L3LOG_SIZE; i += 4) {
> u32 remap = I915_READ(GEN7_L3LOG_BASE + i);
> - if (remap && remap != dev_priv->mm.l3_remap_info[i/4])
> + if (remap && remap != dev_priv->l3_parity.remap_info[i/4])
> DRM_DEBUG("0x%x was already programmed to %x\n",
> GEN7_L3LOG_BASE + i, remap);
> - if (remap && !dev_priv->mm.l3_remap_info[i/4])
> + if (remap && !dev_priv->l3_parity.remap_info[i/4])
> DRM_DEBUG_DRIVER("Clearing remapped register\n");
> - I915_WRITE(GEN7_L3LOG_BASE + i, dev_priv->mm.l3_remap_info[i/4]);
> + I915_WRITE(GEN7_L3LOG_BASE + i, dev_priv->l3_parity.remap_info[i/4]);
> }
>
> /* Make sure all the writes land before disabling dop clock gating */
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index b92e6bfb..2c40127 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -409,7 +409,7 @@ static void gen6_pm_rps_work(struct work_struct *work)
> static void ivybridge_parity_work(struct work_struct *work)
> {
> drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t,
> - parity_error_work);
> + l3_parity.error_work);
> u32 error_status, row, bank, subbank;
> char *parity_event[5];
> uint32_t misccpctl;
> @@ -473,7 +473,7 @@ static void ivybridge_handle_parity_error(struct drm_device *dev)
> I915_WRITE(GTIMR, dev_priv->gt_irq_mask);
> spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
>
> - queue_work(dev_priv->wq, &dev_priv->parity_error_work);
> + queue_work(dev_priv->wq, &dev_priv->l3_parity.error_work);
> }
>
> static void snb_gt_irq_handler(struct drm_device *dev,
> @@ -2681,7 +2681,7 @@ void intel_irq_init(struct drm_device *dev)
> INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
> INIT_WORK(&dev_priv->error_work, i915_error_work_func);
> INIT_WORK(&dev_priv->rps.work, gen6_pm_rps_work);
> - INIT_WORK(&dev_priv->parity_error_work, ivybridge_parity_work);
> + INIT_WORK(&dev_priv->l3_parity.error_work, ivybridge_parity_work);
>
> dev->driver->get_vblank_counter = i915_get_vblank_counter;
> dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index 903eebd..9700ae9 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -162,7 +162,7 @@ i915_l3_write(struct file *filp, struct kobject *kobj,
> if (ret)
> return ret;
>
> - if (!dev_priv->mm.l3_remap_info) {
> + if (!dev_priv->l3_parity.remap_info) {
> temp = kzalloc(GEN7_L3LOG_SIZE, GFP_KERNEL);
> if (!temp) {
> mutex_unlock(&drm_dev->struct_mutex);
> @@ -182,9 +182,9 @@ i915_l3_write(struct file *filp, struct kobject *kobj,
> * at this point it is left as a TODO.
> */
> if (temp)
> - dev_priv->mm.l3_remap_info = temp;
> + dev_priv->l3_parity.remap_info = temp;
>
> - memcpy(dev_priv->mm.l3_remap_info + (offset/4),
> + memcpy(dev_priv->l3_parity.remap_info + (offset/4),
> buf + (offset/4),
> count);
>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2012-11-02 19:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 18:55 [PATCH 00/10] shrink dev_priv by 300 lines Daniel Vetter
2012-11-02 18:55 ` [PATCH 01/10] drm/i915: move the suspend/resume register file out of dev_priv Daniel Vetter
2012-11-02 19:06 ` Jesse Barnes
2012-11-02 18:55 ` [PATCH 02/10] drm/i915: move dev_priv->(rps|ips) out of line Daniel Vetter
2012-11-02 19:07 ` Jesse Barnes
2012-11-02 18:55 ` [PATCH 03/10] drm/i915: move pwrctx/renderctx to the other ilk power state Daniel Vetter
2012-11-02 19:07 ` Jesse Barnes
2012-11-02 18:55 ` [PATCH 04/10] drm/i915: move dri1 dungeon out of dev_priv Daniel Vetter
2012-11-02 19:09 ` Jesse Barnes
2012-11-02 18:55 ` [PATCH 05/10] drm/i915: extract dev_priv fbc state into separate substruct Daniel Vetter
2012-11-02 19:09 ` Jesse Barnes
2012-11-03 10:06 ` Daniel Vetter
2012-11-02 18:55 ` [PATCH 06/10] drm/i915: extract l3_parity substruct from dev_priv Daniel Vetter
2012-11-02 19:10 ` Jesse Barnes [this message]
2012-11-02 21:56 ` Daniel Vetter
2012-11-02 18:55 ` [PATCH 07/10] drm/i915: move dev_priv->mm out of line Daniel Vetter
2012-11-02 18:55 ` [PATCH 08/10] drm/i915: extract hangcheck/reset/error_state state into substruct Daniel Vetter
2012-11-02 18:55 ` [PATCH 09/10] drm/i915: kill dev_priv->modeset_on_lid Daniel Vetter
2012-11-02 18:55 ` [PATCH 10/10] drm/i915: move fence_regs to the fence lru Daniel Vetter
2012-11-04 17:30 ` [PATCH 00/10] shrink dev_priv by 300 lines Ben Widawsky
2012-11-04 17:53 ` Daniel Vetter
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=20121102121025.4a3e4a64@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--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