All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/fbdev: Restore physical addresses for fb_mmap()
Date: Thu, 14 Nov 2019 14:08:14 +0200	[thread overview]
Message-ID: <20191114120814.GX1208@intel.com> (raw)
In-Reply-To: <20191113180633.3947-1-chris@chris-wilson.co.uk>

On Wed, Nov 13, 2019 at 06:06:33PM +0000, Chris Wilson wrote:
> fbdev uses the physical address of our framebuffer for its fb_mmap()
> routine. While we need to adapt this address for the new io BAR, we have
> to fix v5.4 first! The simplest fix is to restore the smem back to v5.4
> and we will then probably have to implement our fbops->fb_mmap() call
> back to handle local memory.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112256
> Fixes: 5f889b9a61dd ("drm/i915: Disregard drm_mode_config.fb_base")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_fbdev.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 3d1061470e76..48c960ca12fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -234,6 +234,11 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  	info->apertures->ranges[0].base = ggtt->gmadr.start;
>  	info->apertures->ranges[0].size = ggtt->mappable_end;
>  
> +	/* Our framebuffer is the entirety of fbdev's system memory */
> +	info->fix.smem_start =
> +		(unsigned long)(ggtt->gmadr.start + vma->node.start);
> +	info->fix.smem_len = vma->node.size;
> +
>  	vaddr = i915_vma_pin_iomap(vma);
>  	if (IS_ERR(vaddr)) {
>  		DRM_ERROR("Failed to remap framebuffer into virtual memory\n");
> @@ -243,10 +248,6 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  	info->screen_base = vaddr;
>  	info->screen_size = vma->node.size;
>  
> -	/* Our framebuffer is the entirety of fbdev's system memory */
> -	info->fix.smem_start = (unsigned long)info->screen_base;
> -	info->fix.smem_len = info->screen_size;
> -
>  	drm_fb_helper_fill_info(info, &ifbdev->helper, sizes);
>  
>  	/* If the object is shmemfs backed, it will have given us zeroed pages.
> -- 
> 2.24.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/fbdev: Restore physical addresses for fb_mmap()
Date: Thu, 14 Nov 2019 14:08:14 +0200	[thread overview]
Message-ID: <20191114120814.GX1208@intel.com> (raw)
Message-ID: <20191114120814.h5FknqrcKEM_Y1LX4skOFWK3PViTTEQg9H20I_nFovE@z> (raw)
In-Reply-To: <20191113180633.3947-1-chris@chris-wilson.co.uk>

On Wed, Nov 13, 2019 at 06:06:33PM +0000, Chris Wilson wrote:
> fbdev uses the physical address of our framebuffer for its fb_mmap()
> routine. While we need to adapt this address for the new io BAR, we have
> to fix v5.4 first! The simplest fix is to restore the smem back to v5.4
> and we will then probably have to implement our fbops->fb_mmap() call
> back to handle local memory.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112256
> Fixes: 5f889b9a61dd ("drm/i915: Disregard drm_mode_config.fb_base")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_fbdev.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 3d1061470e76..48c960ca12fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -234,6 +234,11 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  	info->apertures->ranges[0].base = ggtt->gmadr.start;
>  	info->apertures->ranges[0].size = ggtt->mappable_end;
>  
> +	/* Our framebuffer is the entirety of fbdev's system memory */
> +	info->fix.smem_start =
> +		(unsigned long)(ggtt->gmadr.start + vma->node.start);
> +	info->fix.smem_len = vma->node.size;
> +
>  	vaddr = i915_vma_pin_iomap(vma);
>  	if (IS_ERR(vaddr)) {
>  		DRM_ERROR("Failed to remap framebuffer into virtual memory\n");
> @@ -243,10 +248,6 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  	info->screen_base = vaddr;
>  	info->screen_size = vma->node.size;
>  
> -	/* Our framebuffer is the entirety of fbdev's system memory */
> -	info->fix.smem_start = (unsigned long)info->screen_base;
> -	info->fix.smem_len = info->screen_size;
> -
>  	drm_fb_helper_fill_info(info, &ifbdev->helper, sizes);
>  
>  	/* If the object is shmemfs backed, it will have given us zeroed pages.
> -- 
> 2.24.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-14 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 18:06 [PATCH] drm/i915/fbdev: Restore physical addresses for fb_mmap() Chris Wilson
2019-11-13 18:06 ` [Intel-gfx] " Chris Wilson
2019-11-13 18:44 ` Chris Wilson
2019-11-13 18:44   ` [Intel-gfx] " Chris Wilson
2019-11-13 18:53 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-11-13 18:53   ` [Intel-gfx] " Patchwork
2019-11-13 19:29 ` [PATCH] " Chris Wilson
2019-11-13 19:29   ` [Intel-gfx] " Chris Wilson
2019-11-14 12:08 ` Ville Syrjälä [this message]
2019-11-14 12:08   ` Ville Syrjälä

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=20191114120814.GX1208@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 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.