public inbox for intel-gfx@lists.freedesktop.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 3/4] drm/i915: Use unsigned long for obj->user_pin_count
Date: Thu, 10 Oct 2013 11:56:52 +0300	[thread overview]
Message-ID: <20131010085652.GI13047@intel.com> (raw)
In-Reply-To: <1381346634-17973-4-git-send-email-daniel.vetter@ffwll.ch>

On Wed, Oct 09, 2013 at 09:23:53PM +0200, Daniel Vetter wrote:
> At least on linux sizeof(long) == sizeof(void*) and the thinking
> is that you can grab about as many references as there's memory.

Well, there can be more memory than there is address space.

Unchecked counters always leave me a bit uneasy, so an explicit check
is what I'd prefer to see.

> 
> Doesn't really matter, just a bit of OCD since the fixed size data
> type in a pure in-kernel datastructure look off.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7fa017b..f39a6b8 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1567,7 +1567,7 @@ struct drm_i915_gem_object {
>  	unsigned long *bit_17;
>  
>  	/** User space pin count and filp owning the pin */
> -	uint32_t user_pin_count;
> +	unsigned long user_pin_count;
>  	struct drm_file *pin_filp;
>  
>  	/** for phy allocated objects */
> -- 
> 1.8.1.4

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-10-10  8:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 19:23 [PATCH 0/4] framebuffer_init checks Daniel Vetter
2013-10-09 19:23 ` [PATCH 1/4] drm/i915: grab dev->struct_mutex around framebuffer_init Daniel Vetter
2013-10-09 19:23 ` [PATCH 2/4] drm/i915: prevent tiling changes on framebuffer backing storage Daniel Vetter
2013-10-09 21:29   ` Chris Wilson
2013-10-09 22:02     ` Daniel Vetter
2013-10-09 22:09       ` Daniel Vetter
2013-10-10 10:53         ` Ville Syrjälä
2013-10-09 19:23 ` [PATCH 3/4] drm/i915: Use unsigned long for obj->user_pin_count Daniel Vetter
2013-10-10  8:56   ` Ville Syrjälä [this message]
2013-10-10  8:59     ` Daniel Vetter
2013-10-10 11:29     ` [PATCH] " Daniel Vetter
2013-10-10 11:48       ` Chris Wilson
2013-10-10 12:46     ` Daniel Vetter
2013-10-10 12:48       ` Chris Wilson
2013-10-09 19:23 ` [PATCH 4/4] drm/i915: check gem bo size when creating framebuffers Daniel Vetter
2013-10-09 19:55   ` [PATCH] " Daniel Vetter
2013-10-10 11:42 ` [PATCH 0/4] framebuffer_init checks Ville Syrjälä
2013-10-16 20:08   ` 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=20131010085652.GI13047@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