* [RFC] drm/i915: Framebuffers need not be limited to 256MB on gen8+.
@ 2015-02-26 15:31 deepak.s
2015-02-26 16:01 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: deepak.s @ 2015-02-26 15:31 UTC (permalink / raw)
To: intel-gfx; +Cc: Satyanantha, Rama Gopal M
From: Deepak S <deepak.s@linux.intel.com>
The restriction of pinningFramebuffer to first 256MB is removed from gen8+.
Removing the restriction so that FB can be pinned in any space within
GTT/PPGTT. Also, for gen8+ no need to use pin_mappable for Framebuffer &
also we do not take fence as Framebuffer compression is not enabled.
Signed-off-by: Satyanantha, Rama Gopal M <rama.gopal.m.satyanantha@intel.com>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 9 +++++++--
drivers/gpu/drm/i915/intel_display.c | 11 +++++++----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 77a7315..c9f5b06 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3941,6 +3941,7 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
struct intel_engine_cs *pipelined)
{
u32 old_read_domains, old_write_domain;
+ struct drm_device *dev = obj->base.dev;
bool was_pin_display;
int ret;
@@ -3972,9 +3973,13 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
/* As the user may map the buffer once pinned in the display plane
* (e.g. libkms for the bootup splash), we have to ensure that we
- * always use map_and_fenceable for all scanout buffers.
+ * always use map_and_fenceable for all scanout buffers. No need
+ * of map_fenceable for >= gen8
*/
- ret = i915_gem_obj_ggtt_pin(obj, alignment, PIN_MAPPABLE);
+ if ((INTEL_INFO(dev)->gen >= 8))
+ ret = i915_gem_obj_ggtt_pin(obj, alignment, 0);
+ else
+ ret = i915_gem_obj_ggtt_pin(obj, alignment, PIN_MAPPABLE);
if (ret)
goto err_unpin_display;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index fad5f76..d3067be 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2267,11 +2267,14 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
/* Install a fence for tiled scan-out. Pre-i965 always needs a
* fence, whereas 965+ only requires a fence if using
* framebuffer compression. For simplicity, we always install
- * a fence as the cost is not that onerous.
+ * a fence as the cost is not that onerous. Fence is only required
+ * for gen 7 & below
*/
- ret = i915_gem_object_get_fence(obj);
- if (ret)
- goto err_unpin;
+ if ((INTEL_INFO(dev)->gen <= 7)) {
+ ret = i915_gem_object_get_fence(obj);
+ if (ret)
+ goto err_unpin;
+ }
i915_gem_object_pin_fence(obj);
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC] drm/i915: Framebuffers need not be limited to 256MB on gen8+.
2015-02-26 15:31 [RFC] drm/i915: Framebuffers need not be limited to 256MB on gen8+ deepak.s
@ 2015-02-26 16:01 ` Chris Wilson
2015-02-26 16:14 ` Damien Lespiau
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2015-02-26 16:01 UTC (permalink / raw)
To: deepak.s; +Cc: intel-gfx, Satyanantha, Rama Gopal M
On Thu, Feb 26, 2015 at 09:01:52PM +0530, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
>
> The restriction of pinningFramebuffer to first 256MB is removed from gen8+.
> Removing the restriction so that FB can be pinned in any space within
> GTT/PPGTT. Also, for gen8+ no need to use pin_mappable for Framebuffer &
> also we do not take fence as Framebuffer compression is not enabled.
Not quite, the reason why we restrict the framebuffer to mappable was
that certain display servers depend upon being able to GTT mmap the
framebuffer for direct access. Thus they would crash if we found that the
framebuffer was already pinned in an unreachable location. That legacy
code is currently still able to run on gen8+ and so you need to have
userspace request an ABI break...
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] drm/i915: Framebuffers need not be limited to 256MB on gen8+.
2015-02-26 16:01 ` Chris Wilson
@ 2015-02-26 16:14 ` Damien Lespiau
0 siblings, 0 replies; 3+ messages in thread
From: Damien Lespiau @ 2015-02-26 16:14 UTC (permalink / raw)
To: Chris Wilson, deepak.s, intel-gfx, ville.syrjala,
Satyanantha, Rama Gopal M
On Thu, Feb 26, 2015 at 04:01:32PM +0000, Chris Wilson wrote:
> On Thu, Feb 26, 2015 at 09:01:52PM +0530, deepak.s@linux.intel.com wrote:
> > From: Deepak S <deepak.s@linux.intel.com>
> >
> > The restriction of pinningFramebuffer to first 256MB is removed from gen8+.
> > Removing the restriction so that FB can be pinned in any space within
> > GTT/PPGTT. Also, for gen8+ no need to use pin_mappable for Framebuffer &
> > also we do not take fence as Framebuffer compression is not enabled.
>
> Not quite, the reason why we restrict the framebuffer to mappable was
> that certain display servers depend upon being able to GTT mmap the
> framebuffer for direct access. Thus they would crash if we found that the
> framebuffer was already pinned in an unreachable location. That legacy
> code is currently still able to run on gen8+ and so you need to have
> userspace request an ABI break...
Also, if we do that, we need to make sure we can't bind the buffer at
the top of GGTT as we need to be able to prefetch 128 PTEs past the fb?
(on SKL 136, "The end of the surface cannot be within 136 PTEs of the
end of the graphics memory").
--
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-26 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 15:31 [RFC] drm/i915: Framebuffers need not be limited to 256MB on gen8+ deepak.s
2015-02-26 16:01 ` Chris Wilson
2015-02-26 16:14 ` Damien Lespiau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox