Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hwcomposer 1.3 support #21

Merged
merged 3 commits into from
Jul 8, 2014

Conversation

morphis
Copy link
Contributor

@morphis morphis commented Jul 6, 2014

No description provided.

Some Android hwcomposer implementations expect all displays being initialized even if not
used.

Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Simon Busch <morphis@gravedo.de>
@morphis
Copy link
Contributor Author

morphis commented Jul 6, 2014

Using the new sourceCropf property is required with hwcomposer 1.3 as implementations tend to require it and ignore the other integer based ones.

@morphis
Copy link
Contributor Author

morphis commented Jul 7, 2014

Please wait a moment with merging this. Follow up commit will fix support for Android < 4.3

@sledges
Copy link
Contributor

sledges commented Jul 7, 2014

Thank you, will wait. So we won't have to merge siteshwar/android_hardware_qcom_display@95f7ed3 workaround thereafter ?

@morphis
Copy link
Contributor Author

morphis commented Jul 7, 2014

Right. Changes to the HAL should not be needed with but I didn't looked at this particular case as it's using MAX_DISPLAYS rather than HWC_NUM_DISPLAY_TYPES the other HALs are using.

@morphis
Copy link
Contributor Author

morphis commented Jul 7, 2014

Should be fine to be merged now. Build and runtime tested with 4.2 and 4.4 based builds.

layer->displayFrame = r;
layer->visibleRegionScreen.numRects = 1;
layer->visibleRegionScreen.rects = &layer->displayFrame;
layer->acquireFenceFd = -1;
layer->releaseFenceFd = -1;
#if ANDROID_VERSION_MAJOR >= 4 & ANDROID_VERSION_MINOR >= 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this will work, maybe using parentheses and the logical (&&) instead of bitwise (&) AND could be better:

#if (ANDROID_VERSION_MAJOR >= 4) && (ANDROID_VERSION_MINOR >= 3)

@thp
Copy link
Contributor

thp commented Jul 8, 2014

Added some minor comments. Rest looks good.

The addition of the planeAlpha attribute is one of the bad stories about the HAL
compatbility between different Android versions. It was added after 1.2 with jelly bean
but not marked as part of 1.2. It doesn't break the ABI. We're adding support for it
now depending on the Android version (>= 4.3).

Signed-off-by: Simon Busch <morphis@gravedo.de>
@morphis
Copy link
Contributor Author

morphis commented Jul 8, 2014

Sorry for that :) Fixed it and should be correct now.

sledges added a commit that referenced this pull request Jul 8, 2014
@sledges sledges merged commit 5d1a354 into mer-hybris:master Jul 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants