From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH igt] kms_frontbuffer_tracking: use the dirty ioctl after MMAP_WC calls
Date: Tue, 14 Jul 2015 16:29:12 -0300 [thread overview]
Message-ID: <1436902154-6979-4-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1436902154-6979-1-git-send-email-przanoni@gmail.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
We can't add this to igt_draw since igt_draw doesn't care whether it's
writing on a frontbuffer or not.
PS: the ENOSYS is for Kernels without the patch implementing the
IOCTL.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
tests/kms_frontbuffer_tracking.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index e162e91..1c45429 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -826,6 +826,21 @@ static struct rect pat4_get_rect(struct fb_region *fb, int r)
return rect;
}
+static void fb_dirty_ioctl(struct fb_region *fb, struct rect *rect)
+{
+ int rc;
+ drmModeClip clip = {
+ .x1 = rect->x,
+ .x2 = rect->x + rect->w,
+ .y1 = rect->y,
+ .y2 = rect->y + rect->h,
+ };
+
+ rc = drmModeDirtyFB(drm.fd, fb->fb->fb_id, &clip, 1);
+
+ igt_assert(rc == 0 || rc == -ENOSYS);
+}
+
static void draw_rect(struct draw_pattern_info *pattern, struct fb_region *fb,
enum igt_draw_method method, int r)
{
@@ -834,6 +849,9 @@ static void draw_rect(struct draw_pattern_info *pattern, struct fb_region *fb,
igt_draw_rect_fb(drm.fd, drm.bufmgr, NULL, fb->fb, method,
fb->x + rect.x, fb->y + rect.y,
rect.w, rect.h, rect.color);
+
+ if (method == IGT_DRAW_MMAP_WC)
+ fb_dirty_ioctl(fb, &rect);
}
static void draw_rect_igt_fb(struct draw_pattern_info *pattern,
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-14 19:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 19:29 [PATCH 0/4] FBC frontbuffer tracking + MMAP_WC fixes Paulo Zanoni
2015-07-14 19:29 ` [PATCH 1/4] drm/i915: fix FBC frontbuffer tracking flushing code Paulo Zanoni
2015-07-30 23:37 ` Rodrigo Vivi
2015-07-31 15:26 ` Paulo Zanoni
2015-07-14 19:29 ` [PATCH 2/4] drm/i915: don't call intel_fbc_update() at intel_unpin_work_fn() Paulo Zanoni
2015-07-30 23:40 ` Rodrigo Vivi
2015-07-14 19:29 ` Paulo Zanoni [this message]
2015-07-14 19:29 ` [PATCH 3/4] drm/i915: don't disable FBC for pipe A when flipping pipe B Paulo Zanoni
2015-07-15 12:33 ` Daniel Vetter
2015-07-30 23:46 ` Rodrigo Vivi
2015-07-14 19:29 ` [PATCH 4/4] drm/i915: special-case dirtyfb for frontbuffer tracking Paulo Zanoni
2015-07-30 23:48 ` Rodrigo Vivi
2015-08-05 8:01 ` Daniel Vetter
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=1436902154-6979-4-git-send-email-przanoni@gmail.com \
--to=przanoni@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox