video: tegra: dc: add new vrr params
Daniel Solomon [Thu, 10 Sep 2015 22:43:29 +0000 (15:43 -0700)]
Add two new VRR cap parameters.
See bug 1684359, comment #3 for details.

Bug 1684359

Change-Id: Ifa37162a389975bcb24023d81176b026b7719da3
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/797898
(cherry picked from commit eb129742e5d63aaa3864a439e0bab2608d24e1dc)
Reviewed-on: http://git-master/r/831116
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

arch/arm/mach-tegra/include/mach/dc.h
arch/arm64/boot/dts/tegra210-hawkeye-p2290-common.dtsi
drivers/video/tegra/dc/of_dc.c

index 393f7de..141675f 100644 (file)
@@ -666,6 +666,8 @@ struct tegra_vrr {
        s32     frame2flip_us;
        s32     adjust_vfp;
        s32     adjust_db;
+       u32 db_correct_cap;
+       u32 db_hist_cap;
        s32     vfp;
 
        s32     authenticated;
index fd1b0ba..ca6317c 100644 (file)
                                vrr-settings {
                                        nvidia,vrr_min_fps = <30>;
                                        nvidia,frame_len_fluct = <6667>;
+                                       nvidia,db_correct_cap = <4000>;
+                                       nvidia,db_hist_cap = <75000>;
                                };
                                display-timings {
                                        1200x1920-32-75Hz {
index 1e75e34..cd954df 100644 (file)
@@ -510,16 +510,28 @@ static int parse_vrr_settings(struct platform_device *ndev,
        u32 temp;
 
        if (!of_property_read_u32(np, "nvidia,vrr_min_fps", &temp)) {
-               vrr->vrr_min_fps = (unsigned) temp;
-               OF_DC_LOG("vrr_min_fps %d\n", vrr->vrr_min_fps);
+               vrr->vrr_min_fps = temp;
+               OF_DC_LOG("vrr_min_fps %u\n", temp);
        }
 
        if (!of_property_read_u32(np, "nvidia,frame_len_fluct", &temp)) {
-               vrr->frame_len_fluct = (unsigned) temp;
-               OF_DC_LOG("frame_len_fluct %d\n", vrr->frame_len_fluct);
+               vrr->frame_len_fluct = temp;
+               OF_DC_LOG("frame_len_fluct %u\n", temp);
        } else
                vrr->frame_len_fluct = 2000;
 
+       if (!of_property_read_u32(np, "nvidia,db_correct_cap", &temp)) {
+               vrr->db_correct_cap = temp;
+               OF_DC_LOG("db_correct_cap %u\n", temp);
+       } else
+               vrr->db_correct_cap = 0;
+
+       if (!of_property_read_u32(np, "nvidia,db_hist_cap", &temp)) {
+               vrr->db_hist_cap = temp;
+               OF_DC_LOG("db_hist_cap %u\n", temp);
+       } else
+               vrr->db_hist_cap = 0;
+
        /*
         * VRR capability is set when we have vrr_settings section in DT
         * vrr_settings, vrr_min_fps, and vrr_max_fps should always be