aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch')
-rw-r--r--common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch128
1 files changed, 128 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch b/common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch
new file mode 100644
index 00000000..c403dd01
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0813-drm-amd-dal-Implement-power-control-of-COL_MAN-Gamma.patch
@@ -0,0 +1,128 @@
+From c0a545146b53d2ccaff1e0b1ab064a0f79c1450d Mon Sep 17 00:00:00 2001
+From: David Rokhvarg <David.Rokhvarg@amd.com>
+Date: Thu, 18 Feb 2016 13:50:38 -0500
+Subject: [PATCH 0813/1110] drm/amd/dal: Implement power control of COL_MAN
+ Gamma correction.
+
+This is a part of MPO bringup.
+
+Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/dal/dc/dce110/Makefile | 2 +-
+ drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp.c | 2 +-
+ .../drm/amd/dal/dc/dce110/dce110_opp_regamma_v.c | 31 ++++++++++++++++++++++
+ drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.c | 6 +++++
+ drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.h | 3 +++
+ 5 files changed, 42 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/Makefile b/drivers/gpu/drm/amd/dal/dc/dce110/Makefile
+index 404b2bf..170c273 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/Makefile
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/Makefile
+@@ -10,7 +10,7 @@ dce110_transform_gamut.o dce110_transform_scl.o dce110_opp_csc.o\
+ dce110_compressor.o dce110_mem_input.o dce110_hw_sequencer.o \
+ dce110_resource.o dce110_transform_bit_depth.o dce110_clock_source.o \
+ dce110_opp_regamma_v.o dce110_opp_csc_v.o dce110_timing_generator_v.o \
+-dce110_mem_input_v.o
++dce110_mem_input_v.o dce110_opp_v.o
+
+ AMD_DAL_DCE110 = $(addprefix $(AMDDALPATH)/dc/dce110/,$(DCE110))
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp.c
+index c06cf38..ab937d5 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp.c
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp.c
+@@ -42,7 +42,7 @@ enum {
+ /* Constructor, Destructor */
+ /*****************************************/
+
+-struct opp_funcs funcs = {
++static struct opp_funcs funcs = {
+ .opp_power_on_regamma_lut = dce110_opp_power_on_regamma_lut,
+ .opp_program_bit_depth_reduction = dce110_opp_program_bit_depth_reduction,
+ .opp_program_clamping_and_pixel_encoding = dce110_opp_program_clamping_and_pixel_encoding,
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_regamma_v.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_regamma_v.c
+index b9d7eda..8f4cb96 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_regamma_v.c
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_regamma_v.c
+@@ -517,4 +517,35 @@ bool dce110_opp_program_regamma_pwl_v(
+ return true;
+ }
+
++void dce110_opp_power_on_regamma_lut_v(
++ struct output_pixel_processor *opp,
++ bool power_on)
++{
++ uint32_t value = dm_read_reg(opp->ctx, mmDCFEV_MEM_PWR_CTRL);
++
++ set_reg_field_value(
++ value,
++ 0,
++ DCFEV_MEM_PWR_CTRL,
++ COL_MAN_GAMMA_CORR_MEM_PWR_FORCE);
++
++ set_reg_field_value(
++ value,
++ power_on,
++ DCFEV_MEM_PWR_CTRL,
++ COL_MAN_GAMMA_CORR_MEM_PWR_DIS);
+
++ set_reg_field_value(
++ value,
++ 0,
++ DCFEV_MEM_PWR_CTRL,
++ COL_MAN_INPUT_GAMMA_MEM_PWR_FORCE);
++
++ set_reg_field_value(
++ value,
++ power_on,
++ DCFEV_MEM_PWR_CTRL,
++ COL_MAN_INPUT_GAMMA_MEM_PWR_DIS);
++
++ dm_write_reg(opp->ctx, mmDCFEV_MEM_PWR_CTRL, value);
++}
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.c
+index 367325f..4b9042f 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.c
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.c
+@@ -39,6 +39,8 @@
+ /*****************************************/
+
+ struct opp_funcs funcs = {
++ .opp_power_on_regamma_lut = dce110_opp_power_on_regamma_lut_v,
++
+ .opp_program_regamma_pwl = dce110_opp_program_regamma_pwl_v,
+
+ .opp_set_csc_default = dce110_opp_v_set_csc_default,
+@@ -47,10 +49,14 @@ struct opp_funcs funcs = {
+
+ .opp_program_bit_depth_reduction =
+ dce110_opp_program_bit_depth_reduction,
++
+ .opp_program_clamping_and_pixel_encoding =
+ dce110_opp_program_clamping_and_pixel_encoding,
+
+ .opp_set_dyn_expansion = dce110_opp_set_dyn_expansion,
++
++ .opp_set_regamma_mode = dce110_opp_set_regamma_mode,
++
+ .opp_destroy = dce110_opp_destroy,
+ };
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.h b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.h
+index 3f2ed4a..9543a70 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.h
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_opp_v.h
+@@ -51,5 +51,8 @@ bool dce110_opp_program_regamma_pwl_v(
+ struct output_pixel_processor *opp,
+ const struct regamma_params *params);
+
++void dce110_opp_power_on_regamma_lut_v(
++ struct output_pixel_processor *opp,
++ bool power_on);
+
+ #endif /* __DC_OPP_DCE110_V_H__ */
+--
+2.7.4
+