From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] lib/igt_fb: Use linear.fb in the converter
Date: Fri, 2 Nov 2018 21:06:50 +0200 [thread overview]
Message-ID: <20181102190651.25969-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20181102190651.25969-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The converter operates between the linear and shadow fbs. When using
the blitter path there is no particular reason to assume that the
linear fb and actual fb have the same strides for instance. Thus
consulting the actual fb for metadata is not really correct.
We can also simplify the mmap() path by copying all the original
fb metadata into linear.fb as there we map the original fb directly.
We just have to keep clearing linear.fb.gem_handle so that the
dtor knows which kind of beast it's got.
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_fb.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index a59b5a884d46..97310f70b635 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1946,7 +1946,7 @@ static void destroy_cairo_surface__convert(void *arg)
struct fb_convert cvt = {
.dst = {
.ptr = blit->base.linear.map,
- .fb = blit->base.fb,
+ .fb = &blit->base.linear.fb,
},
.src = {
@@ -1987,18 +1987,16 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
fb->tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED) {
setup_linear_mapping(fd, fb, &blit->base.linear);
} else {
+ blit->base.linear.fb = *fb;
blit->base.linear.fb.gem_handle = 0;
blit->base.linear.map = map_bo(fd, fb);
igt_assert(blit->base.linear.map);
- blit->base.linear.fb.size = fb->size;
- memcpy(blit->base.linear.fb.strides, fb->strides, sizeof(fb->strides));
- memcpy(blit->base.linear.fb.offsets, fb->offsets, sizeof(fb->offsets));
}
cvt.dst.ptr = blit->shadow_ptr;
cvt.dst.fb = &blit->shadow_fb;
cvt.src.ptr = blit->base.linear.map;
- cvt.src.fb = blit->base.fb;
+ cvt.src.fb = &blit->base.linear.fb;
fb_convert(&cvt);
fb->cairo_surface =
--
2.18.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-11-02 19:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 19:06 [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Fix the pixman converter Ville Syrjala
2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_fb: Assert converted formats harder Ville Syrjala
2018-11-02 19:06 ` Ville Syrjala [this message]
2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 4/4] lib/igt_fb: Generalize the slow read from gtt mmap handling Ville Syrjala
2018-11-02 19:17 ` Chris Wilson
2018-11-02 19:30 ` Ville Syrjälä
2018-11-02 19:32 ` Chris Wilson
2018-11-02 19:37 ` Ville Syrjälä
2018-11-02 19:37 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-11-05 15:19 ` Maxime Ripard
2018-11-05 15:33 ` Maarten Lankhorst
2018-11-05 15:41 ` Maxime Ripard
2018-11-05 16:07 ` Ville Syrjälä
2018-11-05 17:14 ` Maarten Lankhorst
2018-11-02 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_fb: Fix the pixman converter (rev2) Patchwork
2018-11-03 0:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20181102190651.25969-3-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox