From: Brian Starkey <brian.starkey@arm.com>
To: Gustavo Padovan <gustavo@padovan.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support
Date: Thu, 27 Oct 2016 11:18:47 +0100 [thread overview]
Message-ID: <20161027101847.GC18708@e106950-lin.cambridge.arm.com> (raw)
In-Reply-To: <20161026214357.GH12629@joana>
On Wed, Oct 26, 2016 at 07:43:57PM -0200, Gustavo Padovan wrote:
>2016-10-26 Brian Starkey <brian.starkey@arm.com>:
>
>> If userspace has asked for an out-fence for the writeback, we add a
>> fence to malidp_mw_job, to be signaled when the writeback job has
>> completed.
>>
>> Signed-off-by: Brian Starkey <brian.starkey@arm.com>
>> ---
>> drivers/gpu/drm/arm/malidp_hw.c | 5 ++++-
>> drivers/gpu/drm/arm/malidp_mw.c | 18 +++++++++++++++++-
>> drivers/gpu/drm/arm/malidp_mw.h | 3 +++
>> 3 files changed, 24 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c
>> index 1689547..3032226 100644
>> --- a/drivers/gpu/drm/arm/malidp_hw.c
>> +++ b/drivers/gpu/drm/arm/malidp_hw.c
>> @@ -707,8 +707,11 @@ static irqreturn_t malidp_se_irq(int irq, void *arg)
>> unsigned long irqflags;
>> /*
>> * We can't unreference the framebuffer here, so we queue it
>> - * up on our threaded handler.
>> + * up on our threaded handler. However, signal the fence
>> + * as soon as possible
>> */
>> + malidp_mw_job_signal(drm, malidp->current_mw, 0);
>
>Drivers should not deal with fences directly. We need some sort of
>drm_writeback_finished() that will do the signalling for you.
>
With a signature like this?
drm_writeback_finished(struct drm_connector_state *state);
I'll have to think about how to achieve that. The state isn't
refcounted and the driver isn't in charge of it's lifetime. I'm not
sure how/where to ensure the state doesn't get destroyed before its
been signaled.
-Brian
>Gustavo
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-10-27 10:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 8:54 [RFC PATCH v2 0/9] Introduce writeback connectors Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 1/9] drm: Add writeback connector type Brian Starkey
2016-10-26 11:00 ` Daniel Vetter
2016-10-26 12:42 ` Brian Starkey
2016-10-26 13:05 ` Daniel Vetter
2016-10-26 8:55 ` [RFC PATCH v2 2/9] drm: mali-dp: Clear CVAL when leaving config mode Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 3/9] drm: mali-dp: Rename malidp_input_format Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 4/9] drm: mali-dp: Add RGB writeback formats for DP550/DP650 Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 5/9] drm: mali-dp: Add support for writeback on DP550/DP650 Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 6/9] drm: mali-dp: Add writeback connector Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations Brian Starkey
2016-10-26 11:01 ` Daniel Vetter
2016-10-26 11:10 ` Brian Starkey
2016-10-26 21:30 ` Gustavo Padovan
2016-10-26 21:45 ` Gustavo Padovan
2016-10-27 8:28 ` Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback connectors Brian Starkey
2016-10-26 11:09 ` Daniel Vetter
2016-10-26 12:46 ` Brian Starkey
2016-10-26 21:40 ` Gustavo Padovan
2016-10-27 10:07 ` Brian Starkey
2016-10-26 8:55 ` [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support Brian Starkey
2016-10-26 21:43 ` Gustavo Padovan
2016-10-27 10:18 ` Brian Starkey [this message]
2016-10-27 11:25 ` Gustavo Padovan
2016-10-27 14:11 ` 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=20161027101847.GC18708@e106950-lin.cambridge.arm.com \
--to=brian.starkey@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).