From: Robert Foss <robert.foss@collabora.com>
To: Adrian Salido <salidoa@google.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH hwc] drm_hwcomposer: make sure primary plane is allocated for squash
Date: Tue, 17 Oct 2017 19:19:24 +0200 [thread overview]
Message-ID: <1508260764.2217.1.camel@collabora.com> (raw)
In-Reply-To: <20171002183127.176139-1-salidoa@google.com>
Hey Adrian,
This looks good to me. Pushed!
Sorry about the late reply, I was under the weather for a bit.
Would you be interested in commit rights to this project?
Rob.
On Mon, 2017-10-02 at 11:31 -0700, Adrian Salido wrote:
> There are instances where the primary plane may have been disabled,
> look
> through disabled planes as well to find primary plane to use for
> squash.
>
> Signed-off-by: Adrian Salido <salidoa@google.com>
> ---
> drmdisplaycompositor.cpp | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
> index a07d3588d1f5..80e3eba60ccf 100644
> --- a/drmdisplaycompositor.cpp
> +++ b/drmdisplaycompositor.cpp
> @@ -933,10 +933,13 @@ int
> DrmDisplayCompositor::SquashFrame(DrmDisplayComposition *src,
> goto move_layers_back;
> }
>
> - if (comp_plane.type() == DrmCompositionPlane::Type::kDisable) {
> + if (comp_plane.plane()->type() == DRM_PLANE_TYPE_PRIMARY)
> + squashed_comp.set_plane(comp_plane.plane());
> + else
> dst->AddPlaneDisable(comp_plane.plane());
> +
> + if (comp_plane.type() == DrmCompositionPlane::Type::kDisable)
> continue;
> - }
>
> for (auto i : comp_plane.source_layers()) {
> DrmHwcLayer &layer = src_layers[i];
> @@ -955,11 +958,12 @@ int
> DrmDisplayCompositor::SquashFrame(DrmDisplayComposition *src,
> squashed_comp.source_layers().push_back(
> squashed_comp.source_layers().size());
> }
> + }
>
> - if (comp_plane.plane()->type() == DRM_PLANE_TYPE_PRIMARY)
> - squashed_comp.set_plane(comp_plane.plane());
> - else
> - dst->AddPlaneDisable(comp_plane.plane());
> + if (squashed_comp.plane() == NULL) {
> + ALOGE("Primary plane not found for squash");
> + ret = -ENOTSUP;
> + goto move_layers_back;
> }
>
> ret = dst->SetLayers(dst_layers.data(), dst_layers.size(), false);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-10-17 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 18:31 [PATCH hwc] drm_hwcomposer: make sure primary plane is allocated for squash Adrian Salido
2017-10-17 17:19 ` Robert Foss [this message]
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=1508260764.2217.1.camel@collabora.com \
--to=robert.foss@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=salidoa@google.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