sdm: Qseed3 scalar updates

- New 2D alpha interpolation config mode for scalar.
- Recognize qseed3 versions.

Change-Id: I4fb93e2c5f6280a4ac2627d00d2d573af10e70fe
CRs-Fixed: 2069565
This commit is contained in:
Rohit Kulkarni
2017-06-29 17:52:10 -07:00
committed by Gerrit - the friendly Code Review server
parent 6e31a74119
commit bfa855c7b5
5 changed files with 36 additions and 1 deletions

View File

@@ -318,6 +318,13 @@ enum struct QSEEDVersion {
V3, V3,
}; };
/* QSEED3 Step version */
enum struct QSEEDStepVersion {
V2,
V3,
V4,
};
enum struct SmartDMARevision { enum struct SmartDMARevision {
V1, V1,
V2, V2,
@@ -372,6 +379,7 @@ struct DRMPlaneTypeInfo {
uint32_t max_vertical_deci; uint32_t max_vertical_deci;
uint64_t max_pipe_bandwidth; uint64_t max_pipe_bandwidth;
uint32_t cache_size; // cache size in bytes for inline rotation support. 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 // All DRM Planes as map<Plane_id , plane_type_info> listed from highest to lowest priority

View File

@@ -88,6 +88,7 @@ enum HWSubBlockType {
enum HWAlphaInterpolation { enum HWAlphaInterpolation {
kInterpolationPixelRepeat, kInterpolationPixelRepeat,
kInterpolationBilinear, kInterpolationBilinear,
kInterpolation2D,
kInterpolationMax, kInterpolationMax,
}; };
@@ -136,6 +137,12 @@ struct HWRotatorInfo {
void Reset() { *this = HWRotatorInfo(); } void Reset() { *this = HWRotatorInfo(); }
}; };
enum HWQseedStepVersion {
kQseed3v2,
kQseed3v3,
kQseed3v4,
};
struct HWDestScalarInfo { struct HWDestScalarInfo {
uint32_t count = 0; uint32_t count = 0;
uint32_t max_input_width = 0; uint32_t max_input_width = 0;
@@ -205,6 +212,7 @@ struct HWResourceInfo {
CompRatioMap comp_ratio_rt_map; CompRatioMap comp_ratio_rt_map;
CompRatioMap comp_ratio_nrt_map; CompRatioMap comp_ratio_nrt_map;
uint32_t cache_size = 0; // cache size in bytes uint32_t cache_size = 0; // cache size in bytes
HWQseedStepVersion pipe_qseed3_version = kQseed3v2; // only valid when has_qseed3=true
void Reset() { *this = HWResourceInfo(); } void Reset() { *this = HWResourceInfo(); }
}; };

View File

@@ -101,6 +101,23 @@ class DRMLoggerImpl : public DRMLogger {
char buf_[1024] = {}; 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; HWResourceInfo *HWInfoDRM::hw_resource_ = nullptr;
HWInfoDRM::HWInfoDRM() { HWInfoDRM::HWInfoDRM() {
@@ -374,6 +391,7 @@ void HWInfoDRM::PopulatePipeCaps(const sde_drm::DRMPlaneTypeInfo &info,
hw_resource->has_decimation = info.max_horizontal_deci > 1 && info.max_vertical_deci > 1; 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->max_pipe_bw = info.max_pipe_bandwidth / kKiloUnit;
hw_resource->cache_size = info.cache_size; hw_resource->cache_size = info.cache_size;
hw_resource->pipe_qseed3_version = GetQseedStepVersion(info.qseed3_version);
} }
void HWInfoDRM::PopulateSupportedFmts(HWSubBlockType sub_blk_type, void HWInfoDRM::PopulateSupportedFmts(HWSubBlockType sub_blk_type,

View File

@@ -64,7 +64,6 @@ class HWInfoDRM: public HWInfoInterface {
HWResourceInfo *hw_resource); HWResourceInfo *hw_resource);
void PopulatePipeCaps(const sde_drm::DRMPlaneTypeInfo &info, HWResourceInfo *hw_resource); void PopulatePipeCaps(const sde_drm::DRMPlaneTypeInfo &info, HWResourceInfo *hw_resource);
sde_drm::DRMManagerInterface *drm_mgr_intf_ = {}; sde_drm::DRMManagerInterface *drm_mgr_intf_ = {};
bool default_mode_ = false; bool default_mode_ = false;

View File

@@ -58,6 +58,8 @@ static uint32_t GetAlphaInterpolation(HWAlphaInterpolation alpha_filter_cfg) {
return FILTER_ALPHA_DROP_REPEAT; return FILTER_ALPHA_DROP_REPEAT;
case kInterpolationBilinear: case kInterpolationBilinear:
return FILTER_ALPHA_BILINEAR; return FILTER_ALPHA_BILINEAR;
case kInterpolation2D:
return FILTER_ALPHA_2D;
default: default:
DLOGE("Invalid Alpha Interpolation"); DLOGE("Invalid Alpha Interpolation");
return kInterpolationMax; return kInterpolationMax;