All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tony Cheng <tony.cheng-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 14/25] drm/amd/display: remove calculate_adjustments in conversion.h
Date: Mon, 23 Jan 2017 09:36:02 -0500	[thread overview]
Message-ID: <20170123143613.15441-15-harry.wentland@amd.com> (raw)
In-Reply-To: <20170123143613.15441-1-harry.wentland-5C7GfCeVMHo@public.gmane.org>

From: Tony Cheng <tony.cheng@amd.com>

- these are moved to color module

Change-Id: I2131991772553893b91ba9b927d20306e846141b
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
---
 drivers/gpu/drm/amd/display/dc/basics/conversion.c | 118 ---------------------
 drivers/gpu/drm/amd/display/dc/basics/conversion.h |  10 --
 2 files changed, 128 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
index 5682fea2080d..a2e22ae12adb 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
@@ -103,124 +103,6 @@ void convert_float_matrix(
 	}
 }
 
-static void calculate_adjustments_common(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	const struct fixed31_32 sin_hue =
-		dal_fixed31_32_sin(adjustments->hue);
-	const struct fixed31_32 cos_hue =
-		dal_fixed31_32_cos(adjustments->hue);
-
-	const struct fixed31_32 multiplier =
-		dal_fixed31_32_mul(
-			adjustments->contrast,
-			adjustments->saturation);
-
-	matrix[0] = dal_fixed31_32_mul(
-		ideal_matrix[0],
-		adjustments->contrast);
-
-	matrix[1] = dal_fixed31_32_mul(
-		ideal_matrix[1],
-		adjustments->contrast);
-
-	matrix[2] = dal_fixed31_32_mul(
-		ideal_matrix[2],
-		adjustments->contrast);
-
-	matrix[4] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[8],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[4],
-				cos_hue)));
-
-	matrix[5] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[9],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[5],
-				cos_hue)));
-
-	matrix[6] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_add(
-			dal_fixed31_32_mul(
-				ideal_matrix[10],
-				sin_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[6],
-				cos_hue)));
-
-	matrix[7] = ideal_matrix[7];
-
-	matrix[8] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[8],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[4],
-				sin_hue)));
-
-	matrix[9] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[9],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[5],
-				sin_hue)));
-
-	matrix[10] = dal_fixed31_32_mul(
-		multiplier,
-		dal_fixed31_32_sub(
-			dal_fixed31_32_mul(
-				ideal_matrix[10],
-				cos_hue),
-			dal_fixed31_32_mul(
-				ideal_matrix[6],
-				sin_hue)));
-
-	matrix[11] = ideal_matrix[11];
-}
-
-void calculate_adjustments(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	calculate_adjustments_common(ideal_matrix, adjustments, matrix);
-
-	matrix[3] = dal_fixed31_32_add(
-		ideal_matrix[3],
-		dal_fixed31_32_mul(
-			adjustments->brightness,
-			dal_fixed31_32_from_fraction(86, 100)));
-}
-
-void calculate_adjustments_y_only(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix)
-{
-	calculate_adjustments_common(ideal_matrix, adjustments, matrix);
-
-	matrix[3] = dal_fixed31_32_add(
-		ideal_matrix[3],
-		adjustments->brightness);
-}
-
 unsigned int log_2(unsigned int num)
 {
 	unsigned int result = 0;
diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.h b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
index b7fe431a7952..189325f68cfd 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.h
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
@@ -38,16 +38,6 @@ void convert_float_matrix(
 	struct fixed31_32 *flt,
 	uint32_t buffer_size);
 
-void calculate_adjustments(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix);
-
-void calculate_adjustments_y_only(
-	const struct fixed31_32 *ideal_matrix,
-	const struct dc_csc_adjustments *adjustments,
-	struct fixed31_32 *matrix);
-
 unsigned int log_2(unsigned int num);
 
 #endif
-- 
2.9.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-01-23 14:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 14:35 [PATCH 00/25] DC Patches Jan 23, 2017 Harry Wentland
     [not found] ` <20170123143613.15441-1-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2017-01-23 14:35   ` [PATCH 01/25] drm/amd/display: Null check clock source Harry Wentland
2017-01-23 14:35   ` [PATCH 02/25] drm/amd/display: Output Transfer Function Regamma Refactor Harry Wentland
2017-01-23 14:35   ` [PATCH 03/25] drm/amd/display: Disable Modules at Runtime Harry Wentland
2017-01-23 14:35   ` [PATCH 04/25] drm/amd/display: Fixing some fallout from dc_target removal Harry Wentland
2017-01-23 14:35   ` [PATCH 05/25] drm/amd/display: No audio output heard from DP panel Harry Wentland
2017-01-23 14:35   ` [PATCH 06/25] drm/amd/display: Use pflip prepare and submit parts (v2) Harry Wentland
2017-01-23 14:35   ` [PATCH 07/25] drm/amd/display: mode change without breaking unaffected streams Harry Wentland
2017-01-23 14:35   ` [PATCH 08/25] drm/amd/display: assert if mask is 0 in set_reg_field_value_ex Harry Wentland
2017-01-23 14:35   ` [PATCH 09/25] drm/amd/display: remove un-used defines and dead code Harry Wentland
2017-01-23 14:35   ` [PATCH 10/25] drm/amd/display: remove hw_crtc_timing Harry Wentland
2017-01-23 14:35   ` [PATCH 11/25] drm/amd/display: remove hw_info_frame Harry Wentland
2017-01-23 14:36   ` [PATCH 12/25] drm/amd/display: remove SIGNAL_TYPE_WIRELESS Harry Wentland
2017-01-23 14:36   ` [PATCH 13/25] drm/amd/display: remove dead code Harry Wentland
2017-01-23 14:36   ` Harry Wentland [this message]
2017-01-23 14:36   ` [PATCH 15/25] drm/amd/display: Set default degamma to sRGB instead of bypass Harry Wentland
2017-01-23 14:36   ` [PATCH 16/25] drm/amd/display: HDR Enablement For Applications Harry Wentland
2017-01-23 14:36   ` [PATCH 17/25] drm/amd/display: refactor clk_resync to avoid assertion Harry Wentland
2017-01-23 14:36   ` [PATCH 18/25] drm/amd/display: Remove meta_pitch Harry Wentland
2017-01-23 14:36   ` [PATCH 19/25] drm/amd/display: rename BGRA8888 to ABGR8888 Harry Wentland
2017-01-23 14:36   ` [PATCH 20/25] drm/amd/display: Fix missing conditions in hw sequencer Harry Wentland
2017-01-23 14:36   ` [PATCH 21/25] drm/amd/display: Add missing MI masks Harry Wentland
2017-01-23 14:36   ` [PATCH 22/25] drm/amd/display: Add interrupt entries for VBLANK isr Harry Wentland
     [not found]     ` <20170123143613.15441-23-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2017-01-23 17:43       ` Alex Deucher
2017-01-23 14:36   ` [PATCH 23/25] drm/amd/display: Register on VLBLANK ISR Harry Wentland
2017-01-23 14:36   ` [PATCH 24/25] drm/amd/display: Clean index in irq init loop Harry Wentland
2017-01-23 14:36   ` [PATCH 25/25] drm/amd/display: add missing dcc update on flip call Harry Wentland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170123143613.15441-15-harry.wentland@amd.com \
    --to=harry.wentland-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=tony.cheng-5C7GfCeVMHo@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.