diff mbox

[v2] Add DPI override option

Message ID 1493783528-5436-1-git-send-email-john.stultz@linaro.org
State New
Headers show

Commit Message

John Stultz May 3, 2017, 3:52 a.m. UTC
This patch adds DPI override option and sets the db410c to 160.
If the value is left at the default 0, it will be probed from
the monitor.

Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Vishal Bhoj <vishal.bhoj@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 configs/db410c_defconfig | 1 +
 graphics/Kconfig         | 7 +++++++
 graphics/device.mk       | 3 +++
 3 files changed, 11 insertions(+)

-- 
2.7.4
diff mbox

Patch

diff --git a/configs/db410c_defconfig b/configs/db410c_defconfig
index e13ad04..2254fcc 100644
--- a/configs/db410c_defconfig
+++ b/configs/db410c_defconfig
@@ -8,3 +8,4 @@  CONFIG_KERNEL_PATH="device/linaro/generic-kernels/android-db410c-qcomlt-4.9.gz-d
 CONFIG_BOARD_KERNEL_CMDLINE="androidboot.selinux=permissive firmware_class.path=/system/vendor/firmware/"
 CONFIG_BOARD_KERNEL_BASE=0x80008000
 CONFIG_RAMDISK_OFFSET=0x0
+CONFIG_DISPLAY_DPI=160
diff --git a/graphics/Kconfig b/graphics/Kconfig
index 6e76697..24d2255 100644
--- a/graphics/Kconfig
+++ b/graphics/Kconfig
@@ -32,4 +32,11 @@  config BOARD_GPU_DRIVERS
 	default "freedreno virgl"
 
 endif
+config DISPLAY_DPI
+	int "Display DPI setting override"
+	default 0
+	help
+	  Sets the DPI value. If left as zero, the DPI will
+	  be probed via EDID from the monitor or use values
+	  from DT.
 endmenu
diff --git a/graphics/device.mk b/graphics/device.mk
index bab2d62..267bc2f 100644
--- a/graphics/device.mk
+++ b/graphics/device.mk
@@ -3,6 +3,9 @@  PRODUCT_PROPERTY_OVERRIDES := $(if $(CONFIG_SW_GRAPHICS), \
 
 PRODUCT_PACKAGES := libGLES_android
 
+PRODUCT_PROPERTY_OVERRIDES += \
+        ro.sf.lcd_density=$(CONFIG_DISPLAY_DPI)
+
 subdirs-true :=
 subdirs-$(BOARD_USES_DRM_HWCOMPOSER) += drm
 subdirs-$(CONFIG_GRALLOC_MALI) += gralloc