mer-hybris / qt5-qpa-hwcomposer-plugin

Qt 5 QPA plugin for Droid hwcomposer
22 stars 45 forks source link

Scaling issue in experimental fork #87

Open Logic-gate opened 3 years ago

Logic-gate commented 3 years ago

Ahoy Sailors, and greeting to all...

I am working on HDMI support and came across an issue that has been slowly driving me mad.

01-13 20:13:12.828  3661  6144 E SDM     : CompManager::Prepare: Composition strategies exhausted for display = 1
01-13 20:13:12.828  3661  6144 E SDM     : HWCDisplay::PrepareLayerStack: Prepare failed. Error = 2
01-13 20:13:12.906  3661 11891 E SDM     : ScalarConfig::GetPipeScaleSettingsInfo: lib_scale_get_pipe_settings failed: status = 2

I found PrepareLayerStack(for msm8996, Pro1 has msm8998) here which seems to indicate a permission error; i have already given /sys/devices/virtual/graphics/fb2~fb1/* 0664 during testing, and even went as far as trying 0777 just to make sure; what's also maddening is that the qcom.early_boot.sh on the Pro1 (device I am testing on) already has proper permissions for hdmi support....but they seem to be ignored?!!

I couldn't find much on CompManager::Prepare nor ScalarConfig::GetPipeScaleSettingsInfo but I am assuming they are resolution scaling problems. PIC, note that the background color is that of my phone and the touchscreen is responsive, as in swiping left or right works.

I would very much appreciate any feedback...literally any feedback.

UPDATE:

here's the full log pastebin

chriadam commented 3 years ago

I'm certainly no expert, but isn't a DisplayError of 2 just kErrorNotSupported (and the "Prepare Failed..." message will only be printed in the specific case where the error is NOT a permissions error)?

bundyo commented 3 years ago

Found the 8998 file (also there, used the 8.1 release ones), here is a diff between 8996 and 8998:

https://editor.mergely.com/2V4STLS7/

These are the files: https://android.googlesource.com/platform/hardware/qcom/display/+/android-8.1.0_r10/msm8996/sdm/libs/hwc2/hwc_display.cpp https://android.googlesource.com/platform/hardware/qcom/display/+/android-8.1.0_r10/msm8998/sdm/libs/hwc2/hwc_display.cpp

Hope this can help.

Logic-gate commented 3 years ago

I'm certainly no expert, but isn't a DisplayError of 2 just kErrorNotSupported (and the "Prepare Failed..." message will only be printed in the specific case where the error is NOT a permissions error)?

Yes, it was pointed out to me that the error in question is not permission related. link

Logic-gate commented 3 years ago

Found the 8998 file (also there, used the 8.1 release ones), here is a diff between 8996 and 8998:

https://editor.mergely.com/2V4STLS7/

These are the files: https://android.googlesource.com/platform/hardware/qcom/display/+/android-8.1.0_r10/msm8996/sdm/libs/hwc2/hwc_display.cpp https://android.googlesource.com/platform/hardware/qcom/display/+/android-8.1.0_r10/msm8998/sdm/libs/hwc2/hwc_display.cpp

Hope this can help.

Cheers,

arqueiro commented 2 years ago

great to hear someone working on this. thanks!