Skip to contentSkip to conversation

drm/amd/display: drop min/max wrappers

PATCH In review Dave Airlie 3 participants 3 messages Jan 9, 2017 – Jan 10, 2017 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: drop min/max wrappers

From: Dave Airlie <[email protected]>

These aren't needed, and aren't really used in too many places.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c        | 2 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/os_types.h       | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 69819d8..763d1e3 100644
@@ -628,7 +628,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
 	full_pipe_count = core_dc->res_pool->pipe_count;
 	if (core_dc->res_pool->underlay_pipe_index >= 0)
 		full_pipe_count--;
-	core_dc->public.caps.max_targets = dm_min(
+	core_dc->public.caps.max_targets = min(
 			full_pipe_count,
 			core_dc->res_pool->stream_enc_count);
 
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +2 -2
index 2626120..dd922bd 100644
@@ -289,7 +289,7 @@ static void dce_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 64);
 
 	/* Prepare to program display clock*/
@@ -364,7 +364,7 @@ static void dce112_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 62);
 
 	dce_clk_params.target_clock_frequency = requested_clk_khz;
drivers/gpu/drm/amd/display/dc/os_types.h +0 -2
index 7f0c282..27ed2a6 100644
@@ -52,8 +52,6 @@
 
 #define dm_vlog(fmt, args) vprintk(fmt, args)
 
-#define dm_min(x, y) min(x, y)
-#define dm_max(x, y) max(x, y)
 #endif
 
 
Signature · 6 lines
2.9.3

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170109223547.24601-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 52 lines · Dave Airlie

From: Dave Airlie <[email protected]>

These aren't needed, and aren't really used in too many places.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c        | 2 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/os_types.h       | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 69819d8..763d1e3 100644
@@ -628,7 +628,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
 	full_pipe_count = core_dc->res_pool->pipe_count;
 	if (core_dc->res_pool->underlay_pipe_index >= 0)
 		full_pipe_count--;
-	core_dc->public.caps.max_targets = dm_min(
+	core_dc->public.caps.max_targets = min(
 			full_pipe_count,
 			core_dc->res_pool->stream_enc_count);
 
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +2 -2
index 2626120..dd922bd 100644
@@ -289,7 +289,7 @@ static void dce_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 64);
 
 	/* Prepare to program display clock*/
@@ -364,7 +364,7 @@ static void dce112_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 62);
 
 	dce_clk_params.target_clock_frequency = requested_clk_khz;
drivers/gpu/drm/amd/display/dc/os_types.h +0 -0
index 7f0c282..27ed2a6 100644

drivers/gpu/drm/amd/display/dc/os_types.h line 57

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/os_types.h +0 -2
@@ -52,8 +52,6 @@
 
 #define dm_vlog(fmt, args) vprintk(fmt, args)
 
-#define dm_min(x, y) min(x, y)
-#define dm_max(x, y) max(x, y)
 #endif
 
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 5dd6c190-a2e5-8acc-125b-5102f92167ef-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org

Reviewed-by
#4 lore raw
Quoted 57 lines · Edward O'Callaghan
Quoted 54 lines · Dave Airlie

From: Dave Airlie <[email protected]>

These aren't needed, and aren't really used in too many places.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c        | 2 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/os_types.h       | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 69819d8..763d1e3 100644
@@ -628,7 +628,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
 	full_pipe_count = core_dc->res_pool->pipe_count;
 	if (core_dc->res_pool->underlay_pipe_index >= 0)
 		full_pipe_count--;
-	core_dc->public.caps.max_targets = dm_min(
+	core_dc->public.caps.max_targets = min(
 			full_pipe_count,
 			core_dc->res_pool->stream_enc_count);
 
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +2 -2
index 2626120..dd922bd 100644
@@ -289,7 +289,7 @@ static void dce_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 64);
 
 	/* Prepare to program display clock*/
@@ -364,7 +364,7 @@ static void dce112_set_clock(
 
 	/* Make sure requested clock isn't lower than minimum threshold*/
 	if (requested_clk_khz > 0)
-		requested_clk_khz = dm_max(requested_clk_khz,
+		requested_clk_khz = max(requested_clk_khz,
 				clk_dce->dentist_vco_freq_khz / 62);
 
 	dce_clk_params.target_clock_frequency = requested_clk_khz;
drivers/gpu/drm/amd/display/dc/os_types.h +0 -0
index 7f0c282..27ed2a6 100644
@@ -52,8 +52,6 @@
 
 #define dm_vlog(fmt, args) vprintk(fmt, args)
 
Quoted 14 lines

drivers/gpu/drm/amd/display/dc/os_types.h line 57

Quoted 6 lines
drivers/gpu/drm/amd/display/dc/os_types.h +0 -2
-#define dm_min(x, y) min(x, y)
-#define dm_max(x, y) max(x, y)
 #endif
 
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx