summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIshwarya Balaji Gururajan <igururajan@nvidia.com>2018-01-25 15:14:32 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-11 08:07:39 -0500
commit4514758a84bec3bc7a7c6c7b830b97c96e292ae1 (patch)
tree263d19ee03b52c13b1d288b54ccb36207c49f559
parent0278f479f647161390e405472b8d0e2659a385bf (diff)
tegra: dc: remove NVDISPLAY ifdefs on hdmivrr
remove VRR_AUTHENTICATION_ENABLED macro and replace it with inline api using runtime API to differentiate between chips. Jira TDS-2719 Change-Id: I80cd71dfa562b71bc3489f6d258fc35b9dfe0794 Signed-off-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1646225 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dp.c5
-rw-r--r--drivers/video/tegra/dc/hdmivrr.c28
-rw-r--r--drivers/video/tegra/dc/sor.h7
3 files changed, 20 insertions, 20 deletions
diff --git a/drivers/video/tegra/dc/dp.c b/drivers/video/tegra/dc/dp.c
index 3847ea4c5..761cb2b09 100644
--- a/drivers/video/tegra/dc/dp.c
+++ b/drivers/video/tegra/dc/dp.c
@@ -2875,9 +2875,8 @@ static bool tegra_dp_mode_filter(const struct tegra_dc *dc,
2875 2875
2876/* FIXME Bug: 1740464 2876/* FIXME Bug: 1740464
2877 * */ 2877 * */
2878#ifdef VRR_AUTHENTICATION_ENABLED 2878 if (tegra_dc_is_vrr_authentication_enabled())
2879 capability = vrr->capability; 2879 capability = vrr->capability;
2880#endif
2881 2880
2882 if (capability) { 2881 if (capability) {
2883 mode->upper_margin += 2; 2882 mode->upper_margin += 2;
diff --git a/drivers/video/tegra/dc/hdmivrr.c b/drivers/video/tegra/dc/hdmivrr.c
index 3a536045a..fb6d045ec 100644
--- a/drivers/video/tegra/dc/hdmivrr.c
+++ b/drivers/video/tegra/dc/hdmivrr.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * hdmivrr.c: hdmi vrr interface. 2 * hdmivrr.c: hdmi vrr interface.
3 * 3 *
4 * Copyright (c) 2015-2017, NVIDIA CORPORATION, All rights reserved. 4 * Copyright (c) 2015-2018, NVIDIA CORPORATION, All rights reserved.
5 * 5 *
6 * This software is licensed under the terms of the GNU General Public 6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and 7 * License version 2, as published by the Free Software Foundation, and
@@ -735,10 +735,8 @@ void tegra_hdmivrr_update_monspecs(struct tegra_dc *dc,
735 if (!vrr) 735 if (!vrr)
736 return; 736 return;
737 737
738#ifdef VRR_AUTHENTICATION_ENABLED 738 if (tegra_dc_is_vrr_authentication_enabled() && !vrr->capability)
739 if (!vrr->capability)
740 return; 739 return;
741#endif
742 740
743 /* Check whether VRR modes were already added */ 741 /* Check whether VRR modes were already added */
744 list_for_each(pos, head) { 742 list_for_each(pos, head) {
@@ -808,19 +806,19 @@ int tegra_hdmivrr_setup(struct tegra_hdmi *hdmi)
808 /* TODO: Remove this conditional 806 /* TODO: Remove this conditional
809 * once we have support for authentication 807 * once we have support for authentication
810 * */ 808 * */
811#ifdef VRR_AUTHENTICATION_ENABLED 809 if (tegra_dc_is_vrr_authentication_enabled()) {
812 status = tegra_hdmivrr_is_vrr_capable(hdmi); 810 status = tegra_hdmivrr_is_vrr_capable(hdmi);
813 if (status) 811 if (status)
814 goto fail; 812 goto fail;
815 813
816 status = tegra_hdmivrr_page_init(hdmi); 814 status = tegra_hdmivrr_page_init(hdmi);
817 if (status) 815 if (status)
818 goto fail; 816 goto fail;
819 817
820 status = tegra_hdmivrr_authentication(hdmi, vrr); 818 status = tegra_hdmivrr_authentication(hdmi, vrr);
821 if (status) 819 if (status)
822 goto fail; 820 goto fail;
823#endif 821 }
824 822
825 vrr->capability = 1; 823 vrr->capability = 1;
826 goto exit; 824 goto exit;
diff --git a/drivers/video/tegra/dc/sor.h b/drivers/video/tegra/dc/sor.h
index f2e1ecb95..af45b2d33 100644
--- a/drivers/video/tegra/dc/sor.h
+++ b/drivers/video/tegra/dc/sor.h
@@ -17,8 +17,6 @@
17#ifndef __DRIVERS_VIDEO_TEGRA_DC_SOR_H__ 17#ifndef __DRIVERS_VIDEO_TEGRA_DC_SOR_H__
18#define __DRIVERS_VIDEO_TEGRA_DC_SOR_H__ 18#define __DRIVERS_VIDEO_TEGRA_DC_SOR_H__
19 19
20#define VRR_AUTHENTICATION_ENABLED (!CONFIG_TEGRA_NVDISPLAY)
21
22#include <soc/tegra/chip-id.h> 20#include <soc/tegra/chip-id.h>
23#include <linux/clk/tegra.h> 21#include <linux/clk/tegra.h>
24#include <linux/reset.h> 22#include <linux/reset.h>
@@ -277,6 +275,11 @@ void __attribute__((weak)) tegra_sor_program_fpga_clk_mux_t19x(
277 struct tegra_dc_sor_data *sor); 275 struct tegra_dc_sor_data *sor);
278u32 __attribute__((weak)) tegra_sor_yuv420_8bpc_pixel_depth_t19x(void); 276u32 __attribute__((weak)) tegra_sor_yuv420_8bpc_pixel_depth_t19x(void);
279 277
278static inline bool tegra_dc_is_vrr_authentication_enabled(void)
279{
280 return (!tegra_dc_is_nvdisplay());
281}
282
280static inline u32 nv_sor_head_state0(u32 i) 283static inline u32 nv_sor_head_state0(u32 i)
281{ 284{
282 if (tegra_dc_is_t19x()) 285 if (tegra_dc_is_t19x())