1
0
Fork 0

rockchip: move resolution_white.xml to /vendor/etc

Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib2b975092db744e70fa3eeebbc51dda17ced6a20
master
hmz007 3 years ago
parent a3eb07b200
commit 5ac40975d7

@ -742,7 +742,10 @@ PRODUCT_PROPERTY_OVERRIDES += \
USE_PRODUCT_RESOLUTION_WHITE := $(shell test -f $(TARGET_DEVICE_DIR)/resolution_white.xml && echo true)
ifeq ($(strip $(USE_PRODUCT_RESOLUTION_WHITE)), true)
PRODUCT_COPY_FILES += \
$(TARGET_DEVICE_DIR)/resolution_white.xml:/system/usr/share/resolution_white.xml
$(TARGET_DEVICE_DIR)/resolution_white.xml:/vendor/etc/resolution_white.xml
else
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/resolution_white.xml:/vendor/etc/resolution_white.xml
endif
# Hw Output HAL

@ -129,7 +129,7 @@ public class RkDisplayModes {
public final int HDR10 = 1;
public final int DOLBY_VISION = 2;
private static final String RESOLUTION_XML_PATH = "/system/usr/share/resolution_white.xml";
private static final String RESOLUTION_XML_PATH = "/vendor/etc/resolution_white.xml";
private final String HDMI_DBG_STATUS = "/d/dw-hdmi/status";
private static final String PROP_SVEP = "persist.sys.svep.mode";
@ -241,10 +241,11 @@ public class RkDisplayModes {
builder.append(String.format(Locale.ENGLISH, "%.2f", info.refreshRate));
}
boolean existingMode = false;
if (resolutions == null || IsResolutionNeedFilter(dpy)) {
if (resolutions == null || resolutions.size() == 0 ||
IsResolutionNeedFilter(dpy)) {
modeList.add(builder.toString());
} else {
boolean existingMode = false;
for (int j = 0; j < resolutions.size(); j++) {
if (resolutions.get(j).hasMatchingMode(info)) {
existingMode = true;

@ -201,7 +201,7 @@ int DrmConnector::UpdateModes() {
if (mode == c->modes[i]) {
if(type_ == DRM_MODE_CONNECTOR_HDMIA || type_ == DRM_MODE_CONNECTOR_DisplayPort)
{
//filter mode by /system/usr/share/resolution_white.xml.
//filter mode by /vendor/etc/resolution_white.xml.
if(drm_->mode_verify(mode))
{
new_modes.push_back(mode);

@ -120,7 +120,7 @@ void DrmResources::init_white_modes(void)
{
tinyxml2::XMLDocument doc;
doc.LoadFile("/system/usr/share/resolution_white.xml");
doc.LoadFile("/vendor/etc/resolution_white.xml");
tinyxml2::XMLElement* root=doc.RootElement();
/* usr tingxml2 to parse resolution.xml */

@ -311,7 +311,7 @@ int DrmConnector::UpdateModes() {
for (const DrmMode &mode : modes_) {
if (mode == c->modes[i]) {
if(type_ == DRM_MODE_CONNECTOR_HDMIA || type_ == DRM_MODE_CONNECTOR_DisplayPort){
//filter mode by /system/usr/share/resolution_white.xml.
//filter mode by /vendor/etc/resolution_white.xml.
if(drm_->mode_verify(mode)){
new_modes.push_back(mode);
exists = true;

@ -80,7 +80,7 @@ bool PlaneSortByArea(const DrmPlane* plane1,const DrmPlane* plane2)
void DrmDevice::init_white_modes(void){
tinyxml2::XMLDocument doc;
doc.LoadFile("/system/usr/share/resolution_white.xml");
doc.LoadFile("/vendor/etc/resolution_white.xml");
tinyxml2::XMLElement* root=doc.RootElement();
/* usr tingxml2 to parse resolution.xml */

Loading…
Cancel
Save