sdm: Do not use driver enums for flips
Driver enums for flips may be removed, use internal ones.
Change-Id: If8576ab3fc9a9f705480265b59ef3e05a1a51018
CRs-fixed: 1114808
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index 8c97215..4c37e8c 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -174,6 +174,12 @@
CONNECTOR_SET_OUTPUT_FB_ID,
};
+enum struct DRMRotation {
+ FLIP_H = 0x1,
+ FLIP_V = 0x2,
+ ROT_90 = 0x4,
+};
+
enum struct DRMBlendType {
UNDEFINED = 0,
OPAQUE = 1,
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 85dee22..3c5c1de 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -87,6 +87,7 @@
using sde_drm::DRMConnectorInfo;
using sde_drm::DRMPPFeatureInfo;
using sde_drm::DRMRect;
+using sde_drm::DRMRotation;
using sde_drm::DRMBlendType;
using sde_drm::DRMSrcConfig;
using sde_drm::DRMOps;
@@ -625,10 +626,10 @@
// In case of rotation, rotator handles flips
if (!needs_rotation) {
if (layer.transform.flip_horizontal) {
- rot_bit_mask |= 1 << DRM_REFLECT_X;
+ rot_bit_mask |= UINT32(DRMRotation::FLIP_H);
}
if (layer.transform.flip_vertical) {
- rot_bit_mask |= 1 << DRM_REFLECT_Y;
+ rot_bit_mask |= UINT32(DRMRotation::FLIP_V);
}
}