public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/overlay: Replace i915_gem_obj_ggtt_offset() with the known flip_addr
Date: Wed, 13 Apr 2016 13:10:45 +0100	[thread overview]
Message-ID: <570E3745.2040805@linux.intel.com> (raw)
In-Reply-To: <1460541160-1955-1-git-send-email-chris@chris-wilson.co.uk>


On 13/04/16 10:52, Chris Wilson wrote:
> When setting up the overlay page, we pin it into the GGTT (when using
> virtual addresses) and store the offset as overlay->flip_addr. Rather
> than doing a lookup of the GGTT address everytime, we can use the known
> address instead.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_overlay.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
> index 6694e9230cd5..e487ff18b42f 100644
> --- a/drivers/gpu/drm/i915/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/intel_overlay.c
> @@ -198,7 +198,7 @@ intel_overlay_map_regs(struct intel_overlay *overlay)
>   		regs = (struct overlay_registers __iomem *)overlay->reg_bo->phys_handle->vaddr;
>   	else
>   		regs = io_mapping_map_wc(ggtt->mappable,
> -					 i915_gem_obj_ggtt_offset(overlay->reg_bo));
> +					 overlay->flip_addr);
>
>   	return regs;
>   }
> @@ -1493,7 +1493,7 @@ intel_overlay_map_regs_atomic(struct intel_overlay *overlay)
>   			overlay->reg_bo->phys_handle->vaddr;
>   	else
>   		regs = io_mapping_map_atomic_wc(ggtt->mappable,
> -						i915_gem_obj_ggtt_offset(overlay->reg_bo));
> +						overlay->flip_addr);
>
>   	return regs;
>   }
> @@ -1523,10 +1523,7 @@ intel_overlay_capture_error_state(struct drm_device *dev)
>
>   	error->dovsta = I915_READ(DOVSTA);
>   	error->isr = I915_READ(ISR);
> -	if (OVERLAY_NEEDS_PHYSICAL(overlay->dev))
> -		error->base = (__force long)overlay->reg_bo->phys_handle->vaddr;
> -	else
> -		error->base = i915_gem_obj_ggtt_offset(overlay->reg_bo);
> +	error->base = overlay->flip_addr;
>
>   	regs = intel_overlay_map_regs_atomic(overlay);
>   	if (!regs)
>

I don't know this code, so I explored a bit and the patch looks correct.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-04-13 12:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  9:52 [PATCH 1/3] drm/i915/overlay: Replace i915_gem_obj_ggtt_offset() with the known flip_addr Chris Wilson
2016-04-13  9:52 ` [PATCH 2/3] io-mapping: Specify mapping size for io_mapping_map_wc() Chris Wilson
2016-04-13  9:52 ` [PATCH 3/3] drm/i915: Move ioremap_wc tracking onto VMA Chris Wilson
2016-04-13 12:30   ` Tvrtko Ursulin
2016-04-13 12:44     ` Chris Wilson
2016-04-13 14:47       ` [PATCH] " Chris Wilson
2016-04-13 15:07         ` kbuild test robot
2016-04-13 15:12         ` Chris Wilson
2016-04-15  9:40           ` Tvrtko Ursulin
2016-04-15 10:00             ` Chris Wilson
2016-04-15 10:19               ` Tvrtko Ursulin
2016-04-15 10:38                 ` Chris Wilson
2016-04-15 10:41                   ` Tvrtko Ursulin
2016-04-18 10:57                   ` Joonas Lahtinen
2016-04-13 12:10 ` Tvrtko Ursulin [this message]
2016-04-14 10:07 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/overlay: Replace i915_gem_obj_ggtt_offset() with the known flip_addr (rev2) Patchwork

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=570E3745.2040805@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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