Rename DrmKmsPlan to LayerToPlaneJoiningPlan
Change-Id: I3824e57e3d890f4c59d48e1c7045cb0b7b649583
This commit is contained in:
parent
6c2df0cbdd
commit
5ee173b752
9 changed files with 30 additions and 31 deletions
|
|
@ -75,9 +75,9 @@ filegroup {
|
|||
"bufferinfo/BufferInfoMapperMetadata.cpp",
|
||||
|
||||
"compositor/CompositionPlanner.cpp",
|
||||
"compositor/DrmKmsPlan.cpp",
|
||||
"compositor/FlatteningController.cpp",
|
||||
"compositor/GenericCompositionPlanner.cpp",
|
||||
"compositor/LayerToPlaneJoiningPlan.cpp",
|
||||
|
||||
"drm/DrmAtomicStateManager.cpp",
|
||||
"drm/DrmConnector.cpp",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
struct DrmKmsPlan;
|
||||
struct LayerToPlaneJoiningPlan;
|
||||
class HwcDisplay;
|
||||
class HwcLayer;
|
||||
|
||||
|
|
@ -49,10 +49,11 @@ class CompositionPlanner {
|
|||
// The resulting composition type for each layer.
|
||||
CompositionTypeMap composition_types{};
|
||||
// The DrmKms resources required for the composition. The lifetime of
|
||||
// the DrmKmsPlan ensures that corresponding drm resources are reserved
|
||||
// for use by this display. As such, the caller must ensure that the
|
||||
// DrmKmsPlan is not destructed before the composition is committed.
|
||||
std::shared_ptr<DrmKmsPlan> composition_plan = nullptr;
|
||||
// the LayerToPlaneJoiningPlan ensures that corresponding drm resources are
|
||||
// reserved for use by this display. As such, the caller must ensure that
|
||||
// the LayerToPlaneJoiningPlan is not destructed before the composition is
|
||||
// committed.
|
||||
std::shared_ptr<LayerToPlaneJoiningPlan> composition_plan = nullptr;
|
||||
// Reason the composition was flattened, or |kNone| if it wasn't.
|
||||
FlattenReason flatten_reason = FlattenReason::kNone;
|
||||
// Whether the cursor plane was successfully validated, or |nullopt| if it
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
struct DrmKmsPlan;
|
||||
struct LayerToPlaneJoiningPlan;
|
||||
class HwcDisplay;
|
||||
class HwcLayer;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#define LOG_TAG "drmhwc"
|
||||
|
||||
#include "DrmKmsPlan.h"
|
||||
#include "LayerToPlaneJoiningPlan.h"
|
||||
|
||||
#include "drm/DrmDevice.h"
|
||||
#include "drm/DrmPlane.h"
|
||||
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
auto DrmKmsPlan::CreateDrmKmsPlan(const DrmDisplayPipeline &pipe,
|
||||
std::vector<LayerData> composition,
|
||||
std::optional<LayerData> cursor_layer)
|
||||
-> std::unique_ptr<DrmKmsPlan> {
|
||||
auto plan = std::make_unique<DrmKmsPlan>();
|
||||
auto LayerToPlaneJoiningPlan::CreateLayerToPlaneJoiningPlan(
|
||||
const DrmDisplayPipeline &pipe, std::vector<LayerData> composition,
|
||||
std::optional<LayerData> cursor_layer)
|
||||
-> std::unique_ptr<LayerToPlaneJoiningPlan> {
|
||||
auto plan = std::make_unique<LayerToPlaneJoiningPlan>();
|
||||
|
||||
auto [avail_planes, cursor_plane] = pipe.GetUsablePlanes();
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ namespace android::drm_hwcomposer {
|
|||
|
||||
class DrmDevice;
|
||||
|
||||
struct DrmKmsPlan {
|
||||
struct LayerToPlaneJoiningPlan {
|
||||
struct LayerToPlaneJoining {
|
||||
LayerData layer;
|
||||
std::shared_ptr<BindingOwner<DrmPlane>> plane;
|
||||
|
|
@ -34,10 +34,10 @@ struct DrmKmsPlan {
|
|||
|
||||
std::vector<LayerToPlaneJoining> plan;
|
||||
|
||||
static auto CreateDrmKmsPlan(
|
||||
static auto CreateLayerToPlaneJoiningPlan(
|
||||
const DrmDisplayPipeline &pipe, std::vector<LayerData> composition,
|
||||
std::optional<LayerData> cursor_layer = std::nullopt)
|
||||
-> std::unique_ptr<DrmKmsPlan>;
|
||||
-> std::unique_ptr<LayerToPlaneJoiningPlan>;
|
||||
};
|
||||
|
||||
} // namespace android::drm_hwcomposer
|
||||
|
|
@ -85,7 +85,7 @@ void DrmAtomicStateManager::CleanFailedCommit() {
|
|||
// Disable the hw used by the last active composition. This allows us to
|
||||
// signal the release fences from that composition to avoid hanging.
|
||||
AtomicCommitArgs cl_args{};
|
||||
cl_args.composition = std::make_shared<DrmKmsPlan>();
|
||||
cl_args.composition = std::make_shared<LayerToPlaneJoiningPlan>();
|
||||
if (CommitFrame(cl_args)) {
|
||||
ALOGE("Failed to clean-up active composition for pipeline %s",
|
||||
pipe_->connector->Get()->GetName().c_str());
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
#include <queue>
|
||||
|
||||
#include "compositor/DisplayInfo.h"
|
||||
#include "compositor/DrmKmsPlan.h"
|
||||
#include "compositor/LayerData.h"
|
||||
#include "compositor/LayerToPlaneJoiningPlan.h"
|
||||
#include "drm/DrmPlane.h"
|
||||
#include "drm/ResourceManager.h"
|
||||
#include "drm/VSyncWorker.h"
|
||||
|
|
@ -40,7 +40,7 @@ struct AtomicCommitArgs {
|
|||
bool seamless = false;
|
||||
std::optional<DrmMode> display_mode;
|
||||
std::optional<bool> active;
|
||||
std::shared_ptr<DrmKmsPlan> composition;
|
||||
std::shared_ptr<LayerToPlaneJoiningPlan> composition;
|
||||
std::shared_ptr<drm_color_ctm> color_matrix;
|
||||
std::optional<Colorspace> colorspace;
|
||||
std::optional<ContentType> content_type;
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ void HwcDisplay::SetPipeline(std::shared_ptr<DrmDisplayPipeline> pipeline) {
|
|||
void HwcDisplay::Deinit() {
|
||||
if (pipeline_ != nullptr) {
|
||||
AtomicCommitArgs a_args{};
|
||||
a_args.composition = std::make_shared<DrmKmsPlan>();
|
||||
a_args.composition = std::make_shared<LayerToPlaneJoiningPlan>();
|
||||
GetPipe().atomic_state_manager->ExecuteAtomicCommit(a_args);
|
||||
a_args.composition = {};
|
||||
a_args.active = false;
|
||||
|
|
@ -846,9 +846,8 @@ AtomicCommitArgs HwcDisplay::CreateModesetCommit(
|
|||
|
||||
args.display_mode = config->mode;
|
||||
args.active = true;
|
||||
args.composition = DrmKmsPlan::CreateDrmKmsPlan(GetPipe(),
|
||||
std::move(
|
||||
composition_layers));
|
||||
args.composition = LayerToPlaneJoiningPlan::
|
||||
CreateLayerToPlaneJoiningPlan(GetPipe(), std::move(composition_layers));
|
||||
ALOGW_IF(!args.composition, "No composition for blocking modeset");
|
||||
|
||||
return args;
|
||||
|
|
@ -1045,8 +1044,8 @@ std::optional<AtomicCommitArgs> HwcDisplay::CreateFrameUpdateCommit(
|
|||
if (composition.composition_plan->plan.size() !=
|
||||
composition_layers.size() + cursor_layer.has_value()) {
|
||||
ALOGE(
|
||||
"Cached DrmKmsPlan size=%zu does not match composition size=%zu "
|
||||
"(+cursor=%u)",
|
||||
"Cached LayerToPlaneJoiningPlan size=%zu does not match composition "
|
||||
"size=%zu (+cursor=%u)",
|
||||
composition.composition_plan->plan.size(), composition_layers.size(),
|
||||
cursor_layer.has_value());
|
||||
// New plan will be created instead.
|
||||
|
|
@ -1062,12 +1061,11 @@ std::optional<AtomicCommitArgs> HwcDisplay::CreateFrameUpdateCommit(
|
|||
}
|
||||
|
||||
if (!a_args.composition) {
|
||||
a_args.composition = DrmKmsPlan::CreateDrmKmsPlan(GetPipe(),
|
||||
std::move(
|
||||
composition_layers),
|
||||
cursor_layer);
|
||||
a_args.composition = LayerToPlaneJoiningPlan::
|
||||
CreateLayerToPlaneJoiningPlan(GetPipe(), std::move(composition_layers),
|
||||
cursor_layer);
|
||||
if (!a_args.composition) {
|
||||
ALOGE_IF(!a_args.test_only, "Failed to create DrmKmsPlan");
|
||||
ALOGE_IF(!a_args.test_only, "Failed to create LayerToPlaneJoiningPlan");
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ src_common = files(
|
|||
'backend/ClientBackend.cpp',
|
||||
'backend/GenericBackend.cpp',
|
||||
'compositor/CompositionPlanner.cpp',
|
||||
'compositor/DrmKmsPlan.cpp',
|
||||
'compositor/FlatteningController.cpp',
|
||||
'compositor/FlatteningEventAtomReporter.cpp',
|
||||
'compositor/GenericCompositionPlanner.cpp',
|
||||
'compositor/LayerToPlaneJoiningPlan.cpp',
|
||||
'hwc/HwcDisplayConfigs.cpp',
|
||||
'hwc/HwcDisplay.cpp',
|
||||
'hwc/HwcLayer.cpp',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue