Skip to contentSkip to conversation

Take Connection state into account. (v2)

PATCH In review Mauro Rossi 4 participants 6 messages Jan 3, 2018 – Jan 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Take Connection state into account. (v2)

These changes avoid following logcat error 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

(v1) 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.

BUG=None.
TEST=System boots up and shows UI.

(v1) Signed-off-by: Jim Bish <[email protected]>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID, DVII, VGA) Tested with i965 on Sandybridge and nouveau on GT120, GT610

---
 drmconnector.cpp | 4 +++-
 drmresources.cpp | 9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
drmconnector.cpp +3 -1
index 247f56b..145518f 100644
@@ -73,7 +73,9 @@ bool DrmConnector::internal() const {
 }
 
 bool DrmConnector::external() const {
-  return type_ == DRM_MODE_CONNECTOR_HDMIA;
+  return type_ == DRM_MODE_CONNECTOR_HDMIA || type_ == DRM_MODE_CONNECTOR_DisplayPort ||
+         type_ == DRM_MODE_CONNECTOR_DVID || type_ == DRM_MODE_CONNECTOR_DVII ||
+         type_ == DRM_MODE_CONNECTOR_VGA;
 }
 
 bool DrmConnector::valid_type() const {
drmresources.cpp +7 -2
index 32dd376..d582cfe 100644
@@ -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());
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hey Mauro,

Thanks for the patch! It builds and looks good to me, but I have some suggestions however.

Quoted 8 lines · Mauro Rossi

These changes avoid following logcat error 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

It isn't quite clear clear which errors belong to which changes, to make this patch a bit more bisectable it would be nice to see independent commits created for each error.

Quoted 9 lines

(v1) 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.

BUG=None.
TEST=System boots up and shows UI.

Quoted 6 lines

(v1) Signed-off-by: Jim Bish <[email protected]>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID, DVII, VGA)
Tested with i965 on Sandybridge and nouveau on GT120, GT610

The commit message isn't really following the usual format. It doesn't need to include a changelog (that is typically placed between the "---" markers in the email instead),
and it is missing a signoff from the submitter (you).
The BUG and TEST fields are not strictly required either, but aren't a problem.

Quoted 15 lines
---
 drmconnector.cpp | 4 +++-
 drmresources.cpp | 9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
drmconnector.cpp +1 -1
index 247f56b..145518f 100644
@@ -73,7 +73,9 @@ bool DrmConnector::internal() const {
 }
 
 bool DrmConnector::external() const {
-  return type_ == DRM_MODE_CONNECTOR_HDMIA;
+  return type_ == DRM_MODE_CONNECTOR_HDMIA || type_ ==
Quoted 5 lines

DRM_MODE_CONNECTOR_DisplayPort ||
+ type_ == DRM_MODE_CONNECTOR_DVID || type_ ==
DRM_MODE_CONNECTOR_DVII ||
+ type_ == DRM_MODE_CONNECTOR_VGA;
}

The changes to external() should probably be broken out into it's own commit, since external() is called elsewhere changes to it _could_ introduce issues.

Quoted 38 lines

bool DrmConnector::valid_type() const {

drmresources.cpp +1 -1
index 32dd376..d582cfe 100644
@@ -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 {
drmresources.cpp +1 -1
@@ -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;
     }
drmresources.cpp +5 -0
@@ -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()) {
Quoted 1 line
     int ret = TryEncoderForDisplay(display, connector->encoder());

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

2018-01-03 12:16 GMT+01:00 Robert Foss <[email protected]>:

Quoted 16 lines

Hey Mauro,

Thanks for the patch! It builds and looks good to me, but I have some suggestions however.

Quoted 8 lines · Mauro Rossi

These changes avoid following logcat error 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

Quoted 4 lines

It isn't quite clear clear which errors belong to which changes, to make this patch a bit more bisectable it would be nice to see independent commits created for each error.

Hi Robert,

In this case I honestly do not think that splitting would add too much value,
original commit (v1) is well documented in [1] and tackles with bug in drmresources.cpp
which currently fails to find workable crtc -> encoder -> display output combination
for integrated and dedicated GPUs. Besides that it was also adding DisplayPort drm mode connector type

So changes in drmresources.cpp belong to solving "Could not find a suitable encoder/crtc for display X" problem,
which is a show stopper for enabling mainline graphics in android-x86

Other developers observed independently that the current implementation is "embedded oriented" and only checks the first display output, isn't it?

The only change I did in drmconnector.cpp is to account for the additional external drm mode connectors types
which were missing (DVID, DVII, VGA) . One question on my side: Do we need more?

Besides these minor types lists discussions, I would propose you to check with Jim Bish if he should have the credit for the patch
and review the coding of his changes.

Quoted 16 lines
Quoted 9 lines

(v1) 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.

BUG=None.
TEST=System boots up and shows UI.

Quoted 6 lines

(v1) Signed-off-by: Jim Bish <[email protected]>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID, DVII, VGA)
Tested with i965 on Sandybridge and nouveau on GT120, GT610

Quoted 5 lines

The commit message isn't really following the usual format. It doesn't need to include a changelog (that is typically placed between the "---" markers in the email instead),
and it is missing a signoff from the submitter (you).

Sorry I don't have a signature, as usually my patches need sign-off from professionals,
I'm a (crash test dummy) hobbyist..really :-)

Maybe Rob Herring, Qiang Yu or Chih-Wei could review and sign-off the proposed patch

Quoted 3 lines

The BUG and TEST fields are not strictly required either, but aren't a problem.

That part is the original Jim Bish commit message [1], my changes version is (v2)
Sorry if I was not clear enought

Quoted 13 lines
Quoted 13 lines
---
 drmconnector.cpp | 4 +++-
 drmresources.cpp | 9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
drmconnector.cpp +0 -0
index 247f56b..145518f 100644
@@ -73,7 +73,9 @@ bool DrmConnector::internal() const {
 }
 
Quoted 13 lines
Quoted 8 lines
drmconnector.cpp +1 -1
 bool DrmConnector::external() const {
-  return type_ == DRM_MODE_CONNECTOR_HDMIA;
+  return type_ == DRM_MODE_CONNECTOR_HDMIA || type_ ==

DRM_MODE_CONNECTOR_DisplayPort ||
+ type_ == DRM_MODE_CONNECTOR_DVID || type_ ==
DRM_MODE_CONNECTOR_DVII ||
+ type_ == DRM_MODE_CONNECTOR_VGA;
}

The changes to external() should probably be broken out into it's own commit, since external() is called elsewhere changes to it _could_ introduce issues.

Will you check the code, involving Jim Bish if necessary, about these potential issues?
I am available to perform changes/tests, but the original maker will be better.
Cheers

Mauro

Quoted 29 lines
Quoted 29 lines

bool DrmConnector::valid_type() const {

drmresources.cpp +1 -1
index 32dd376..d582cfe 100644
@@ -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 {
drmresources.cpp +1 -1
@@ -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;
     }
drmresources.cpp +0 -0
@@ -288,6 +288,11 @@ int DrmResources::TryEncoderForDisplay(int
 display, DrmEncoder *enc) {
 
Quoted 11 lines
Quoted 10 lines
drmresources.cpp +5 -0
 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());

[1]
https://github.com/android-ia/external-drm_hwcomposer/commit/76fb87e675a20449d1261fccba5303aee7be3dba

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hey Mauro,

Quoted 36 lines · Mauro Rossi

2018-01-03 12:16 GMT+01:00 Robert Foss <[email protected]>:

Quoted 14 lines

Hey Mauro,
/
Thanks for the patch! It builds and looks good to me, but I have some
suggestions however.

Quoted 6 lines · Mauro Rossi

These changes avoid following logcat error 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

Quoted 7 lines

with

Quoted 2 lines

-19
... 2245 2245 E hwcomposer-drm: Can't initialize Drm object -19

It isn't quite clear clear which errors belong to which changes, to make this patch a bit more bisectable it would be nice to see independent commits created for each error.

Hi Robert,

In this case I honestly do not think that splitting would add too much value,
original commit (v1) is well documented in [1] and tackles with bug in drmresources.cpp
which currently fails to find workable crtc -> encoder -> display output combination
for integrated and dedicated GPUs. Besides that it was also adding DisplayPort drm mode connector type

Quoted 8 lines

So changes in drmresources.cpp belong to solving "Could not find a suitable encoder/crtc for display X" problem,
which is a show stopper for enabling mainline graphics in android-x86

Other developers observed independently that the current implementation is "embedded oriented" and only checks the first display output,
isn't it?

As far as I remember it prioritizes the internal connections, if none are found, it will use the external ones.

Quoted 5 lines

The only change I did in drmconnector.cpp is to account for the additional external drm mode connectors types
which were missing (DVID, DVII, VGA) . One question on my side: Do we need more?

I think they can be added as need be, that's been the process this far.

Quoted 4 lines

Besides these minor types lists discussions, I would propose you to check with Jim Bish if he should have the credit for the patch and review the coding of his changes.

So, I think we could just have both of you SOBs in the commit message, and the would be fine.

Quoted 26 lines
Quoted 19 lines
Quoted 8 lines

(v1) 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.

Quoted 7 lines

BUG=None.
TEST=System boots up and shows UI.

(v1) Signed-off-by: Jim Bish <[email protected]>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID,

DVII,

Quoted 2 lines

VGA)
Tested with i965 on Sandybridge and nouveau on GT120, GT610

Quoted 6 lines

The commit message isn't really following the usual format. It doesn't
need to include a changelog (that is typically placed between the "---"
markers in the email instead),
and it is missing a signoff from the submitter (you).

Quoted 6 lines

Sorry I don't have a signature, as usually my patches need sign-off from professionals,
I'm a (crash test dummy) hobbyist..really :-)

Maybe Rob Herring, Qiang Yu or Chih-Wei could review and sign-off the proposed patch

If you've tested or modified the code I would encourage you to add your Signoff-by or Tested-by.

Quoted 9 lines
Quoted 5 lines

The BUG and TEST fields are not strictly required either, but aren't a
problem.

That part is the original Jim Bish commit message [1], my changes version is (v2)
Sorry if I was not clear enought

That's quite alright. So let's clean up this commit message, and add your Tested-by or Signoff-by (depending on if you changed any of the code) and then I'll merge it.

Lastly, thanks for having a look at this, your contributions are very welcome!

Quoted 27 lines
Quoted 13 lines
Quoted 13 lines
 
---
 drmconnector.cpp | 4 +++-
 drmresources.cpp | 9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
drmconnector.cpp +0 -0
index 247f56b..145518f 100644
@@ -73,7 +73,9 @@ bool DrmConnector::internal() const {
 }
 
Quoted 13 lines
Quoted 8 lines
drmconnector.cpp +1 -1
 bool DrmConnector::external() const {
-  return type_ == DRM_MODE_CONNECTOR_HDMIA;
+  return type_ == DRM_MODE_CONNECTOR_HDMIA || type_ ==

DRM_MODE_CONNECTOR_DisplayPort ||
+ type_ == DRM_MODE_CONNECTOR_DVID || type_ ==
DRM_MODE_CONNECTOR_DVII ||
+ type_ == DRM_MODE_CONNECTOR_VGA;
}

The changes to external() should probably be broken out into it's own
commit, since external() is called elsewhere changes to it _could_ introduce issues.

Quoted 7 lines

Will you check the code, involving Jim Bish if necessary, about these potential issues?
I am available to perform changes/tests, but the original maker will be better.
Cheers

Mauro

I won't, but it's ok the way it is, making small atomic patches is preferable in general.

Quoted 45 lines
Quoted 32 lines

drmresources.cpp int DrmResources::Init() { · line 162

Quoted 13 lines

bool DrmConnector::valid_type() const {

drmresources.cpp +1 -1
index 32dd376..d582cfe 100644
@@ -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()

&&

drmresources.cpp int DrmResources::Init() { · line 173

Quoted 10 lines
drmresources.cpp +0 -0
 !found_primary) {
       conn->set_display(0);
       found_primary = true;
     } else {
drmresources.cpp +1 -1
@@ -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()

&&

Quoted 7 lines
drmresources.cpp +0 -0
 !found_primary) {
       conn->set_display(0);
       found_primary = true;
     }
drmresources.cpp +0 -0
@@ -288,6 +288,11 @@ int DrmResources::TryEncoderForDisplay(int
 display, DrmEncoder *enc) {
 
Quoted 12 lines
Quoted 11 lines
drmresources.cpp +5 -0
 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());

Quoted 3 lines

[1] https://github.com/android-ia/external-drm_hwcomposer/commit/76fb
87e675a20449d1261fccba5303aee7be3dba

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to Mauro Rossi

On Wed, 2018-01-03 at 13:40 +0100, Mauro Rossi wrote:

2018-01-03 12:16 GMT+01:00 Robert Foss <[email protected]<mailto:[email protected]>>:
Hey Mauro,

Thanks for the patch! It builds and looks good to me, but I have some suggestions however.

Quoted 8 lines · Mauro Rossi

These changes avoid following logcat error 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

It isn't quite clear clear which errors belong to which changes, to make this patch a bit more bisectable it would be nice to see independent commits created for each error.

Hi Robert,

In this case I honestly do not think that splitting would add too much value, original commit (v1) is well documented in [1] and tackles with bug in drmresources.cpp which currently fails to find workable crtc -> encoder -> display output combination for integrated and dedicated GPUs. Besides that it was also adding DisplayPort drm mode connector type

So changes in drmresources.cpp belong to solving "Could not find a suitable encoder/crtc for display X" problem, which is a show stopper for enabling mainline graphics in android-x86

Other developers observed independently that the current implementation is "embedded oriented" and only checks the first display output, isn't it?

The only change I did in drmconnector.cpp is to account for the additional external drm mode connectors types which were missing (DVID, DVII, VGA) . One question on my side: Do we need more?

Besides these minor types lists discussions, I would propose you to check with Jim Bish if he should have the credit for the patch
and review the coding of his changes.
it would be proper to keep the original author signoff but ok to add additional signoff/testing, etc. I am not so worried about credit for this just patch but good to following proper procedures.

Quoted 9 lines

(v1) 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.

BUG=None.
TEST=System boots up and shows UI.

Quoted 6 lines

(v1) Signed-off-by: Jim Bish <[email protected]<mailto:[email protected]>>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID, DVII, VGA)
Tested with i965 on Sandybridge and nouveau on GT120, GT610

The commit message isn't really following the usual format. It doesn't need to include a changelog (that is typically placed between the "---" markers in the email instead),
and it is missing a signoff from the submitter (you).

Sorry I don't have a signature, as usually my patches need sign-off from professionals, I'm a (crash test dummy) hobbyist..really :-)

Maybe Rob Herring, Qiang Yu or Chih-Wei could review and sign-off the proposed patch

The BUG and TEST fields are not strictly required either, but aren't a problem.

That part is the original Jim Bish commit message [1], my changes version is (v2) Sorry if I was not clear enought

Quoted 15 lines
---
 drmconnector.cpp | 4 +++-
 drmresources.cpp | 9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
drmconnector.cpp +1 -1
index 247f56b..145518f 100644
@@ -73,7 +73,9 @@ bool DrmConnector::internal() const {
 }
 
 bool DrmConnector::external() const {
-  return type_ == DRM_MODE_CONNECTOR_HDMIA;
+  return type_ == DRM_MODE_CONNECTOR_HDMIA || type_ ==
Quoted 5 lines

DRM_MODE_CONNECTOR_DisplayPort ||
+ type_ == DRM_MODE_CONNECTOR_DVID || type_ ==
DRM_MODE_CONNECTOR_DVII ||
+ type_ == DRM_MODE_CONNECTOR_VGA;
}

The changes to external() should probably be broken out into it's own commit, since external() is called elsewhere changes to it _could_ introduce issues.

Will you check the code, involving Jim Bish if necessary, about these potential issues? I am available to perform changes/tests, but the original maker will be better. Cheers

Mauro

Quoted 38 lines

bool DrmConnector::valid_type() const {

drmresources.cpp +1 -1
index 32dd376..d582cfe 100644
@@ -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 {
drmresources.cpp +1 -1
@@ -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;
     }
drmresources.cpp +5 -0
@@ -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()) {
Quoted 1 line
     int ret = TryEncoderForDisplay(display, connector->encoder());

[1] https://github.com/android-ia/external-drm_hwcomposer/commit/76fb87e675a20449d1261fccba5303aee7be3dba

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to Mauro Rossi
Quoted 77 lines · Mauro Rossi

2018-01-03 12:16 GMT+01:00 Robert Foss <[email protected]>:

Quoted 17 lines

Hey Mauro,

Thanks for the patch! It builds and looks good to me, but I have some suggestions however.

Quoted 8 lines · Mauro Rossi

These changes avoid following logcat error 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

Quoted 3 lines

It isn't quite clear clear which errors belong to which changes, to make this patch a bit more bisectable it would be nice to see independent commits created for each error.

Hi Robert,

In this case I honestly do not think that splitting would add too much value,
original commit (v1) is well documented in [1] and tackles with bug in drmresources.cpp
which currently fails to find workable crtc -> encoder -> display output combination
for integrated and dedicated GPUs. Besides that it was also adding DisplayPort drm mode connector type

So changes in drmresources.cpp belong to solving "Could not find a suitable encoder/crtc for display X" problem,
which is a show stopper for enabling mainline graphics in android-x86

Other developers observed independently that the current implementation is "embedded oriented" and only checks the first display output, isn't it?

The only change I did in drmconnector.cpp is to account for the additional external drm mode connectors types
which were missing (DVID, DVII, VGA) . One question on my side: Do we need more?

Besides these minor types lists discussions, I would propose you to check with Jim Bish if he should have the credit for the patch
and review the coding of his changes.

Quoted 17 lines
Quoted 10 lines

(v1) 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.

BUG=None.
TEST=System boots up and shows UI.

Quoted 6 lines

(v1) Signed-off-by: Jim Bish <[email protected]>

(v2) porting of original commit 76fb87e675 of android-ia master with additional external connector types (DisplayPort, DVID, DVII, VGA)
Tested with i965 on Sandybridge and nouveau on GT120, GT610

Quoted 4 lines

The commit message isn't really following the usual format. It doesn't need to include a changelog (that is typically placed between the "---" markers in the email instead),
and it is missing a signoff from the submitter (you).

Quoted 3 lines

Sorry I don't have a signature, as usually my patches need sign-off from professionals,
I'm a (crash test dummy) hobbyist..really :-)

That's not what S-o-b means.

Quoted 2 lines

Maybe Rob Herring, Qiang Yu or Chih-Wei could review and sign-off the proposed patch

The S-o-b is the Developer's Certificate of Origin[1]. It's tracking the author(s) and vouching that the code has the appropriate license. It can be the original author (Jim), modifier (you), and/or committer (Robert or me).

Rob

[1] https://developercertificate.org/
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel