dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/radeon: Use ttm_bo_is_reserved
Date: Thu, 25 Oct 2012 09:44:50 +0200	[thread overview]
Message-ID: <5088EDF2.4090900@shipmail.org> (raw)
In-Reply-To: <50783045.7090304@canonical.com>

On 10/12/2012 04:59 PM, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> ---
>   drivers/gpu/drm/radeon/radeon_gart.c   |    2 +-
>   drivers/gpu/drm/radeon/radeon_object.c |    6 +++---
>   drivers/gpu/drm/radeon/radeon_object.h |    2 +-
>   3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
> index f0c06d1..0ee5e29 100644
> --- a/drivers/gpu/drm/radeon/radeon_gart.c
> +++ b/drivers/gpu/drm/radeon/radeon_gart.c
> @@ -1044,7 +1044,7 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev,
>   {
>   	struct radeon_bo_va *bo_va;
>   
> -	BUG_ON(!atomic_read(&bo->tbo.reserved));
> +	BUG_ON(!radeon_bo_is_reserved(bo));
>   	list_for_each_entry(bo_va, &bo->va, bo_list) {
>   		bo_va->valid = false;
>   	}
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 8b27dd6..808c444 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -403,7 +403,7 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
>   	int steal;
>   	int i;
>   
> -	BUG_ON(!atomic_read(&bo->tbo.reserved));
> +	BUG_ON(!radeon_bo_is_reserved(bo));
>   
>   	if (!bo->tiling_flags)
>   		return 0;
> @@ -529,7 +529,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo,
>   				uint32_t *tiling_flags,
>   				uint32_t *pitch)
>   {
> -	BUG_ON(!atomic_read(&bo->tbo.reserved));
> +	BUG_ON(!radeon_bo_is_reserved(bo));
>   	if (tiling_flags)
>   		*tiling_flags = bo->tiling_flags;
>   	if (pitch)
> @@ -539,7 +539,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo,
>   int radeon_bo_check_tiling(struct radeon_bo *bo, bool has_moved,
>   				bool force_drop)
>   {
> -	BUG_ON(!atomic_read(&bo->tbo.reserved));
> +	BUG_ON(!radeon_bo_is_reserved(bo));
>   
>   	if (!(bo->tiling_flags & RADEON_TILING_SURFACE))
>   		return 0;
> diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
> index 93cd491..5fc86b0 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.h
> +++ b/drivers/gpu/drm/radeon/radeon_object.h
> @@ -80,7 +80,7 @@ static inline unsigned long radeon_bo_size(struct radeon_bo *bo)
>   
>   static inline bool radeon_bo_is_reserved(struct radeon_bo *bo)
>   {
> -	return !!atomic_read(&bo->tbo.reserved);
> +	return ttm_bo_is_reserved(&bo->tbo);
>   }
>   
>   static inline unsigned radeon_bo_ngpu_pages(struct radeon_bo *bo)
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Looks good.
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>

      reply	other threads:[~2012-10-25  7:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 14:59 [PATCH 2/3] drm/radeon: Use ttm_bo_is_reserved Maarten Lankhorst
2012-10-25  7:44 ` Thomas Hellstrom [this message]

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=5088EDF2.4090900@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@canonical.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;
as well as URLs for NNTP newsgroup(s).