public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky <ben@bwidawsk.net>,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH 16/19] drm/i915: Fix l3 parity buffer offset
Date: Wed, 11 Sep 2013 14:45:28 +0300	[thread overview]
Message-ID: <20130911114528.GB20128@intel.com> (raw)
In-Reply-To: <1378852608-30281-17-git-send-email-rodrigo.vivi@gmail.com>

On Tue, Sep 10, 2013 at 07:36:45PM -0300, Rodrigo Vivi wrote:
> From: Ben Widawsky <benjamin.widawsky@intel.com>
> 
> The buf pointer used during l3_write is just char *, therefore it does
> not require the silly /4.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_sysfs.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index 05195c0..70de7a9 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -184,9 +184,7 @@ i915_l3_write(struct file *filp, struct kobject *kobj,
>  	if (temp)
>  		dev_priv->l3_parity.remap_info = temp;
>  
> -	memcpy(dev_priv->l3_parity.remap_info + (offset/4),
> -	       buf + (offset/4),
> -	       count);
> +	memcpy(dev_priv->l3_parity.remap_info + (offset/4), buf, count);

The commit message doesn't really reflect the fact that you completely
remove the offset from 'buf', which is actually the correct thing to do,
but the commit message should match the patch.

Also i915_l3_read() should get the same fix.

And while on the subject, I don't understand why we're playing weird
tricks with the remap_info memory allocation. Ie. why don't we simply
do this?

 ...
 if (!dev_priv->l3_parity.remap_info) {
 	dev_priv->l3_parity.remap_info = kzalloc(GEN7_L3LOG_SIZE,
 	                                         GFP_KERNEL);

 	if (!dev_priv->l3_parity.remap_info) {
 		mutex_unlock(&drm_dev->struct_mutex);
 		return -ENOMEM;
 	}
 }
 ...

>  
>  	i915_gem_l3_remap(drm_dev);
>  
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-09-11 11:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 22:36 [PATCH 00/19] drm-intel-collector push simple patches for review Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 01/19] drm/i915: check that the i965g/gm 4G limit is really obeyed Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 02/19] drm/i915: Cancel outstanding modeset workers before suspend Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 03/19] drm/i915: Move the conditional seqno query into the tracepoint Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 04/19] drm/i915: Add some missing steps to i915_driver_load error path Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 05/19] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 06/19] drm/i915: Align tiled scanouts from stolen memory to 256k in the GTT Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 07/19] drm/i915: Pair seqno completion tracepoint with its dispatch Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 08/19] drm/i915: write D_COMP using the mailbox Rodrigo Vivi
2013-09-19  9:58   ` Damien Lespiau
2013-09-19 12:11     ` Daniel Vetter
2013-09-10 22:36 ` [PATCH 09/19] drm/i915: Initialise min/max frequencies before updating RPS registers Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 10/19] drm/i915: Delay the relase of the forcewake by a jiffie Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 11/19] drm/i915: Add a tracepoint for using a semaphore Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 12/19] drm/i915: Write RING_TAIL once per-request Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 13/19] drm/i915: Boost RPS frequency for CPU stalls Rodrigo Vivi
2013-09-10 22:53   ` Chris Wilson
2013-09-10 22:36 ` [PATCH 14/19] drm/i915: Tweak RPS thresholds to more aggressively downclock Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 15/19] drm/i915: i915.quirks_set/quirks_mask overrides dmi match Rodrigo Vivi
2013-09-11  8:21   ` [Intel-gfx] " Jani Nikula
2013-09-17 16:42     ` Kamal Mostafa
2013-09-19 12:10       ` Jani Nikula
2013-09-10 22:36 ` [PATCH 16/19] drm/i915: Fix l3 parity buffer offset Rodrigo Vivi
2013-09-11 11:45   ` Ville Syrjälä [this message]
2013-09-11 17:07     ` Ben Widawsky
2013-09-11 17:44       ` Ville Syrjälä
2013-09-11 17:59         ` Ben Widawsky
2013-09-10 22:36 ` [PATCH 17/19] drm/i915: Fix HSW parity test Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 18/19] drm/i915: Allow GT3 Slice Shutdown on Boot Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 19/19] drm/i915: Allow Dynamically GT3 Slice Shutdown Rodrigo Vivi

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=20130911114528.GB20128@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ben@bwidawsk.net \
    --cc=benjamin.widawsky@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox