sdm: Fallback on scRGB layers
We don't know how to handle blending when scRGB layers show up. Fallback entirely to GPU. Bug: 72125973 Change-Id: Ib01ac0c920bd34f011f0a4d3e76e71d4c7b036e2
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
a448113e2e
commit
b653d0a759
@@ -481,6 +481,8 @@ void HWCDisplay::BuildLayerStack() {
|
||||
uint32_t color_mode_count = 0;
|
||||
display_intf_->GetColorModeCount(&color_mode_count);
|
||||
|
||||
bool extended_range = false;
|
||||
|
||||
// Add one layer for fb target
|
||||
// TODO(user): Add blit target layers
|
||||
for (auto hwc_layer : layer_set_) {
|
||||
@@ -501,6 +503,11 @@ void HWCDisplay::BuildLayerStack() {
|
||||
#endif
|
||||
}
|
||||
|
||||
auto range = hwc_layer->GetLayerDataspace() & HAL_DATASPACE_RANGE_MASK;
|
||||
if (range == HAL_DATASPACE_RANGE_EXTENDED) {
|
||||
extended_range = true;
|
||||
}
|
||||
|
||||
working_primaries = WidestPrimaries(working_primaries,
|
||||
layer->input_buffer.color_metadata.colorPrimaries);
|
||||
|
||||
@@ -628,7 +635,7 @@ void HWCDisplay::BuildLayerStack() {
|
||||
// fall back frame composition to GPU when client target is 10bit
|
||||
// TODO(user): clarify the behaviour from Client(SF) and SDM Extn -
|
||||
// when handling 10bit FBT, as it would affect blending
|
||||
if (Is10BitFormat(sdm_client_target->input_buffer.format)) {
|
||||
if (Is10BitFormat(sdm_client_target->input_buffer.format) || extended_range) {
|
||||
// Must fall back to client composition
|
||||
MarkLayersForClientComposition();
|
||||
}
|
||||
@@ -1829,6 +1836,7 @@ void HWCDisplay::MarkLayersForClientComposition() {
|
||||
Layer *layer = hwc_layer->GetSDMLayer();
|
||||
layer->flags.skip = true;
|
||||
}
|
||||
layer_stack_.flags.skip_present = true;
|
||||
}
|
||||
|
||||
void HWCDisplay::ApplyScanAdjustment(hwc_rect_t *display_frame) {
|
||||
|
||||
@@ -667,6 +667,9 @@ LayerBufferFormat HWCLayer::GetSDMFormat(const int32_t &source, const int flags)
|
||||
case HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS:
|
||||
format = kFormatYCbCr420P010Venus;
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_RGBA_FP16:
|
||||
format = kFormatInvalid;
|
||||
break;
|
||||
default:
|
||||
DLOGW("Unsupported format type = %d", source);
|
||||
return kFormatInvalid;
|
||||
|
||||
Reference in New Issue
Block a user