From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Brian Starkey <Brian.Starkey@arm.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
Intel GFX ML <intel-gfx@lists.freedesktop.org>,
IGT GPU Tools <igt-dev@lists.freedesktop.org>, nd <nd@arm.com>
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v5 1/6] lib/igt_kms: Add writeback support
Date: Wed, 6 Mar 2019 18:30:05 -0300 [thread overview]
Message-ID: <20190306213005.7hvbnwl7dohr3vuv@smtp.gmail.com> (raw)
In-Reply-To: <20190204133134.a6cpke3h6x53eeo3@DESKTOP-E1NTVVP.localdomain>
[-- Attachment #1.1: Type: text/plain, Size: 3483 bytes --]
Hi Liviu,
I’m using your patchset to guide my implementation of writeback in the
VKMS, so, first of all, thanks :)
During my work, I noticed that you’re setting the drmSetClientCap()
before drmModeGetResources() which make the writeback capability
‘invisible’ for drmModeGetResources(). I made the following change, and
I could pass the igt_display_require():
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index f4ff3a96..bb2d8e06 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1912,6 +1912,12 @@ void igt_display_require(igt_display_t *display, int drm_fd)
display->drm_fd = drm_fd;
+ drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
+ if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
+ display->is_atomic = 1;
+
+ drmSetClientCap(drm_fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
+
resources = drmModeGetResources(display->drm_fd);
if (!resources)
goto out;
@@ -1924,12 +1930,6 @@ void igt_display_require(igt_display_t *display, int drm_fd)
display->pipes = calloc(sizeof(igt_pipe_t), display->n_pipes);
igt_assert_f(display->pipes, "Failed to allocate memory for %d pipes\n", display->n_pipes);
- drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
- if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
- display->is_atomic = 1;
-
- drmSetClientCap(drm_fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
-
plane_resources = drmModeGetPlaneResources(display->drm_fd);
igt_assert(plane_resources);
I'm not 100% confident about this issue, because of this I will send an
RFC and see if I can get more details about this issue.
Additionally, if you need any help with this patchset I will be glad to
help since I’m using it \o/
Best Regards
Rodrigo Siqueira
On 02/04, Brian Starkey wrote:
> Hi Liviu,
>
> On Tue, Jan 15, 2019 at 05:47:42PM +0000, Liviu Dudau wrote:
> > From: Brian Starkey <brian.starkey@arm.com>
>
> [snip]
>
> >
> > +/**
> > + * igt_output_set_writeback_fb:
> > + * @output: Target output
> > + * @fb: Target framebuffer
> > + *
> > + * This function sets the given @fb to be used as the target framebuffer for the
> > + * writeback engine at the next atomic commit. It will also request a writeback
> > + * out fence that will contain the fd number of the out fence created by KMS if
> > + * the given @fb is valid.
> > + */
> > +void igt_output_set_writeback_fb(igt_output_t *output, struct igt_fb *fb)
> > +{
> > + igt_display_t *display = output->display;
> > +
> > + LOG(display, "%s: output_set_writeback_fb(%d)\n", output->name, fb ? fb->fb_id : 0);
> > +
> > + igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_FB_ID, fb ? fb->fb_id : 0);
> > + /* only request a writeback out fence if the framebuffer is valid */
> > + if (fb)
> > + igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR,
> > + (ptrdiff_t)&output->writeback_out_fence_fd);
>
> I'm still not sure (ptrdiff_t) is the right type here, (uintptr_t)
> seems better.
>
> Thanks,
> -Brian
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Rodrigo Siqueira
https://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-06 21:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 17:47 [igt-dev] [PATCH i-g-t v5 0/6] igt: Add support for testing writeback connectors Liviu Dudau
2019-01-15 17:47 ` [igt-dev] [PATCH i-g-t v5 1/6] lib/igt_kms: Add writeback support Liviu Dudau
2019-02-04 13:31 ` [Intel-gfx] " Brian Starkey
2019-03-06 21:30 ` Rodrigo Siqueira [this message]
2019-03-18 10:41 ` [igt-dev] " Liviu Dudau
2019-03-18 22:05 ` Rodrigo Siqueira
2019-03-20 14:46 ` Liviu Dudau
2019-01-15 17:47 ` [igt-dev] [PATCH i-g-t v5 2/6] kms_writeback: Add initial writeback tests Liviu Dudau
2019-01-15 17:47 ` [Intel-gfx] [PATCH i-g-t v5 3/6] lib: Add function to hash a framebuffer Liviu Dudau
2019-01-15 18:47 ` [igt-dev] " Chris Wilson
2019-01-16 11:20 ` Liviu Dudau
2019-01-16 11:50 ` Chris Wilson
2019-01-16 12:21 ` [igt-dev] [PATCH i-g-t v6] " Liviu Dudau
2019-01-15 17:47 ` [igt-dev] [PATCH i-g-t v5 4/6] kms_writeback: Add writeback-check-output Liviu Dudau
2019-01-15 17:47 ` [igt-dev] [PATCH i-g-t v5 5/6] lib/igt_kms: Add igt_output_clone_pipe for cloning Liviu Dudau
2019-02-04 13:27 ` Brian Starkey
2019-01-15 17:47 ` [igt-dev] [PATCH i-g-t v5 6/6] kms_writeback: Add tests using a cloned output Liviu Dudau
2019-01-15 19:08 ` [igt-dev] ✓ Fi.CI.BAT: success for igt: Add support for testing writeback connectors (rev3) Patchwork
2019-01-16 0:13 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-01-16 12:41 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt: Add support for testing writeback connectors (rev4) Patchwork
2019-02-04 13:36 ` [igt-dev] [PATCH i-g-t v5 0/6] igt: Add support for testing writeback connectors Brian Starkey
2019-03-06 21:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt: Add support for testing writeback connectors (rev5) 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=20190306213005.7hvbnwl7dohr3vuv@smtp.gmail.com \
--to=rodrigosiqueiramelo@gmail.com \
--cc=Brian.Starkey@arm.com \
--cc=boris.brezillon@free-electrons.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nd@arm.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