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

Gfx release ww30 #11

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8475e7d
Remove ENABLE_RBC to disable rbc
js0701 Nov 14, 2018
4a087b6
Merge branch 'upstream-ww49' into celadon_master
jennycao Dec 12, 2018
0e751d6
Revert "Remove ENABLE_RBC to disable rbc"
jennycao Dec 12, 2018
d52fb86
Merge branch 'upstream-ww02' into celadon_master
jennycao Jan 15, 2019
3e6bbd9
Revert "Return false for none of DrmModeMode"
Shao-Feng Jan 9, 2019
47de2fe
Merge branch 'upstream-ww04' into celadon_master
jennycao Jan 30, 2019
3cd767f
Fix the null pointer and out-of array issues found by kclocwork (#542)
Shao-Feng Feb 19, 2019
d1980bb
Follow klocwork coding guide for null checking. (#552)
Shao-Feng Mar 4, 2019
4add934
Fix the ACRN build error
yhe39 Mar 12, 2019
82c1e8b
Merge branch 'upstream_ww11' into celadon_master
jennycao Mar 20, 2019
84df689
Add nullpoint checking for GetBuffer invoking.
Shao-Feng Mar 26, 2019
3b59b47
Check if hwc is drm master by default in initialization
Shao-Feng May 14, 2019
a199ce0
Merge branch 'upstream-ww22' into celadon-master
jennycao May 29, 2019
a1999b1
Merge branch 'upstream_ww24' into jenny/gfx_release_ww24
jennycao Jun 19, 2019
6f92498
Merge pull request #7 from jennycao/jenny/gfx_release_ww24
jennycao Jun 20, 2019
5baea2b
Fix klocwork issues in GFX domain
yuanzhel Jun 21, 2019
89cc5e9
Fix klocwork issues in GFX domain
yuanzhel Jun 25, 2019
99259fd
Fix klocwork issues in GFX domain
yuanzhel Jun 21, 2019
66d7c94
Revert "[WA]Force refresh layer content on extend display"
Shao-Feng Jun 21, 2019
bd3bfee
Use AB24 format for video layer which left and width are odd
Shao-Feng Jul 3, 2019
d2a4f57
Fix klocwork issues in GFX domain
yuanzhel Jun 25, 2019
66123d2
Force VPP rendering when has_video and "ForceGpuForAllLayers"
Shao-Feng Jul 8, 2019
18d87a3
Add power mode set when connecting display even in connected state.
yugang Jul 8, 2019
4bb32a2
Filter EDIP for prefer and performance config
Shao-Feng Jul 6, 2019
86a4c73
Revert "Limits some monitors' modes due to hardware limitation."
Shao-Feng Jul 8, 2019
4f6f697
Set the dest layer as Video when the format is AB24
Shao-Feng Jul 11, 2019
0a97fae
Merge branch 'upstream_ww30' into jenny/gfx_release_ww30
jennycao Jul 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/compositor/gl/glprogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ GLProgram::GLProgram()
alpha_loc_(0),
premult_loc_(0),
tex_matrix_loc_(0),
solid_color_loc_(0),
initialized_(false) {
}

Expand Down
4 changes: 2 additions & 2 deletions common/core/gpudevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ void GpuDevice::ParseLogicalDisplaySetting(
if (logical_split_str.empty() ||
logical_split_str.find_first_not_of("0123456789") != std::string::npos)
return;
uint32_t physical_index = atoi(physical_index_str.c_str());
if (physical_index < 0)
if (physical_index_str.length() > 1)
return;
uint32_t physical_index = atoi(physical_index_str.c_str());
uint32_t logical_split_num = atoi(logical_split_str.c_str());
if (logical_split_num <= 1)
return;
Expand Down
2 changes: 1 addition & 1 deletion common/core/overlaylayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void OverlayLayer::ValidatePreviousFrameState(OverlayLayer* rhs,

if (!layer->HasVisibleRegionChanged() && !content_changed &&
surface_damage_.empty() && !layer->HasLayerContentChanged() &&
!(state_ & kNeedsReValidation) && !force_content_changed_) {
!(state_ & kNeedsReValidation)) {
state_ &= ~kLayerContentChanged;
}
}
Expand Down
15 changes: 2 additions & 13 deletions common/core/overlaylayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,11 @@ struct OverlayLayer {
}

const HwcRect<int>& GetSurfaceDamage() const {
if (force_content_changed_)
return display_frame_;
else
return surface_damage_;
return surface_damage_;
}

HwcRect<int>& GetSurfaceDamage() {
if (force_content_changed_)
return display_frame_;
else
return surface_damage_;
return surface_damage_;
}

uint32_t GetSourceCropWidth() const {
Expand Down Expand Up @@ -258,10 +252,6 @@ struct OverlayLayer {
void CloneLayer(const OverlayLayer* layer, const HwcRect<int>& display_frame,
ResourceManager* resource_manager, uint32_t z_order);

void SetForceContentChanged() {
force_content_changed_ = true;
}

void Dump();

private:
Expand Down Expand Up @@ -316,7 +306,6 @@ struct OverlayLayer {
uint32_t dataspace_ = 0;

uint32_t solid_color_ = 0;
bool force_content_changed_ = false;

HwcRect<float> source_crop_;
HwcRect<int> display_frame_;
Expand Down
51 changes: 38 additions & 13 deletions common/display/displayplanemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,28 @@ bool DisplayPlaneManager::ValidateLayers(
OverlayPlane(temp.GetDisplayPlane(), temp.GetOverlayLayer()));
}

size_t video_layers = 0;
for (size_t lindex = add_index; lindex < layers.size(); lindex++) {
if (layers[lindex].IsVideoLayer())
video_layers++;
}

// In case we are forcing GPU composition for all layers and using a single
// plane.
if (disable_overlay) {
ISURFACETRACE("Forcing GPU For all layers %d %d %d %d \n", disable_overlay,
composition.empty(), add_index <= 0, layers.size());
ForceGpuForAllLayers(commit_planes, composition, layers, mark_later, false);
if (!video_layers) {
ISURFACETRACE("Forcing GPU For all layers %d %d %d %d \n",
disable_overlay, composition.empty(), add_index <= 0,
layers.size());
ForceGpuForAllLayers(commit_planes, composition, layers, mark_later,
false);
} else {
ISURFACETRACE("Forcing VPP For all layers %d %d %d %d \n",
disable_overlay, composition.empty(), add_index <= 0,
layers.size());
ForceVppForAllLayers(commit_planes, composition, layers, add_index,
mark_later, false);
}

*re_validation_needed = false;
*commit_checked = true;
Expand All @@ -134,11 +150,6 @@ bool DisplayPlaneManager::ValidateLayers(
j->get()->SetInUse(false);
}

size_t video_layers = 0;
for (size_t lindex = add_index; lindex < layers.size(); lindex++) {
if (layers[lindex].IsVideoLayer())
video_layers++;
}
size_t avail_planes = overlay_planes_.size() - composition.size();
if (!(overlay_planes_[overlay_planes_.size() - 1]->IsUniversal()))
avail_planes--;
Expand Down Expand Up @@ -393,7 +404,8 @@ bool DisplayPlaneManager::ValidateLayers(
}

if (validate_final_layers) {
ValidateFinalLayers(commit_planes, composition, layers, mark_later, false);
ValidateFinalLayers(commit_planes, composition, layers, mark_later, false,
add_index);
test_commit_done = true;
}

Expand Down Expand Up @@ -734,11 +746,14 @@ void DisplayPlaneManager::SetDisplayTransform(uint32_t transform) {
void DisplayPlaneManager::EnsureOffScreenTarget(DisplayPlaneState &plane) {
NativeSurface *surface = NULL;
// We only use media formats when video compostion for 1 layer
int dest_x = plane.GetDisplayFrame().left;
int dest_w = plane.GetDisplayFrame().right - dest_x;

bool video_separate =
plane.IsVideoPlane() && (plane.GetSourceLayers().size() == 1);
uint32_t preferred_format = 0;
uint32_t usage = hwcomposer::kLayerNormal;
if (video_separate) {
if (video_separate && !(dest_w % 2 || dest_x % 2)) {
preferred_format = plane.GetDisplayPlane()->GetPreferredVideoFormat();
} else {
preferred_format = plane.GetDisplayPlane()->GetPreferredFormat();
Expand Down Expand Up @@ -773,6 +788,8 @@ void DisplayPlaneManager::EnsureOffScreenTarget(DisplayPlaneState &plane) {
bool modifer_succeeded = false;
new_surface->Init(resource_manager_, preferred_format, usage, modifier,
&modifer_succeeded);
if (video_separate)
new_surface->GetLayer()->SetVideoLayer(true);

if (modifer_succeeded) {
plane.GetDisplayPlane()->PreferredFormatModifierValidated();
Expand All @@ -791,17 +808,25 @@ void DisplayPlaneManager::EnsureOffScreenTarget(DisplayPlaneState &plane) {
void DisplayPlaneManager::ValidateFinalLayers(
std::vector<OverlayPlane> &commit_planes,
DisplayPlaneStateList &composition, std::vector<OverlayLayer> &layers,
std::vector<NativeSurface *> &mark_later, bool recycle_resources) {
std::vector<NativeSurface *> &mark_later, bool recycle_resources,
size_t add_index) {
bool has_video = false;
for (DisplayPlaneState &plane : composition) {
if (plane.NeedsOffScreenComposition() && !plane.GetOffScreenTarget()) {
EnsureOffScreenTarget(plane);
}
if (!has_video && plane.IsVideoPlane())
has_video = true;
}

// If this combination fails just fall back to 3D for all layers.
if (!plane_handler_->TestCommit(commit_planes)) {
ForceGpuForAllLayers(commit_planes, composition, layers, mark_later,
recycle_resources);
if (!has_video)
ForceGpuForAllLayers(commit_planes, composition, layers, mark_later,
recycle_resources);
else
ForceVppForAllLayers(commit_planes, composition, layers, add_index,
mark_later, false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/display/displayplanemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class DisplayPlaneManager {
DisplayPlaneStateList &list,
std::vector<OverlayLayer> &layers,
std::vector<NativeSurface *> &mark_later,
bool recycle_resources);
bool recycle_resources, size_t add_index);

void ResetPlaneTarget(DisplayPlaneState &plane, OverlayPlane &overlay_plane);

Expand Down
2 changes: 0 additions & 2 deletions common/display/displayqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ void DisplayQueue::InitializeOverlayLayers(

layers.emplace_back();
OverlayLayer* overlay_layer = &(layers.back());
if (refrsh_display_id_ > 0)
overlay_layer->SetForceContentChanged();
OverlayLayer* previous_layer = NULL;
if (previous_size > z_order) {
previous_layer = &(in_flight_layers_.at(z_order));
Expand Down
21 changes: 13 additions & 8 deletions os/android/gralloc1bufferhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,21 @@ bool Gralloc1BufferHandler::CreateBuffer(uint32_t w, uint32_t h, int format,

set_format_(gralloc1_dvc, temp->gralloc1_buffer_descriptor_t_, pixel_format);
#ifdef ENABLE_RBC
uint64_t modifier = 0;
if (set_modifier_) {
if (preferred_modifier != -1) {
modifier = preferred_modifier;
if (preferred_modifier != 0) {
uint64_t modifier = 0;
if (set_modifier_) {
if (preferred_modifier != -1) {
modifier = preferred_modifier;
}
set_modifier_(gralloc1_dvc, temp->gralloc1_buffer_descriptor_t_,
modifier);
}
set_modifier_(gralloc1_dvc, temp->gralloc1_buffer_descriptor_t_, modifier);
}

if (modifier_used && modifier != DRM_FORMAT_MOD_NONE) {
*modifier_used = true;
if (modifier_used && modifier != DRM_FORMAT_MOD_NONE) {
*modifier_used = true;
}
} else {
*modifier_used = false;
}
#else
if (modifier_used) {
Expand Down
Loading