All of lore.kernel.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
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix initial fb to use resource_size_t
Date: Tue, 7 Jul 2020 18:48:23 +0100	[thread overview]
Message-ID: <c78d5bb1-9bdb-b477-ed18-a08de4d354e4@linux.intel.com> (raw)
In-Reply-To: <20200707171517.28183-1-chris@chris-wilson.co.uk>


On 07/07/2020 18:15, Chris Wilson wrote:
> We lookup up the physical address of the inherited framebuffer, and
> presume that is an offset into the stolen memory region. As we are
> dealing with physical resources and their addresses, we need to use
> resource_size_t and not assume everything fits within a plain u32 [based
> on prior assumptions that we were simpling handling offsets into the
> GGTT not physical memory].
> 
> We made the switch to using resource_size_t for stolen in commit
> b7128ef125b4 ("drm/i915: prefer resource_size_t for everything stolen")
> 
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> References: b7128ef125b4 ("drm/i915: prefer resource_size_t for everything stolen")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index dff7c17f3d2b..6bfe3148f927 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3409,7 +3409,8 @@ initial_plane_vma(struct drm_i915_private *i915,
>   {
>   	struct drm_i915_gem_object *obj;
>   	struct i915_vma *vma;
> -	u32 base, size;
> +	resource_size_t base;
> +	resource_size_t size;
>   
>   	if (plane_config->size == 0)
>   		return NULL;
> 

There is also:

	base = round_down(plane_config->base,
			  I915_GTT_MIN_ALIGNMENT);

struct intel_initial_plane_config {
         struct intel_framebuffer *fb;
         struct i915_vma *vma;
         unsigned int tiling;
         int size;
         u32 base;
         u8 rotation;
};

So not sure, just throwing it out there.

Regards,

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

  parent reply	other threads:[~2020-07-07 17:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 17:15 [Intel-gfx] [PATCH] drm/i915/display: Fix initial fb to use resource_size_t Chris Wilson
2020-07-07 17:34 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-07-07 17:48 ` Tvrtko Ursulin [this message]
2020-07-07 18:00   ` [Intel-gfx] [PATCH] " Chris Wilson
2020-07-07 17:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-07-07 18:09 ` [Intel-gfx] [PATCH v2] " Chris Wilson
2020-07-07 18:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Fix initial fb to use resource_size_t (rev2) Patchwork
2020-07-07 18:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-07-07 22:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: Fix initial fb to use resource_size_t Patchwork
2020-07-07 22:17 ` [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: Fix initial fb to use resource_size_t (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=c78d5bb1-9bdb-b477-ed18-a08de4d354e4@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.