1
0
Fork 0

Merge remote-tracking branch 'freedesktop/main' into android-16.0

This commit is contained in:
Konsta 2025-11-11 23:05:05 +02:00
commit 69629f8907
72 changed files with 323 additions and 181 deletions

View file

@ -18,7 +18,9 @@
#include "BackendManager.h" #include "BackendManager.h"
#include "hwc/HwcDisplay.h" #include "drm/DrmConnector.h"
#include "drm/DrmDevice.h"
#include "drm/DrmDisplayPipeline.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"

View file

@ -21,10 +21,11 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compositor/CompositionPlanner.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmConnector;
struct DrmDisplayPipeline;
// BackendManager is a singleton that manages the registration of Backends and // BackendManager is a singleton that manages the registration of Backends and
// finding a Backend which can be used to create a DrmDisplayPipeline for a // finding a Backend which can be used to create a DrmDisplayPipeline for a
// DrmConnector. // DrmConnector.

View file

@ -15,7 +15,7 @@
*/ */
#include "backend/GenericBackend.h" #include "backend/GenericBackend.h"
#include "compositor/GenericCompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "hwc/HwcDisplay.h" #include "hwc/HwcDisplay.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -14,9 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
#include "backend/GenericBackend.h" #include "GenericBackend.h"
#include "backend/BackendManager.h"
#include "compositor/CompositionPlanner.h"
#include "compositor/GenericCompositionPlanner.h" #include "compositor/GenericCompositionPlanner.h"
#include "drm/DrmConnector.h"
#include "drm/DrmDisplayPipeline.h" #include "drm/DrmDisplayPipeline.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -21,6 +21,9 @@
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmConnector;
struct DrmDisplayPipeline;
// Implement the Backend interface on top of upstream drm uAPI. // Implement the Backend interface on top of upstream drm uAPI.
class GenericBackend : public BackendManager::Backend { class GenericBackend : public BackendManager::Backend {
public: public:

View file

@ -17,7 +17,6 @@
#define LOG_TAG "drmhwc" #define LOG_TAG "drmhwc"
#include "BufferInfoGetter.h" #include "BufferInfoGetter.h"
#include "BufferInfoMapperMetadata.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
@ -27,8 +26,8 @@
#include <mutex> #include <mutex>
#include "bufferinfo/BufferInfoMapperMetadata.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -21,8 +21,7 @@
#include <optional> #include <optional>
#include "BufferInfo.h" #include "utils/log.h"
#include "drm/DrmDevice.h"
#ifndef DRM_FORMAT_INVALID #ifndef DRM_FORMAT_INVALID
#define DRM_FORMAT_INVALID 0 #define DRM_FORMAT_INVALID 0
@ -32,6 +31,8 @@ namespace android::drm_hwcomposer {
using BufferUniqueId = uint64_t; using BufferUniqueId = uint64_t;
struct BufferInfo;
class BufferInfoGetter { class BufferInfoGetter {
public: public:
virtual ~BufferInfoGetter() = default; virtual ~BufferInfoGetter() = default;

View file

@ -25,6 +25,8 @@
#include <cinttypes> #include <cinttypes>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -20,6 +20,8 @@
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct BufferInfo;
class BufferInfoMapperMetadata : public BufferInfoGetter { class BufferInfoMapperMetadata : public BufferInfoGetter {
public: public:
using BufferInfoGetter::BufferInfoGetter; using BufferInfoGetter::BufferInfoGetter;

View file

@ -22,6 +22,8 @@
#include <cerrno> #include <cerrno>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "img_gralloc1_public.h" #include "img_gralloc1_public.h"
#include "utils/log.h" #include "utils/log.h"

View file

@ -25,8 +25,9 @@
#include <mutex> #include <mutex>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -23,8 +23,9 @@
#include <cinttypes> #include <cinttypes>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "gralloc_priv.h" #include "gralloc_priv.h"
#include "utils/log.h"
#define MALI_ALIGN(value, base) (((value) + ((base)-1)) & ~((base)-1)) #define MALI_ALIGN(value, base) (((value) + ((base)-1)) & ~((base)-1))

View file

@ -25,8 +25,9 @@
#include <cinttypes> #include <cinttypes>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "gralloc_priv.h" #include "gralloc_priv.h"
#include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -23,8 +23,9 @@
#include <cinttypes> #include <cinttypes>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "gralloc_priv.h" #include "gralloc_priv.h"
#include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -24,6 +24,8 @@
#include <cerrno> #include <cerrno>
#include <cstring> #include <cstring>
#include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -16,6 +16,7 @@
#include "CompositionPlanner.h" #include "CompositionPlanner.h"
#include "compositor/LayerData.h"
#include "hwc/HwcLayer.h" #include "hwc/HwcLayer.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -21,13 +21,12 @@
#include <optional> #include <optional>
#include <vector> #include <vector>
#include "compositor/LayerData.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct LayerToPlaneJoiningPlan; enum class CompositionType;
class HwcDisplay; class HwcDisplay;
class HwcLayer; class HwcLayer;
struct LayerToPlaneJoiningPlan;
// CompositionPlanner is responsible for determining the mapping between // CompositionPlanner is responsible for determining the mapping between
// HwcLayer and drm planes. This includes deciding which HwcLayers should be // HwcLayer and drm planes. This includes deciding which HwcLayers should be

View file

@ -82,7 +82,7 @@ enum class Colorspace : int32_t {
/** /**
* Display panel orientation property values. * Display panel orientation property values.
*/ */
enum PanelOrientation { enum class PanelOrientation {
kModePanelOrientationNormal = 0, kModePanelOrientationNormal = 0,
kModePanelOrientationBottomUp, kModePanelOrientationBottomUp,
kModePanelOrientationLeftUp, kModePanelOrientationLeftUp,

View file

@ -20,11 +20,12 @@
#include <tuple> #include <tuple>
#include <vector> #include <vector>
#include "backend/BackendManager.h"
#include "compositor/FlatteningController.h" #include "compositor/FlatteningController.h"
#include "compositor/LayerData.h" #include "compositor/LayerData.h"
#include "drm/DrmPlane.h"
#include "hwc/HwcDisplay.h" #include "hwc/HwcDisplay.h"
#include "hwc/HwcLayer.h" #include "hwc/HwcLayer.h"
#include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -16,11 +16,11 @@
#pragma once #pragma once
#include "CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct LayerToPlaneJoiningPlan; enum class CompositionType;
class HwcDisplay; class HwcDisplay;
class HwcLayer; class HwcLayer;

View file

@ -23,7 +23,6 @@
#include <vector> #include <vector>
#include "bufferinfo/BufferInfo.h" #include "bufferinfo/BufferInfo.h"
#include "drm/DrmFbImporter.h"
#include "utils/fd.h" #include "utils/fd.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -18,9 +18,9 @@
#include "LayerToPlaneJoiningPlan.h" #include "LayerToPlaneJoiningPlan.h"
#include "drm/DrmDevice.h" #include "compositor/LayerData.h"
#include "drm/DrmDisplayPipeline.h"
#include "drm/DrmPlane.h" #include "drm/DrmPlane.h"
#include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -23,7 +23,10 @@
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmDevice; class DrmPlane;
struct DrmDisplayPipeline;
template <typename T>
class BindingOwner;
struct LayerToPlaneJoiningPlan { struct LayerToPlaneJoiningPlan {
struct LayerToPlaneJoining { struct LayerToPlaneJoining {

View file

@ -29,10 +29,16 @@
#include <cassert> #include <cassert>
#include "compositor/LayerData.h"
#include "compositor/LayerToPlaneJoiningPlan.h"
#include "drm/DrmConnector.h"
#include "drm/DrmCrtc.h" #include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h" #include "drm/DrmDevice.h"
#include "drm/DrmDisplayPipeline.h"
#include "drm/DrmFbImporter.h"
#include "drm/DrmPlane.h" #include "drm/DrmPlane.h"
#include "drm/DrmUnique.h" #include "drm/DrmUnique.h"
#include "utils/fd.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -22,16 +22,30 @@
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <queue> #include <queue>
#include <thread>
#include <android-base/thread_annotations.h>
#include "compositor/DisplayInfo.h"
#include "compositor/LayerData.h" #include "compositor/LayerData.h"
#include "compositor/LayerToPlaneJoiningPlan.h" #include "drm/DrmMode.h"
#include "drm/DrmPlane.h" #include "utils/fd.h"
#include "drm/ResourceManager.h"
#include "drm/VSyncWorker.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
template <typename T>
class BindingOwner;
class DrmFbIdHandle;
class DrmPlane;
struct DrmDisplayPipeline;
struct LayerToPlaneJoiningPlan;
enum class Colorspace;
enum class ContentProtection;
enum class ContentType;
enum class HdcpContentType;
struct AtomicCommitArgs { struct AtomicCommitArgs {
/* inputs. All fields are optional, but at least one has to be specified */ /* inputs. All fields are optional, but at least one has to be specified */
bool test_only = false; bool test_only = false;

View file

@ -27,8 +27,13 @@
#include <cstdint> #include <cstdint>
#include <sstream> #include <sstream>
#include "DrmDevice.h"
#include "compositor/DisplayInfo.h" #include "compositor/DisplayInfo.h"
#include "drm/DrmDevice.h"
#include "drm/DrmEncoder.h"
#include "drm/DrmMode.h"
#include "drm/DrmProperty.h"
#include "drm/DrmUnique.h"
#include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"
#ifndef DRM_MODE_CONNECTOR_SPI #ifndef DRM_MODE_CONNECTOR_SPI
@ -82,6 +87,13 @@ auto DrmConnector::CreateInstance(DrmDevice &dev, uint32_t connector_id,
return c; return c;
} }
DrmConnector::~DrmConnector() = default;
DrmConnector::DrmConnector(DrmModeConnectorUnique connector, DrmDevice *drm,
uint32_t index)
: connector_(std::move(connector)), drm_(drm), index_in_res_array_(index) {
}
auto DrmConnector::Init()-> bool { auto DrmConnector::Init()-> bool {
if (!GetConnectorProperty("DPMS", &dpms_property_) || if (!GetConnectorProperty("DPMS", &dpms_property_) ||
!GetConnectorProperty("CRTC_ID", &crtc_id_property_)) { !GetConnectorProperty("CRTC_ID", &crtc_id_property_)) {
@ -196,6 +208,17 @@ auto DrmConnector::GetEdidBlob() -> DrmModePropertyBlobUnique {
return MakeDrmModePropertyBlobUnique(*drm_->GetFd(), *blob_id); return MakeDrmModePropertyBlobUnique(*drm_->GetFd(), *blob_id);
} }
bool DrmConnector::SupportsEncoder(DrmEncoder &enc) const {
for (int i = 0; i < connector_->count_encoders; i++) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
if (connector_->encoders[i] == enc.GetId()) {
return true;
}
}
return false;
}
bool DrmConnector::IsInternal() const { bool DrmConnector::IsInternal() const {
auto type = connector_->connector_type; auto type = connector_->connector_type;
return type == DRM_MODE_CONNECTOR_Unknown || return type == DRM_MODE_CONNECTOR_Unknown ||

View file

@ -22,15 +22,18 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "DrmEncoder.h" #include "drm/DrmDisplayPipeline.h"
#include "DrmMode.h" #include "drm/DrmProperty.h"
#include "DrmProperty.h" #include "drm/DrmUnique.h"
#include "DrmUnique.h"
#include "compositor/DisplayInfo.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmDevice; class DrmDevice;
class DrmProperty;
class DrmMode;
enum class Colorspace;
enum class PanelOrientation;
class DrmConnector : public PipelineBindable<DrmConnector> { class DrmConnector : public PipelineBindable<DrmConnector> {
friend class FakeDrmConnector; friend class FakeDrmConnector;
@ -42,7 +45,7 @@ class DrmConnector : public PipelineBindable<DrmConnector> {
DrmConnector(const DrmProperty &) = delete; DrmConnector(const DrmProperty &) = delete;
DrmConnector &operator=(const DrmProperty &) = delete; DrmConnector &operator=(const DrmProperty &) = delete;
virtual ~DrmConnector() = default; virtual ~DrmConnector();
int UpdateEdidProperty(); int UpdateEdidProperty();
auto GetEdidBlob() -> DrmModePropertyBlobUnique; auto GetEdidBlob() -> DrmModePropertyBlobUnique;
@ -63,16 +66,7 @@ class DrmConnector : public PipelineBindable<DrmConnector> {
return connector_->encoder_id; return connector_->encoder_id;
} }
auto SupportsEncoder(DrmEncoder &enc) const { bool SupportsEncoder(DrmEncoder &enc) const;
for (int i = 0; i < connector_->count_encoders; i++) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
if (connector_->encoders[i] == enc.GetId()) {
return true;
}
}
return false;
}
bool IsInternal() const; bool IsInternal() const;
bool IsExternal() const; bool IsExternal() const;
@ -158,10 +152,8 @@ class DrmConnector : public PipelineBindable<DrmConnector> {
auto GetPanelOrientation() -> std::optional<PanelOrientation>; auto GetPanelOrientation() -> std::optional<PanelOrientation>;
private: private:
DrmConnector(DrmModeConnectorUnique connector, DrmDevice *drm, uint32_t index) DrmConnector(DrmModeConnectorUnique connector, DrmDevice *drm,
: connector_(std::move(connector)), uint32_t index);
drm_(drm),
index_in_res_array_(index) {};
DrmModeConnectorUnique connector_; DrmModeConnectorUnique connector_;
DrmDevice *const drm_; DrmDevice *const drm_;

View file

@ -18,12 +18,14 @@
#include "DrmCrtc.h" #include "DrmCrtc.h"
#include <utils/log.h>
#include <xf86drmMode.h> #include <xf86drmMode.h>
#include <cstdint> #include <cstdint>
#include "DrmDevice.h" #include "drm/DrmDevice.h"
#include "drm/DrmProperty.h"
#include "drm/DrmUnique.h"
#include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -20,10 +20,9 @@
#include <cstdint> #include <cstdint>
#include "DrmDisplayPipeline.h" #include "drm/DrmDisplayPipeline.h"
#include "DrmMode.h" #include "drm/DrmProperty.h"
#include "DrmProperty.h" #include "drm/DrmUnique.h"
#include "DrmUnique.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -27,15 +27,22 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include "drm/DrmAtomicStateManager.h" #include "bufferinfo/BufferInfo.h"
#include "drm/DrmConnector.h" #include "drm/DrmConnector.h"
#include "drm/DrmCrtc.h"
#include "drm/DrmEncoder.h"
#include "drm/DrmFbImporter.h"
#include "drm/DrmPlane.h" #include "drm/DrmPlane.h"
#include "drm/DrmProperty.h"
#include "drm/DrmUnique.h"
#include "drm/ResourceManager.h" #include "drm/ResourceManager.h"
#include "utils/fd.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
DrmDevice::~DrmDevice() = default;
auto DrmDevice::CreateInstance(std::string const &path, auto DrmDevice::CreateInstance(std::string const &path,
ResourceManager *res_man, uint32_t index) ResourceManager *res_man, uint32_t index)
-> std::unique_ptr<DrmDevice> { -> std::unique_ptr<DrmDevice> {
@ -194,6 +201,26 @@ auto DrmDevice::RegisterUserPropertyBlob(void *data, size_t length) const
}); });
} }
DrmCrtc *DrmDevice::FindCrtcById(uint32_t id) const {
for (const auto &crtc : crtcs_) {
if (crtc->GetId() == id) {
return crtc.get();
}
};
return nullptr;
}
DrmEncoder *DrmDevice::FindEncoderById(uint32_t id) const {
for (const auto &enc : encoders_) {
if (enc->GetId() == id) {
return enc.get();
}
};
return nullptr;
}
int DrmDevice::GetProperty(uint32_t obj_id, uint32_t obj_type, int DrmDevice::GetProperty(uint32_t obj_id, uint32_t obj_type,
const char *prop_name, DrmProperty *property) const { const char *prop_name, DrmProperty *property) const {
drmModeObjectPropertiesPtr props = nullptr; drmModeObjectPropertiesPtr props = nullptr;

View file

@ -21,23 +21,25 @@
#include <optional> #include <optional>
#include <tuple> #include <tuple>
#include "DrmConnector.h" #include "drm/DrmUnique.h"
#include "DrmCrtc.h"
#include "DrmEncoder.h"
#include "bufferinfo/BufferInfo.h"
#include "utils/fd.h" #include "utils/fd.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct BufferInfo;
class DrmConnector;
class DrmCrtc;
class DrmEncoder;
class DrmFbImporter; class DrmFbImporter;
class DrmPlane; class DrmPlane;
class DrmProperty;
class ResourceManager; class ResourceManager;
class DrmDevice { class DrmDevice {
friend class FakeDrmDevice; friend class FakeDrmDevice;
public: public:
~DrmDevice() = default; ~DrmDevice();
static auto CreateInstance(std::string const &path, ResourceManager *res_man, static auto CreateInstance(std::string const &path, ResourceManager *res_man,
uint32_t index) -> std::unique_ptr<DrmDevice>; uint32_t index) -> std::unique_ptr<DrmDevice>;
@ -88,25 +90,9 @@ class DrmDevice {
return *drm_fb_importer_; return *drm_fb_importer_;
} }
auto FindCrtcById(uint32_t id) const -> DrmCrtc * { DrmCrtc *FindCrtcById(uint32_t id) const;
for (const auto &crtc : crtcs_) {
if (crtc->GetId() == id) {
return crtc.get();
}
};
return nullptr; DrmEncoder *FindEncoderById(uint32_t id) const;
}
auto FindEncoderById(uint32_t id) const -> DrmEncoder * {
for (const auto &enc : encoders_) {
if (enc->GetId() == id) {
return enc.get();
}
};
return nullptr;
}
int GetProperty(uint32_t obj_id, uint32_t obj_type, const char *prop_name, int GetProperty(uint32_t obj_id, uint32_t obj_type, const char *prop_name,
DrmProperty *property) const; DrmProperty *property) const;

View file

@ -18,13 +18,13 @@
#include "DrmDisplayPipeline.h" #include "DrmDisplayPipeline.h"
#include "DrmAtomicStateManager.h"
#include "DrmConnector.h"
#include "DrmCrtc.h"
#include "DrmDevice.h"
#include "DrmEncoder.h"
#include "DrmPlane.h"
#include "compositor/CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "drm/DrmAtomicStateManager.h"
#include "drm/DrmConnector.h"
#include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h"
#include "drm/DrmEncoder.h"
#include "drm/DrmPlane.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"

View file

@ -22,12 +22,12 @@
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class CompositionPlanner; class CompositionPlanner;
class DrmConnector;
class DrmDevice;
class DrmPlane;
class DrmCrtc;
class DrmEncoder;
class DrmAtomicStateManager; class DrmAtomicStateManager;
class DrmConnector;
class DrmCrtc;
class DrmDevice;
class DrmEncoder;
class DrmPlane;
struct DrmDisplayPipeline; struct DrmDisplayPipeline;

View file

@ -20,12 +20,12 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <xf86drmMode.h> #include <xf86drmMode.h>
#include "DrmConnector.h" #include "drm/DrmConnector.h"
#include "DrmCrtc.h" #include "drm/DrmCrtc.h"
#include "DrmDevice.h" #include "drm/DrmDevice.h"
#include "DrmDisplayPipeline.h" #include "drm/DrmDisplayPipeline.h"
#include "DrmEncoder.h" #include "drm/DrmEncoder.h"
#include "DrmPlane.h" #include "drm/DrmPlane.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -22,7 +22,9 @@
#include <cstdint> #include <cstdint>
#include "DrmDevice.h" #include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h"
#include "drm/DrmUnique.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
@ -38,4 +40,12 @@ auto DrmEncoder::CreateInstance(DrmDevice &dev, uint32_t encoder_id,
return std::unique_ptr<DrmEncoder>(new DrmEncoder(std::move(e), index)); return std::unique_ptr<DrmEncoder>(new DrmEncoder(std::move(e), index));
} }
bool DrmEncoder::CanClone(DrmEncoder &encoder) {
return (enc_->possible_clones & (1 << encoder.GetIndexInResArray())) != 0;
}
bool DrmEncoder::SupportsCrtc(DrmCrtc &crtc) {
return (enc_->possible_crtcs & (1 << crtc.GetIndexInResArray())) != 0;
}
} // namespace android::drm_hwcomposer } // namespace android::drm_hwcomposer

View file

@ -22,11 +22,14 @@
#include <set> #include <set>
#include <vector> #include <vector>
#include "DrmCrtc.h" #include "drm/DrmDisplayPipeline.h"
#include "DrmDisplayPipeline.h" #include "drm/DrmUnique.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmCrtc;
class DrmDevice;
class DrmEncoder : public PipelineBindable<DrmEncoder> { class DrmEncoder : public PipelineBindable<DrmEncoder> {
friend class FakeDrmEncoder; friend class FakeDrmEncoder;
@ -47,13 +50,9 @@ class DrmEncoder : public PipelineBindable<DrmEncoder> {
return index_in_res_array_; return index_in_res_array_;
} }
auto CanClone(DrmEncoder &encoder) { bool CanClone(DrmEncoder &encoder);
return (enc_->possible_clones & (1 << encoder.GetIndexInResArray())) != 0;
}
auto SupportsCrtc(DrmCrtc &crtc) { bool SupportsCrtc(DrmCrtc &crtc);
return (enc_->possible_crtcs & (1 << crtc.GetIndexInResArray())) != 0;
}
virtual uint32_t GetCurrentCrtcId() const { virtual uint32_t GetCurrentCrtcId() const {
return enc_->crtc_id; return enc_->crtc_id;

View file

@ -29,8 +29,9 @@
#include <cinttypes> #include <cinttypes>
#include <system_error> #include <system_error>
#include "bufferinfo/BufferInfo.h"
#include "drm/DrmDevice.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
@ -125,6 +126,9 @@ DrmFbIdHandle::~DrmFbIdHandle() {
} }
} }
DrmFbIdHandle::DrmFbIdHandle(DrmDevice &drm) : drm_fd_(drm.GetFd()) {
}
auto DrmFbImporter::GetOrCreateFbId(BufferInfo *bo) auto DrmFbImporter::GetOrCreateFbId(BufferInfo *bo)
-> std::shared_ptr<DrmFbIdHandle> { -> std::shared_ptr<DrmFbIdHandle> {
/* TODO: Clean up DrmDevices and DrmFbImporter inter-dependency. /* TODO: Clean up DrmDevices and DrmFbImporter inter-dependency.

View file

@ -23,7 +23,6 @@
#include <map> #include <map>
#include "bufferinfo/BufferInfo.h" #include "bufferinfo/BufferInfo.h"
#include "drm/DrmDevice.h"
#include "utils/fd.h" #include "utils/fd.h"
#ifndef DRM_FORMAT_INVALID #ifndef DRM_FORMAT_INVALID
@ -34,6 +33,8 @@ using GemHandle = uint32_t;
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmDevice;
class DrmFbIdHandle { class DrmFbIdHandle {
public: public:
static auto CreateInstance(BufferInfo *bo, GemHandle first_gem_handle, static auto CreateInstance(BufferInfo *bo, GemHandle first_gem_handle,
@ -50,7 +51,7 @@ class DrmFbIdHandle {
} }
private: private:
explicit DrmFbIdHandle(DrmDevice &drm) : drm_fd_(drm.GetFd()) {}; explicit DrmFbIdHandle(DrmDevice &drm);
SharedFd drm_fd_; SharedFd drm_fd_;

View file

@ -24,6 +24,9 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
#include "drm/DrmConnector.h"
#include "drm/DrmDisplayPipeline.h"
#include "hwc/HwcDisplay.h"
#include "stats/CompositionStats.h" #include "stats/CompositionStats.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"

View file

@ -16,13 +16,14 @@
#pragma once #pragma once
#include "drm/DrmDisplayPipeline.h"
#include "drm/ResourceManager.h" #include "drm/ResourceManager.h"
#include "hwc/HwcDisplay.h" #include "hwc/HwcDisplay.h"
#include "stats/CompositionStats.h" #include "stats/CompositionStats.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct DrmDisplayPipeline;
class DrmHwc : public PipelineToFrontendBindingInterface, class DrmHwc : public PipelineToFrontendBindingInterface,
public CompositionStatsProvider { public CompositionStatsProvider {
public: public:

View file

@ -18,7 +18,8 @@
#include <cstring> #include <cstring>
#include "DrmDevice.h" #include "drm/DrmDevice.h"
#include "drm/DrmUnique.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -22,7 +22,7 @@
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#include "DrmUnique.h" #include "drm/DrmUnique.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -23,9 +23,11 @@
#include <cinttypes> #include <cinttypes>
#include <cstdint> #include <cstdint>
#include "DrmDevice.h"
#include "bufferinfo/BufferInfoGetter.h" #include "bufferinfo/BufferInfoGetter.h"
#include "compositor/LayerData.h" #include "compositor/LayerData.h"
#include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h"
#include "drm/DrmFbImporter.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -21,15 +21,22 @@
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include "DrmCrtc.h" #include "drm/DrmDisplayPipeline.h"
#include "DrmProperty.h" #include "drm/DrmProperty.h"
#include "compositor/LayerData.h" #include "drm/DrmUnique.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class DrmCrtc;
class DrmDevice; class DrmDevice;
struct DstRectInfo;
struct LayerData; struct LayerData;
enum class BufferBlendMode;
enum class BufferColorSpace;
enum class BufferSampleRange;
// NOLINTNEXTLINE(readability-identifier-naming) // NOLINTNEXTLINE(readability-identifier-naming)
struct drm_plane_size_hint_local { struct drm_plane_size_hint_local {
__u16 width; __u16 width;

View file

@ -26,7 +26,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include "DrmDevice.h" #include "utils/fd.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -26,10 +26,10 @@
#include "backend/BackendManager.h" #include "backend/BackendManager.h"
#include "bufferinfo/BufferInfoGetter.h" #include "bufferinfo/BufferInfoGetter.h"
#include "drm/DrmAtomicStateManager.h" #include "drm/DrmConnector.h"
#include "drm/DrmDevice.h" #include "drm/DrmDevice.h"
#include "drm/DrmDisplayPipeline.h" #include "drm/DrmDisplayPipeline.h"
#include "drm/DrmPlane.h" #include "drm/UEventListener.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"

View file

@ -17,18 +17,18 @@
#pragma once #pragma once
#include <cstring> #include <cstring>
#include <map>
#include <mutex> #include <mutex>
#include <set> #include <set>
#include "DrmDevice.h"
#include "DrmDisplayPipeline.h"
#include "DrmFbImporter.h"
#include "DrmProperty.h"
#include "UEventListener.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
enum class CtmHandling;
class DrmConnector;
class DrmDevice;
struct DrmDisplayPipeline;
class UEventListener;
class PipelineToFrontendBindingInterface { class PipelineToFrontendBindingInterface {
public: public:
virtual ~PipelineToFrontendBindingInterface() = default; virtual ~PipelineToFrontendBindingInterface() = default;

View file

@ -20,6 +20,7 @@
#include <thread> #include <thread>
#include "utils/UEvent.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -20,10 +20,10 @@
#include <mutex> #include <mutex>
#include <thread> #include <thread>
#include "utils/UEvent.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class UEvent;
class UEventListener { class UEventListener {
public: public:
~UEventListener(); ~UEventListener();

View file

@ -27,7 +27,11 @@
#include <cstring> #include <cstring>
#include <ctime> #include <ctime>
#include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h"
#include "drm/DrmDisplayPipeline.h"
#include "drm/ResourceManager.h" #include "drm/ResourceManager.h"
#include "utils/fd.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -24,10 +24,12 @@
#include <android-base/thread_annotations.h> #include <android-base/thread_annotations.h>
#include "DrmDevice.h" #include "utils/fd.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
struct DrmDisplayPipeline;
class VSyncWorker { class VSyncWorker {
public: public:
using VsyncTimestampCallback = std::function<void(int64_t /*timestamp*/, using VsyncTimestampCallback = std::function<void(int64_t /*timestamp*/,

View file

@ -30,10 +30,18 @@
#include "compositor/CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "compositor/DisplayInfo.h" #include "compositor/DisplayInfo.h"
#include "compositor/FlatteningController.h" #include "compositor/FlatteningController.h"
#include "compositor/LayerToPlaneJoiningPlan.h"
#include "drm/DrmAtomicStateManager.h"
#include "drm/DrmConnector.h" #include "drm/DrmConnector.h"
#include "drm/DrmCrtc.h"
#include "drm/DrmDevice.h"
#include "drm/DrmDisplayPipeline.h" #include "drm/DrmDisplayPipeline.h"
#include "drm/DrmHwc.h" #include "drm/DrmHwc.h"
#include "drm/VSyncWorker.h"
#include "hwc/HwcLayer.h"
#include "stats/CompositionStats.h" #include "stats/CompositionStats.h"
#include "utils/EdidWrapper.h"
#include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"
using ColorGamut = ::android::ColorSpace; using ColorGamut = ::android::ColorSpace;

View file

@ -18,15 +18,11 @@
#include <optional> #include <optional>
#include "HwcDisplayConfigs.h"
#include "HwcLayer.h"
#include "compositor/CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "compositor/DisplayInfo.h" #include "compositor/DisplayInfo.h"
#include "compositor/LayerData.h" #include "compositor/LayerData.h"
#include "drm/DrmAtomicStateManager.h" #include "hwc/HwcDisplayConfigs.h"
#include "drm/VSyncWorker.h" #include "hwc/HwcLayer.h"
#include "stats/CompositionStats.h"
#include "utils/EdidWrapper.h"
namespace aidl::android::hardware::graphics::common { namespace aidl::android::hardware::graphics::common {
enum class Hdr; enum class Hdr;
@ -38,13 +34,20 @@ using aidl::android::hardware::graphics::common::Hdr;
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class ChangedLayer;
class DrmHwc;
class EdidWrapper;
class FlatteningController;
class VSyncWorker;
struct AtomicCommitArgs;
struct CompositionAttributes;
struct CompositionStats;
struct DrmDisplayPipeline;
using DisplayHandle = int64_t; using DisplayHandle = int64_t;
using EdidWrapperUnique = std::unique_ptr<EdidWrapper>; using EdidWrapperUnique = std::unique_ptr<EdidWrapper>;
class CompositionPlanner;
class DrmHwc;
class FlatteningController;
class FrontendDisplayBase { class FrontendDisplayBase {
public: public:
virtual ~FrontendDisplayBase() = default; virtual ~FrontendDisplayBase() = default;

View file

@ -21,8 +21,9 @@
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include "compositor/DisplayInfo.h"
#include "drm/DrmConnector.h" #include "drm/DrmConnector.h"
#include "drm/DrmMode.h"
#include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"
constexpr uint32_t kSyncLen = 10; constexpr uint32_t kSyncLen = 10;

View file

@ -18,8 +18,10 @@
#include "HwcLayer.h" #include "HwcLayer.h"
#include "HwcDisplay.h" #include "drm/DrmDevice.h"
#include "bufferinfo/BufferInfoGetter.h" #include "drm/DrmDisplayPipeline.h"
#include "drm/DrmFbImporter.h"
#include "hwc/HwcDisplay.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -16,10 +16,10 @@
#pragma once #pragma once
#include <map>
#include <memory> #include <memory>
#include "bufferinfo/BufferInfo.h" #include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "compositor/LayerData.h" #include "compositor/LayerData.h"
#include "utils/fd.h" #include "utils/fd.h"

View file

@ -20,8 +20,8 @@
#include <cinttypes> #include <cinttypes>
#include "compositor/CompositionPlanner.h" #include "drm/DrmHwc.h"
#include "utils/log.h" #include "hwc/HwcDisplay.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -19,6 +19,7 @@
#include <hardware/hwcomposer2.h> #include <hardware/hwcomposer2.h>
#include "drm/DrmHwc.h" #include "drm/DrmHwc.h"
#include "hwc/HwcDisplay.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -25,15 +25,17 @@
#include <optional> #include <optional>
#include <cutils/native_handle.h> #include <cutils/native_handle.h>
#include <hardware/hwcomposer2.h>
#include <system/graphics-base-v1.1.h>
#include <ui/GraphicTypes.h> #include <ui/GraphicTypes.h>
#include "DrmHwcTwo.h" #include "bufferinfo/BufferInfoGetter.h"
#include "compositor/CompositionPlanner.h"
#include "compositor/DisplayInfo.h" #include "compositor/DisplayInfo.h"
#include "hardware/hwcomposer2.h" #include "hwc/HwcDisplay.h"
#include "hwc/HwcLayer.h" #include "hwc/HwcLayer.h"
#include "system/graphics-base-v1.1.h" #include "hwc2_device/DrmHwcTwo.h"
#include "utils/log.h" #include "utils/log.h"
#include "utils/properties.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -17,17 +17,19 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <aidl/android/hardware/graphics/composer3/CommandError.h>
#include <aidl/android/hardware/graphics/composer3/CommandResultPayload.h>
#include <aidl/android/hardware/graphics/composer3/PresentFence.h>
#include <aidl/android/hardware/graphics/composer3/PresentOrValidate.h>
#include <aidl/android/hardware/graphics/composer3/ReleaseFences.h>
#include <android-base/unique_fd.h> #include <android-base/unique_fd.h>
#include "Utils.h"
#include "aidl/android/hardware/graphics/composer3/CommandError.h"
#include "aidl/android/hardware/graphics/composer3/CommandResultPayload.h"
#include "aidl/android/hardware/graphics/composer3/PresentFence.h"
#include "aidl/android/hardware/graphics/composer3/PresentOrValidate.h"
#include "aidl/android/hardware/graphics/composer3/ReleaseFences.h"
namespace aidl::android::hardware::graphics::composer3 { namespace aidl::android::hardware::graphics::composer3 {
namespace hwc3 {
enum class Error;
} // namespace hwc3
struct DisplayChanges { struct DisplayChanges {
std::optional<ChangedCompositionTypes> composition_changes; std::optional<ChangedCompositionTypes> composition_changes;
std::optional<DisplayRequest> display_request_changes; std::optional<DisplayRequest> display_request_changes;

View file

@ -19,12 +19,10 @@
#include "Composer.h" #include "Composer.h"
#include <android-base/logging.h>
#include <android/binder_ibinder_platform.h> #include <android/binder_ibinder_platform.h>
#include "hwc3/ComposerClient.h" #include "hwc3/ComposerClient.h"
#include "hwc3/Utils.h" #include "hwc3/Utils.h"
#include "utils/log.h"
#include "utils/properties.h" #include "utils/properties.h"
using ::android::drm_hwcomposer::Properties; using ::android::drm_hwcomposer::Properties;

View file

@ -34,7 +34,6 @@
#include <aidl/android/hardware/graphics/composer3/PresentOrValidate.h> #include <aidl/android/hardware/graphics/composer3/PresentOrValidate.h>
#include <aidl/android/hardware/graphics/composer3/RenderIntent.h> #include <aidl/android/hardware/graphics/composer3/RenderIntent.h>
#include <aidlcommonsupport/NativeHandle.h> #include <aidlcommonsupport/NativeHandle.h>
#include <android-base/logging.h>
#include <android/binder_auto_utils.h> #include <android/binder_auto_utils.h>
#include <android/binder_ibinder_platform.h> #include <android/binder_ibinder_platform.h>
#include <cutils/native_handle.h> #include <cutils/native_handle.h>
@ -42,14 +41,19 @@
#include <utils/Trace.h> #include <utils/Trace.h>
#include "bufferinfo/BufferInfo.h" #include "bufferinfo/BufferInfo.h"
#include "bufferinfo/BufferInfoGetter.h"
#include "compositor/DisplayInfo.h" #include "compositor/DisplayInfo.h"
#include "hwc/HwcDisplay.h" #include "hwc/HwcDisplay.h"
#include "hwc/HwcDisplayConfigs.h" #include "hwc/HwcDisplayConfigs.h"
#include "hwc/HwcLayer.h" #include "hwc/HwcLayer.h"
#include "hwc3/CommandResultWriter.h"
#include "hwc3/DrmHwcThree.h" #include "hwc3/DrmHwcThree.h"
#include "hwc3/Utils.h" #include "hwc3/Utils.h"
#include "stats/CompositionStatsAtomReporter.h" #include "stats/CompositionStatsAtomReporter.h"
#include "stats/CompositionStatsPoller.h" #include "stats/CompositionStatsPoller.h"
#include "utils/fd.h"
#include "utils/log.h"
#include "utils/properties.h"
using ::android::drm_hwcomposer::BufferBlendMode; using ::android::drm_hwcomposer::BufferBlendMode;
using ::android::drm_hwcomposer::BufferColorSpace; using ::android::drm_hwcomposer::BufferColorSpace;
@ -513,7 +517,7 @@ ComposerClient::~ComposerClient() {
hwc_->DeinitDisplays(); hwc_->DeinitDisplays();
hwc_.reset(); hwc_.reset();
} }
LOG(DEBUG) << "removed composer client"; ALOGD("removed composer client");
} }
ndk::ScopedAStatus ComposerClient::createLayer(int64_t display_handle, ndk::ScopedAStatus ComposerClient::createLayer(int64_t display_handle,
@ -1087,7 +1091,8 @@ ndk::ScopedAStatus ComposerClient::getDisplayPhysicalOrientation(
*orientation = common::Transform::ROT_90; *orientation = common::Transform::ROT_90;
break; break;
default: default:
ALOGE("Unknown panel orientation value: %d", drm_orientation); ALOGE("Unknown panel orientation value: %d",
static_cast<int>(drm_orientation));
return ToBinderStatus(hwc3::Error::kBadDisplay); return ToBinderStatus(hwc3::Error::kBadDisplay);
} }
@ -1566,7 +1571,7 @@ ndk::ScopedAStatus ComposerClient::startHdcpNegotiation(
if (levels.connectedLevel != drm::HdcpLevel::HDCP_NONE && if (levels.connectedLevel != drm::HdcpLevel::HDCP_NONE &&
levels.connectedLevel != drm::HdcpLevel::HDCP_UNKNOWN) { levels.connectedLevel != drm::HdcpLevel::HDCP_UNKNOWN) {
ALOGI("Requested to start HDCP for connected level : %d", ALOGI("Requested to start HDCP for connected level : %d",
levels.connectedLevel); static_cast<int>(levels.connectedLevel));
if (!display->StartHdcp(true)) { if (!display->StartHdcp(true)) {
return ToBinderStatus(hwc3::Error::kUnsupported); return ToBinderStatus(hwc3::Error::kUnsupported);
} }

View file

@ -18,12 +18,10 @@
#include <memory> #include <memory>
#include "aidl/android/hardware/graphics/composer3/BnComposerClient.h" #include <aidl/android/hardware/graphics/composer3/BnComposerClient.h>
#include "aidl/android/hardware/graphics/composer3/LayerCommand.h" #include <aidl/android/hardware/graphics/composer3/LayerCommand.h>
#include "hwc/HwcLayer.h" #include "hwc/HwcLayer.h"
#include "hwc3/CommandResultWriter.h"
#include "hwc3/Utils.h"
#include "utils/Mutex.h"
using AidlPixelFormat = aidl::android::hardware::graphics::common::PixelFormat; using AidlPixelFormat = aidl::android::hardware::graphics::common::PixelFormat;
using AidlNativeHandle = aidl::android::hardware::common::NativeHandle; using AidlNativeHandle = aidl::android::hardware::common::NativeHandle;
@ -33,6 +31,14 @@ class CompositionStatsPoller;
class HwcDisplay; class HwcDisplay;
} // namespace android::drm_hwcomposer } // namespace android::drm_hwcomposer
namespace aidl::android::hardware::graphics::composer3 {
class CommandResultWriter;
namespace hwc3 {
enum class Error;
} // namespace hwc3
} // namespace aidl::android::hardware::graphics::composer3
namespace aidl::android::hardware::graphics::composer3::impl { namespace aidl::android::hardware::graphics::composer3::impl {
using AidlColorMode = ColorMode; using AidlColorMode = ColorMode;

View file

@ -20,9 +20,11 @@
#include <cinttypes> #include <cinttypes>
#include "Utils.h" #include <aidl/android/hardware/graphics/common/Dataspace.h>
#include "aidl/android/hardware/graphics/common/Dataspace.h" #include <aidl/android/hardware/graphics/common/DisplayHotplugEvent.h>
#include "aidl/android/hardware/graphics/common/DisplayHotplugEvent.h"
#include "drm/DrmHwc.h"
#include "hwc/HwcDisplay.h"
namespace aidl::android::hardware::graphics::composer3::impl { namespace aidl::android::hardware::graphics::composer3::impl {

View file

@ -17,10 +17,11 @@
#pragma once #pragma once
#include <aidl/android/hardware/graphics/composer3/IComposerClient.h> #include <aidl/android/hardware/graphics/composer3/IComposerClient.h>
#include <log/log.h>
#include <cstdint> #include <cstdint>
#include "utils/log.h"
// NOLINTNEXTLINE // NOLINTNEXTLINE
#define DEBUG_FUNC() ALOGV("%s", __func__) #define DEBUG_FUNC() ALOGV("%s", __func__)

View file

@ -21,7 +21,7 @@
#include <android/binder_process.h> #include <android/binder_process.h>
#include <sched.h> #include <sched.h>
#include "Composer.h" #include "hwc3/Composer.h"
#include "utils/log.h" #include "utils/log.h"
using aidl::android::hardware::graphics::composer3::impl::Composer; using aidl::android::hardware::graphics::composer3::impl::Composer;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "stats/CompositionStats.h" #include "CompositionStats.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -18,8 +18,8 @@
#include <memory> #include <memory>
#include "CompositionStats.h"
#include "compositor/CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "stats/CompositionStats.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -25,9 +25,9 @@
#include <aidl/android/frameworks/stats/IStats.h> #include <aidl/android/frameworks/stats/IStats.h>
#include <android/binder_manager.h> #include <android/binder_manager.h>
#include "CompositionStats.h"
#include "compositor/CompositionPlanner.h" #include "compositor/CompositionPlanner.h"
#include "desktopatoms.h" #include "desktopatoms.h"
#include "stats/CompositionStats.h"
#include "utils/log.h" #include "utils/log.h"
using aidl::android::frameworks::stats::IStats; using aidl::android::frameworks::stats::IStats;

View file

@ -16,8 +16,6 @@
#pragma once #pragma once
#include "stats/CompositionStats.h"
#include <condition_variable> #include <condition_variable>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
@ -25,6 +23,8 @@
#include <android-base/thread_annotations.h> #include <android-base/thread_annotations.h>
#include "stats/CompositionStats.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {
class CompositionStatsAtomReporter; class CompositionStatsAtomReporter;

View file

@ -18,9 +18,12 @@
#if HAS_LIBDISPLAY_INFO #if HAS_LIBDISPLAY_INFO
#include "EdidWrapper.h"
#include <ui/GraphicTypes.h> #include <ui/GraphicTypes.h>
#include "utils/EdidWrapper.h" #include "compositor/DisplayInfo.h"
#include "drm/DrmUnique.h"
#include "utils/log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {

View file

@ -26,8 +26,8 @@
#include <optional> #include <optional>
#include <string> #include <string>
#include "fd.h" #include "utils/fd.h"
#include "log.h" #include "utils/log.h"
namespace android::drm_hwcomposer { namespace android::drm_hwcomposer {