All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 01/11] drm/i915: fix the CFB size check
Date: Wed,  2 Dec 2015 10:15:17 -0200	[thread overview]
Message-ID: <1449058527-13425-2-git-send-email-paulo.r.zanoni@intel.com> (raw)
In-Reply-To: <1449058527-13425-1-git-send-email-paulo.r.zanoni@intel.com>

In function find_compression_threshold() we try to over-allocate CFB
space in order to reduce reallocations and fragmentation, and we're
not considering that at the CFB size check. Consider it.

There is also a longer-term plan to kill
dev_priv->fbc.uncompressed_size, but this will come later.

v2: Use drm_mm_node_allocated() (Chris).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 11fc528..9eb94c0 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -720,7 +720,8 @@ static int intel_fbc_setup_cfb(struct intel_crtc *crtc)
 	size = intel_fbc_calculate_cfb_size(crtc);
 	cpp = drm_format_plane_cpp(fb->pixel_format, 0);
 
-	if (size <= dev_priv->fbc.uncompressed_size)
+	if (drm_mm_node_allocated(&dev_priv->fbc.compressed_fb) &&
+	    size <= dev_priv->fbc.compressed_fb.size * dev_priv->fbc.threshold)
 		return 0;
 
 	/* Release any current block */
-- 
2.6.2

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

  reply	other threads:[~2015-12-02 12:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 12:15 [PATCH 00/11] Yet another FBC series, v3 part 2 v2 Paulo Zanoni
2015-12-02 12:15 ` Paulo Zanoni [this message]
2015-12-02 12:15 ` [PATCH 02/11] drm/i915: set dev_priv->fbc.crtc before scheduling the enable work Paulo Zanoni
2015-12-02 12:15 ` [PATCH 03/11] drm/i915: pass the crtc as an argument to intel_fbc_update() Paulo Zanoni
2015-12-02 12:15 ` [PATCH 04/11] drm/i915: introduce is_active/activate/deactivate to the FBC terminology Paulo Zanoni
2015-12-02 12:15 ` [PATCH 05/11] drm/i915: introduce intel_fbc_{enable, disable} Paulo Zanoni
2015-12-02 12:15 ` [PATCH 06/11] drm/i915: alloc/free the FBC CFB during enable/disable Paulo Zanoni
2015-12-02 12:15 ` [PATCH 07/11] drm/i915: check for FBC planes in the same place as the pipes Paulo Zanoni
2015-12-02 12:15 ` [PATCH 08/11] drm/i915: use a single intel_fbc_work struct Paulo Zanoni
2015-12-02 12:15 ` [PATCH 09/11] drm/i915: kill fbc.uncompressed_size Paulo Zanoni
2015-12-02 12:15 ` [PATCH 10/11] drm/i915: get rid of FBC {, de}activation messages Paulo Zanoni
2015-12-02 12:15 ` [PATCH 11/11] drm/i915: only recompress FBC after flushing a drawing operation Paulo Zanoni
2015-12-02 12:37 ` [PATCH 00/11] Yet another FBC series, v3 part 2 v2 Chris Wilson
2015-12-02 17:19   ` Zanoni, Paulo R
2015-12-02 17:30     ` chris

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=1449058527-13425-2-git-send-email-paulo.r.zanoni@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --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.