From: Robert Foss <robert.foss@collabora.com>
To: Mauro Rossi <issor.oruam@gmail.com>, dri-devel@lists.freedesktop.org
Cc: jim.bish@intel.com
Subject: Re: [drm_hwcomposer] [PATCH] Take Connection state into account. (v2)
Date: Mon, 8 Jan 2018 14:41:17 +0100 [thread overview]
Message-ID: <d6c6421d-bfae-545c-b351-1cf605cbe0c5@collabora.com> (raw)
In-Reply-To: <20180105235959.1037-1-issor.oruam@gmail.com>
Hey Mauro!
Thanks for the v2, I would like to merge this, but the commit message is a
little bit wonky still :)
Let me clean it up for you, and if you're fine with me adding your S-o-B
I'll push it.
Also, if you want to avoid the slow mailing list back and forth, I would happily
help out over IRC too. You can find me on freenode with the nick robertfoss.
#dri-devel is also a good channel for this kind of work.
On 1/6/18 12:59 AM, Mauro Rossi wrote:
> Porting of original commit 76fb87e675 of Jim Bish in android-ia master to fdo
>
> Original commit message:
> "There are various places where we should be really taking connection
> state into account before querying the properties or assuming it
> as primary. This patch fixes them."
>
> (v2) checks on connection state are applied for both internal and external
> connectors, in order to select the correct primary, as opposed to setting,
> independently from its state, the first connector as primary
>
> This is essential to avoid following logcat errors on integrated and dedicated GPUs:
>
> ... 2245 2245 E hwc-drm-resources: Could not find a suitable encoder/crtc for display 2
> ... 2245 2245 E hwc-drm-resources: Failed CreateDisplayPipe 56 with -19
> ... 2245 2245 E hwcomposer-drm: Can't initialize Drm object -19
>
> Tested with i965 on Sandybridge and nouveau on GT120, GT610
This is what I would expect the commit message to look like:
Take Connection state into account
There are various places where we should be really taking connection
state into account before querying the properties or assuming it
as primary. This patch fixes them.
Checks on connection state are applied for both internal and external
connectors, in order to select the correct primary, as opposed to setting,
independently from its state, the first connector as primary.
This is essential to avoid following logcat errors on integrated and dedicated GPUs:
... 2245 2245 E hwc-drm-resources: Could not find a suitable encoder/crtc for
display 2
... 2245 2245 E hwc-drm-resources: Failed CreateDisplayPipe 56 with -19
... 2245 2245 E hwcomposer-drm: Can't initialize Drm object -19
Tested with i965 on Sandybridge and nouveau on GT120, GT610
Signed-off-by: Jim Bish <jim.bish@intel.com>
Signed-off-by: Mauro Rossi <Mauro Rossi <issor.oruam@gmail.com>
> ---
> drmresources.cpp | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drmresources.cpp b/drmresources.cpp
> index 32dd376..d582cfe 100644
> --- a/drmresources.cpp
> +++ b/drmresources.cpp
> @@ -159,7 +159,7 @@ int DrmResources::Init() {
>
> // First look for primary amongst internal connectors
> for (auto &conn : connectors_) {
> - if (conn->internal() && !found_primary) {
> + if (conn->state() == DRM_MODE_CONNECTED && conn->internal() && !found_primary) {
> conn->set_display(0);
> found_primary = true;
> } else {
> @@ -170,7 +170,7 @@ int DrmResources::Init() {
>
> // Then look for primary amongst external connectors
> for (auto &conn : connectors_) {
> - if (conn->external() && !found_primary) {
> + if (conn->state() == DRM_MODE_CONNECTED && conn->external() && !found_primary) {
> conn->set_display(0);
> found_primary = true;
> }
> @@ -288,6 +288,11 @@ int DrmResources::TryEncoderForDisplay(int display, DrmEncoder *enc) {
>
> int DrmResources::CreateDisplayPipe(DrmConnector *connector) {
> int display = connector->display();
> +
> + // skip not connected
> + if (connector->state() == DRM_MODE_DISCONNECTED)
> + return 0;
> +
> /* Try to use current setup first */
> if (connector->encoder()) {
> int ret = TryEncoderForDisplay(display, connector->encoder());
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-01-08 13:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 23:59 [drm_hwcomposer] [PATCH] Take Connection state into account. (v2) Mauro Rossi
2018-01-05 23:59 ` [drm_hwcomposer] [PATCH] Update external connectors list Mauro Rossi
2018-01-08 13:45 ` Robert Foss
2018-01-08 13:41 ` Robert Foss [this message]
2018-01-08 20:41 ` [drm_hwcomposer] [PATCH] Take Connection state into account. (v2) Sean Paul
2018-01-08 20:46 ` Sean Paul
2018-02-01 4:42 ` Mauro Rossi
2018-02-01 14:27 ` Sean Paul
2018-02-02 8:42 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2018-01-03 10:10 [drm_hwcomposer PATCH] " Mauro Rossi
2018-01-03 11:16 ` Robert Foss
2018-01-03 12:40 ` Mauro Rossi
2018-01-03 15:25 ` Robert Foss
2018-01-03 18:32 ` Bish, Jim
2018-01-04 17:46 ` Rob Herring
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=d6c6421d-bfae-545c-b351-1cf605cbe0c5@collabora.com \
--to=robert.foss@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=issor.oruam@gmail.com \
--cc=jim.bish@intel.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