diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0852-drm-amd-dal-simplify-atomic-gamma-programming-code.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0852-drm-amd-dal-simplify-atomic-gamma-programming-code.patch | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0852-drm-amd-dal-simplify-atomic-gamma-programming-code.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0852-drm-amd-dal-simplify-atomic-gamma-programming-code.patch new file mode 100644 index 00000000..fa30454b --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0852-drm-amd-dal-simplify-atomic-gamma-programming-code.patch @@ -0,0 +1,141 @@ +From ca381369f675f0c5905eaf7f0f18e73c45a275fd Mon Sep 17 00:00:00 2001 +From: Mykola Lysenko <Mykola.Lysenko@amd.com> +Date: Tue, 1 Dec 2015 19:29:49 +0800 +Subject: [PATCH 0852/1050] drm/amd/dal: simplify atomic gamma programming code + +Change-Id: Idc2b27fe8d612fbafc2ac549f2140fc50f0af5f2 +Signed-off-by: Harry Wentland <harry.wentland@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + .../gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 67 +++++++++++----------- + 1 file changed, 35 insertions(+), 32 deletions(-) + +diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +index 8ccee49..ed79a44 100644 +--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c ++++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +@@ -935,36 +935,28 @@ static void amdgpu_dm_atomic_crtc_gamma_set( + + static int dm_crtc_funcs_atomic_set_property( + struct drm_crtc *crtc, +- struct drm_crtc_state *state, ++ struct drm_crtc_state *crtc_state, + struct drm_property *property, + uint64_t val) + { +- struct drm_crtc_state *new_crtc_state; +- struct drm_crtc *new_crtc; +- int i; +- +- for_each_crtc_in_state(state->state, new_crtc, new_crtc_state, i) { +- if (new_crtc == crtc) { +- struct drm_plane_state *plane_state; ++ struct drm_plane_state *plane_state; + +- new_crtc_state->planes_changed = true; ++ crtc_state->planes_changed = true; + +- /* +- * Bit of magic done here. We need to ensure +- * that planes get update after mode is set. +- * So, we need to add primary plane to state, +- * and this way atomic_update would be called +- * for it +- */ +- plane_state = +- drm_atomic_get_plane_state( +- state->state, +- crtc->primary); ++ /* ++ * Bit of magic done here. We need to ensure ++ * that planes get update after mode is set. ++ * So, we need to add primary plane to state, ++ * and this way atomic_update would be called ++ * for it ++ */ ++ plane_state = ++ drm_atomic_get_plane_state( ++ crtc_state->state, ++ crtc->primary); + +- if (!plane_state) +- return -EINVAL; +- } +- } ++ if (!plane_state) ++ return -EINVAL; + + return 0; + } +@@ -1010,7 +1002,7 @@ amdgpu_dm_connector_detect(struct drm_connector *connector, bool force) + + int amdgpu_dm_connector_atomic_set_property( + struct drm_connector *connector, +- struct drm_connector_state *state, ++ struct drm_connector_state *connector_state, + struct drm_property *property, + uint64_t val) + { +@@ -1019,7 +1011,7 @@ int amdgpu_dm_connector_atomic_set_property( + struct dm_connector_state *dm_old_state = + to_dm_connector_state(connector->state); + struct dm_connector_state *dm_new_state = +- to_dm_connector_state(state); ++ to_dm_connector_state(connector_state); + + if (property == dev->mode_config.scaling_mode_property) { + struct drm_crtc_state *new_crtc_state; +@@ -1048,8 +1040,13 @@ int amdgpu_dm_connector_atomic_set_property( + + dm_new_state->scaling = rmx_type; + +- for_each_crtc_in_state(state->state, crtc, new_crtc_state, i) { +- if (crtc == state->crtc) { ++ for_each_crtc_in_state( ++ connector_state->state, ++ crtc, ++ new_crtc_state, ++ i) { ++ ++ if (crtc == connector_state->crtc) { + struct drm_plane_state *plane_state; + + new_crtc_state->mode_changed = true; +@@ -1063,7 +1060,7 @@ int amdgpu_dm_connector_atomic_set_property( + */ + plane_state = + drm_atomic_get_plane_state( +- state->state, ++ connector_state->state, + crtc->primary); + + if (!plane_state) +@@ -1084,8 +1081,14 @@ int amdgpu_dm_connector_atomic_set_property( + int i; + + dm_new_state->underscan_enable = val; +- for_each_crtc_in_state(state->state, crtc, new_crtc_state, i) { +- if (crtc == state->crtc) { ++ ++ for_each_crtc_in_state( ++ connector_state->state, ++ crtc, ++ new_crtc_state, ++ i) { ++ ++ if (crtc == connector_state->crtc) { + struct drm_plane_state *plane_state; + + /* +@@ -1097,7 +1100,7 @@ int amdgpu_dm_connector_atomic_set_property( + */ + plane_state = + drm_atomic_get_plane_state( +- state->state, ++ connector_state->state, + crtc->primary); + + if (!plane_state) +-- +1.9.1 + |