From patchwork Tue May 2 23:05:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 98460 Delivered-To: patches@linaro.org Received: by 10.140.89.200 with SMTP id v66csp35756qgd; Tue, 2 May 2017 16:05:47 -0700 (PDT) X-Received: by 10.99.168.5 with SMTP id o5mr35878807pgf.19.1493766347475; Tue, 02 May 2017 16:05:47 -0700 (PDT) Return-Path: Received: from mail-pg0-x22c.google.com (mail-pg0-x22c.google.com. [2607:f8b0:400e:c05::22c]) by mx.google.com with ESMTPS id s78si6346516pgs.174.2017.05.02.16.05.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 16:05:47 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22c as permitted sender) client-ip=2607:f8b0:400e:c05::22c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22c as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x22c.google.com with SMTP id y4so63246743pge.0 for ; Tue, 02 May 2017 16:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=v0BZapbAxv33/EOYep+EuDguJ2hjVt58JAcvGoLJJ4w=; b=GU18kp4L9OJq/N4XCW3Th2JUQ6pFMksyHPX37y7i8FRJEiSYl20XM30TX7n4zPZSLB +ROd693SROPogFQ+kYfZILe+zR2sKsXcNNJ54RwPCvvrojofSp+/IJD6PqGhsaS4iYt/ OVz4JE+9HC8yTLFfMEL8r+NV/MZw0FoPXXKGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v0BZapbAxv33/EOYep+EuDguJ2hjVt58JAcvGoLJJ4w=; b=gCt6gp+164FvM1g9zB3L6/T/5jdxpgxa2lGONfbah765jaHX1pHN6GzcJHSkATaO9f mIEmvqTNyzudqNWQe2VaXcwDbBDB9ePZ113Nrr+i0UDiYKa5KfdejecVG1RWcjvI7E9p i2pbvZJV12pkXYBSYKhrRwT7dSWh+fjGCnSVzxHfy6GhEc/fbhAx8G91DOI7bVv/HWM8 EGfjYQCUjJLTNOBQPBwywnVrXrPIK/XWbhCWLV6dNMHldN1VAEAIRQkEmwlQK7DUo9p1 BRsJZoQzl1fP+gBnA7TIHLWhPTs4Duap6A6L5hB4HYFgwx9pFw50veMRtbvyAsCfeQWb stAA== X-Gm-Message-State: AN3rC/78eMXJVKXlxicsuZnn+WtAL+LVU7E+nyRypKTU6JNfDaQrO25m l9R+VKqmpHwwLlRkd5k= X-Received: by 10.98.50.67 with SMTP id y64mr1539435pfy.117.1493766346989; Tue, 02 May 2017 16:05:46 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id f80sm767180pff.84.2017.05.02.16.05.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 May 2017 16:05:45 -0700 (PDT) From: John Stultz To: Cc: John Stultz , Rob Herring , Sumit Semwal , Vishal Bhoj , Amit Pundir Subject: [PATCH] Add DPI override option Date: Tue, 2 May 2017 16:05:42 -0700 Message-Id: <1493766342-25170-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 This patch adds DPI override option and sets the db410c to 160. If the value is left at the defualt 0, it will be probed from the monitor. Cc: Rob Herring Cc: Sumit Semwal Cc: Vishal Bhoj Cc: Amit Pundir Signed-off-by: John Stultz --- configs/db410c_defconfig | 1 + graphics/Kconfig | 6 ++++++ graphics/device.mk | 5 +++++ 3 files changed, 12 insertions(+) -- 2.7.4 diff --git a/configs/db410c_defconfig b/configs/db410c_defconfig index e13ad04..cc6a209 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_DPI=160 diff --git a/graphics/Kconfig b/graphics/Kconfig index 6e76697..6d23079 100644 --- a/graphics/Kconfig +++ b/graphics/Kconfig @@ -32,4 +32,10 @@ config BOARD_GPU_DRIVERS default "freedreno virgl" endif +config DPI + int "DPI setting override" + default 0 + help + Sets the DPI value. If left as zero, the DPI will + be probed via EDID from the monitor/panel. endmenu diff --git a/graphics/device.mk b/graphics/device.mk index bab2d62..f6bc80d 100644 --- a/graphics/device.mk +++ b/graphics/device.mk @@ -3,6 +3,11 @@ PRODUCT_PROPERTY_OVERRIDES := $(if $(CONFIG_SW_GRAPHICS), \ PRODUCT_PACKAGES := libGLES_android +ifneq ($(CONFIG_DPI),0) +PRODUCT_PROPERTY_OVERRIDES += \ + ro.sf.lcd_density=$(CONFIG_DPI) +endif + subdirs-true := subdirs-$(BOARD_USES_DRM_HWCOMPOSER) += drm subdirs-$(CONFIG_GRALLOC_MALI) += gralloc