From: Sean Paul <seanpaul@chromium.org>
To: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Cc: ayan.halder@arm.com, liviu.dudau@arm.com,
dri-devel@lists.freedesktop.org, nd@arm.com
Subject: Re: [PATCH hwc v2 06/18] drm_hwcomposer: Add writeback connector support
Date: Mon, 16 Apr 2018 15:59:07 -0400 [thread overview]
Message-ID: <20180416195907.GU73214@art_vandelay> (raw)
In-Reply-To: <1523460149-1740-7-git-send-email-alexandru-cosmin.gheorghe@arm.com>
On Wed, Apr 11, 2018 at 04:22:17PM +0100, Alexandru Gheorghe wrote:
> Writeback connector is a special case of connector, which can be
> linked to a CRTC in order to get the result of the composition back to
> a memory buffer. This had not been merged to the mainline kernel yet,
> latest version of the kernel patches could be found here [1].
>
> [1] https://lists.freedesktop.org/archives/dri-devel/2018-February/167703.html
>
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> ---
> drmconnector.cpp | 42 +++++++++++++++++++++++++++++++++++++++++-
> drmconnector.h | 7 +++++++
> 2 files changed, 48 insertions(+), 1 deletion(-)
>
> diff --git a/drmconnector.cpp b/drmconnector.cpp
> index 145518f..e482832 100644
> --- a/drmconnector.cpp
> +++ b/drmconnector.cpp
> @@ -52,6 +52,26 @@ int DrmConnector::Init() {
> ALOGE("Could not get CRTC_ID property\n");
> return ret;
> }
> + if (writeback()) {
> + ret = drm_->GetConnectorProperty(*this, "WRITEBACK_PIXEL_FORMATS",
> + &writeback_pixel_formats_);
> + if (ret) {
> + ALOGE("Could not get WRITEBACK_PIXEL_FORMATS connector_id = %d\n", id_);
> + return ret;
> + }
> + ret =
> + drm_->GetConnectorProperty(*this, "WRITEBACK_FB_ID", &writeback_fb_id_);
Please break on the function arguments instead of the =
> + if (ret) {
> + ALOGE("Could not get WRITEBACK_FB_ID connector_id = %d\n", id_);
> + return ret;
> + }
> + ret = drm_->GetConnectorProperty(*this, "WRITEBACK_OUT_FENCE_PTR",
> + &writeback_out_fence_);
Like this :)
With that,
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> + if (ret) {
> + ALOGE("Could not get WRITEBACK_OUT_FENCE_PTR connector_id = %d\n", id_);
> + return ret;
> + }
> + }
> return 0;
> }
>
> @@ -78,8 +98,16 @@ bool DrmConnector::external() const {
> type_ == DRM_MODE_CONNECTOR_VGA;
> }
>
> +bool DrmConnector::writeback() const {
> +#ifdef DRM_MODE_CONNECTOR_WRITEBACK
> + return type_ == DRM_MODE_CONNECTOR_WRITEBACK;
> +#else
> + return false;
> +#endif
> +}
> +
> bool DrmConnector::valid_type() const {
> - return internal() || external();
> + return internal() || external() || writeback();
> }
>
> int DrmConnector::UpdateModes() {
> @@ -130,6 +158,18 @@ const DrmProperty &DrmConnector::crtc_id_property() const {
> return crtc_id_property_;
> }
>
> +const DrmProperty &DrmConnector::writeback_pixel_formats() const {
> + return writeback_pixel_formats_;
> +}
> +
> +const DrmProperty &DrmConnector::writeback_fb_id() const {
> + return writeback_fb_id_;
> +}
> +
> +const DrmProperty &DrmConnector::writeback_out_fence() const {
> + return writeback_out_fence_;
> +}
> +
> DrmEncoder *DrmConnector::encoder() const {
> return encoder_;
> }
> diff --git a/drmconnector.h b/drmconnector.h
> index 5601e06..e139730 100644
> --- a/drmconnector.h
> +++ b/drmconnector.h
> @@ -46,6 +46,7 @@ class DrmConnector {
>
> bool internal() const;
> bool external() const;
> + bool writeback() const;
> bool valid_type() const;
>
> int UpdateModes();
> @@ -58,6 +59,9 @@ class DrmConnector {
>
> const DrmProperty &dpms_property() const;
> const DrmProperty &crtc_id_property() const;
> + const DrmProperty &writeback_pixel_formats() const;
> + const DrmProperty &writeback_fb_id() const;
> + const DrmProperty &writeback_out_fence() const;
>
> const std::vector<DrmEncoder *> &possible_encoders() const {
> return possible_encoders_;
> @@ -88,6 +92,9 @@ class DrmConnector {
>
> DrmProperty dpms_property_;
> DrmProperty crtc_id_property_;
> + DrmProperty writeback_pixel_formats_;
> + DrmProperty writeback_fb_id_;
> + DrmProperty writeback_out_fence_;
>
> std::vector<DrmEncoder *> possible_encoders_;
> };
> --
> 2.7.4
>
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-04-16 19:59 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 15:22 [PATCH hwc v2 00/18] Add scene flattening support Alexandru Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 01/18] drm_hwcomposer: vsyncworker: Fix uninitialized enabled_ field Alexandru Gheorghe
2018-04-16 10:30 ` Robert Foss
2018-04-16 12:18 ` Alexandru-Cosmin Gheorghe
2018-04-17 13:45 ` Sean Paul
2018-04-17 14:09 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 02/18] drm_hwcomposer: vsyncworker: Fix deadlock on exit path Alexandru Gheorghe
2018-04-16 10:31 ` Robert Foss
2018-04-16 19:25 ` Sean Paul
2018-04-17 13:32 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 03/18] drm_hwcomposer: drmeventlistener: Set nl_pid to 0 Alexandru Gheorghe
2018-04-16 10:32 ` Robert Foss
2018-04-11 15:22 ` [PATCH hwc v2 04/18] drm_hwcomposer: Add resource manager class Alexandru Gheorghe
2018-04-17 15:33 ` Sean Paul
2018-04-17 16:08 ` Robert Foss
2018-04-18 10:12 ` Alexandru-Cosmin Gheorghe
2018-04-18 10:14 ` Robert Foss
2018-04-11 15:22 ` [PATCH hwc v2 05/18] drm_hwcomposer: Enable resource manager support Alexandru Gheorghe
2018-04-16 19:54 ` Sean Paul
2018-04-17 13:43 ` Alexandru-Cosmin Gheorghe
2018-04-17 14:22 ` Sean Paul
2018-04-17 14:26 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 06/18] drm_hwcomposer: Add writeback connector support Alexandru Gheorghe
2018-04-16 19:59 ` Sean Paul [this message]
2018-04-17 13:46 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 07/18] drm_hwcomposer: Add display field to Drmencoder Alexandru Gheorghe
2018-04-16 20:02 ` Sean Paul
2018-04-17 13:49 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 08/18] drm_hwcomposer: Parse and store possible_clones information Alexandru Gheorghe
2018-04-16 20:19 ` Sean Paul
2018-04-17 14:03 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 09/18] drm_hwcomposer: Handle writeback connectors Alexandru Gheorghe
2018-04-17 15:45 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 10/18] drm_hwcomposer: hwcutils: Add function for cloning a DrmHwcLayer Alexandru Gheorghe
2018-04-17 16:14 ` Sean Paul
2018-04-18 10:22 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 11/18] drm_hwcomposer: Add utility functions to copy displaycomposition internals Alexandru Gheorghe
2018-04-17 16:34 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 12/18] drm_hwcomposer: Add utility function to create an initialized composition Alexandru Gheorghe
2018-04-17 16:37 ` Sean Paul
2018-04-18 10:29 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 13/18] drm_hwcomposer: Pass buffer sizes to Prepareframebuffer Alexandru Gheorghe
2018-04-17 16:51 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 14/18] drm_hwcomposer: Fix race in ApplyFrame Alexandru Gheorghe
2018-04-17 17:02 ` Sean Paul
2018-04-18 10:43 ` Alexandru-Cosmin Gheorghe
2018-04-11 15:22 ` [PATCH hwc v2 15/18] drm_hwcomposer: Add worker to trigger scene flattenning Alexandru Gheorghe
2018-04-17 17:07 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 16/18] drm_hwcomposer: Find writeback connector for scene flattening Alexandru Gheorghe
2018-04-17 17:15 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 17/18] drm_hwcomposer: Flatten scene synchronously Alexandru Gheorghe
2018-04-17 17:47 ` Sean Paul
2018-04-18 11:14 ` Alexandru-Cosmin Gheorghe
2018-04-18 14:49 ` Sean Paul
2018-04-11 15:22 ` [PATCH hwc v2 18/18] drm_hwcomposer: Flatten scene asynchronously Alexandru Gheorghe
2018-04-12 23:18 ` [PATCH hwc v2 00/18] Add scene flattening support John Stultz
2018-04-13 9:52 ` Alexandru-Cosmin Gheorghe
2018-04-13 12:48 ` Alexandru-Cosmin Gheorghe
2018-04-18 17:21 ` John Stultz
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=20180416195907.GU73214@art_vandelay \
--to=seanpaul@chromium.org \
--cc=alexandru-cosmin.gheorghe@arm.com \
--cc=ayan.halder@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=liviu.dudau@arm.com \
--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