sdm: Qseed3 scalar updates
- New 2D alpha interpolation config mode for scalar.
- Recognize qseed3 versions.
Change-Id: I4fb93e2c5f6280a4ac2627d00d2d573af10e70fe
CRs-Fixed: 2069565
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index 35285ee..91cee48 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -318,6 +318,13 @@
V3,
};
+/* QSEED3 Step version */
+enum struct QSEEDStepVersion {
+ V2,
+ V3,
+ V4,
+};
+
enum struct SmartDMARevision {
V1,
V2,
@@ -372,6 +379,7 @@
uint32_t max_vertical_deci;
uint64_t max_pipe_bandwidth;
uint32_t cache_size; // cache size in bytes for inline rotation support.
+ QSEEDStepVersion qseed3_version;
};
// All DRM Planes as map<Plane_id , plane_type_info> listed from highest to lowest priority
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 752d0c4..b12287e 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -88,6 +88,7 @@
enum HWAlphaInterpolation {
kInterpolationPixelRepeat,
kInterpolationBilinear,
+ kInterpolation2D,
kInterpolationMax,
};
@@ -136,6 +137,12 @@
void Reset() { *this = HWRotatorInfo(); }
};
+enum HWQseedStepVersion {
+ kQseed3v2,
+ kQseed3v3,
+ kQseed3v4,
+};
+
struct HWDestScalarInfo {
uint32_t count = 0;
uint32_t max_input_width = 0;
@@ -205,6 +212,7 @@
CompRatioMap comp_ratio_rt_map;
CompRatioMap comp_ratio_nrt_map;
uint32_t cache_size = 0; // cache size in bytes
+ HWQseedStepVersion pipe_qseed3_version = kQseed3v2; // only valid when has_qseed3=true
void Reset() { *this = HWResourceInfo(); }
};
diff --git a/sdm/libs/core/drm/hw_info_drm.cpp b/sdm/libs/core/drm/hw_info_drm.cpp
index 69af1bd..b8eb564 100644
--- a/sdm/libs/core/drm/hw_info_drm.cpp
+++ b/sdm/libs/core/drm/hw_info_drm.cpp
@@ -101,6 +101,23 @@
char buf_[1024] = {};
};
+static HWQseedStepVersion GetQseedStepVersion(sde_drm::QSEEDStepVersion drm_version) {
+ HWQseedStepVersion sdm_version;
+ switch (drm_version) {
+ case sde_drm::QSEEDStepVersion::V2:
+ default:
+ sdm_version = kQseed3v2;
+ break;
+ case sde_drm::QSEEDStepVersion::V3:
+ sdm_version = kQseed3v3;
+ break;
+ case sde_drm::QSEEDStepVersion::V4:
+ sdm_version = kQseed3v4;
+ break;
+ }
+ return sdm_version;
+}
+
HWResourceInfo *HWInfoDRM::hw_resource_ = nullptr;
HWInfoDRM::HWInfoDRM() {
@@ -374,6 +391,7 @@
hw_resource->has_decimation = info.max_horizontal_deci > 1 && info.max_vertical_deci > 1;
hw_resource->max_pipe_bw = info.max_pipe_bandwidth / kKiloUnit;
hw_resource->cache_size = info.cache_size;
+ hw_resource->pipe_qseed3_version = GetQseedStepVersion(info.qseed3_version);
}
void HWInfoDRM::PopulateSupportedFmts(HWSubBlockType sub_blk_type,
diff --git a/sdm/libs/core/drm/hw_info_drm.h b/sdm/libs/core/drm/hw_info_drm.h
index 5d92c41..7883592 100644
--- a/sdm/libs/core/drm/hw_info_drm.h
+++ b/sdm/libs/core/drm/hw_info_drm.h
@@ -64,7 +64,6 @@
HWResourceInfo *hw_resource);
void PopulatePipeCaps(const sde_drm::DRMPlaneTypeInfo &info, HWResourceInfo *hw_resource);
-
sde_drm::DRMManagerInterface *drm_mgr_intf_ = {};
bool default_mode_ = false;
diff --git a/sdm/libs/core/drm/hw_scale_drm.cpp b/sdm/libs/core/drm/hw_scale_drm.cpp
index 96f084e..de0ccb2 100644
--- a/sdm/libs/core/drm/hw_scale_drm.cpp
+++ b/sdm/libs/core/drm/hw_scale_drm.cpp
@@ -58,6 +58,8 @@
return FILTER_ALPHA_DROP_REPEAT;
case kInterpolationBilinear:
return FILTER_ALPHA_BILINEAR;
+ case kInterpolation2D:
+ return FILTER_ALPHA_2D;
default:
DLOGE("Invalid Alpha Interpolation");
return kInterpolationMax;