if (link_settings.link_rate == max_link_rate) {
cur_min_clock_state = CLOCKS_STATE_INVALID;
- if (dal_display_clock_get_min_clocks_state(
- pipe_ctx->dis_clk, &cur_min_clock_state)) {
+ if (pipe_ctx->dis_clk->funcs->get_min_clocks_state) {
+ cur_min_clock_state =
+ pipe_ctx->dis_clk->funcs->get_min_clocks_state(
+ pipe_ctx->dis_clk);
if (cur_min_clock_state < CLOCKS_STATE_NOMINAL)
- dal_display_clock_set_min_clocks_state(
- pipe_ctx->dis_clk,
- CLOCKS_STATE_NOMINAL);
+ pipe_ctx->dis_clk->funcs->set_min_clocks_state(
+ pipe_ctx->dis_clk, CLOCKS_STATE_NOMINAL);
} else {
}
}
}
if (pool->base.display_clock != NULL)
- dal_display_clock_destroy(&pool->base.display_clock);
+ pool->base.display_clock->funcs->destroy(
+ &pool->base.display_clock);
+ pool->base.display_clock = NULL;
if (pool->base.irqs != NULL)
dal_irq_service_destroy(&pool->base.irqs);
if (!pre_mode_set) {
/* set clock_state without verification */
- if (dal_display_clock_set_min_clocks_state(
- pipe_ctx->dis_clk, *clocks_state))
+ if (pipe_ctx->dis_clk->funcs->set_min_clocks_state) {
+ pipe_ctx->dis_clk->funcs->set_min_clocks_state(
+ pipe_ctx->dis_clk, *clocks_state);
return;
+ }
/* TODOFPGA */
}
req_clocks.pixel_clk_khz = get_max_pixel_clock_for_all_paths(
dc, context, true);
- if (dal_display_clock_get_required_clocks_state(
- pipe_ctx->dis_clk, &req_clocks, clocks_state)) {
- dal_display_clock_set_min_clocks_state(
+ if (pipe_ctx->dis_clk->funcs->get_required_clocks_state) {
+ *clocks_state = pipe_ctx->dis_clk->funcs->get_required_clocks_state(
+ pipe_ctx->dis_clk, &req_clocks);
+ pipe_ctx->dis_clk->funcs->set_min_clocks_state(
pipe_ctx->dis_clk, *clocks_state);
} else {
}
}
if (pool->base.display_clock != NULL) {
- dal_display_clock_destroy(&pool->base.display_clock);
+ pool->base.display_clock->funcs->destroy(
+ &pool->base.display_clock);
+ pool->base.display_clock = NULL;
}
if (pool->base.irqs != NULL) {
}
if (pool->base.display_clock != NULL) {
- dal_display_clock_destroy(&pool->base.display_clock);
+ pool->base.display_clock->funcs->destroy(
+ &pool->base.display_clock);
+ pool->base.display_clock = NULL;
}
if (pool->base.irqs != NULL) {
}
if (pool->base.display_clock != NULL) {
- dal_display_clock_destroy(&pool->base.display_clock);
+ pool->base.display_clock->funcs->destroy(
+ &pool->base.display_clock);
+ pool->base.display_clock = NULL;
}
if (pool->base.irqs != NULL) {
# It provides the control and status of HW adapter resources,
# that are global for the ASIC and sharable between pipes.
-GPU = display_clock.o divider_range.o
+GPU = divider_range.o
AMD_DAL_GPU = $(addprefix $(AMDDALPATH)/dc/gpu/,$(GPU))
#ifndef __DAL_DISPLAY_CLOCK_DCE110_H__
#define __DAL_DISPLAY_CLOCK_DCE110_H__
-#include "gpu/display_clock.h"
+#include "display_clock_interface.h"
struct display_clock_dce110 {
struct display_clock disp_clk_base;
#ifndef __DAL_DISPLAY_CLOCK_DCE112_H__
#define __DAL_DISPLAY_CLOCK_DCE112_H__
-#include "gpu/display_clock.h"
+#include "display_clock_interface.h"
struct display_clock_dce112 {
struct display_clock disp_clk_base;
#ifndef __DAL_DISPLAY_CLOCK_DCE80_H__
#define __DAL_DISPLAY_CLOCK_DCE80_H__
-#include "gpu/display_clock.h"
+#include "display_clock_interface.h"
struct display_clock_dce80 {
struct display_clock disp_clk;
+++ /dev/null
-/*
- * Copyright 2012-15 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: AMD
- *
- */
-
-#include "dm_services.h"
-#include "display_clock.h"
-
-void dal_display_clock_destroy(struct display_clock **disp_clk)
-{
- if (!disp_clk || !*disp_clk) {
- BREAK_TO_DEBUGGER();
- return;
- }
-
- (*disp_clk)->funcs->destroy(disp_clk);
-
- *disp_clk = NULL;
-}
-
-bool dal_display_clock_get_min_clocks_state(
- struct display_clock *disp_clk,
- enum clocks_state *clocks_state)
-{
- if (!disp_clk->funcs->get_min_clocks_state)
- return false;
-
- *clocks_state = disp_clk->funcs->get_min_clocks_state(disp_clk);
- return true;
-}
-
-bool dal_display_clock_get_required_clocks_state(
- struct display_clock *disp_clk,
- struct state_dependent_clocks *req_clocks,
- enum clocks_state *clocks_state)
-{
- if (!disp_clk->funcs->get_required_clocks_state)
- return false;
-
- *clocks_state = disp_clk->funcs->get_required_clocks_state(
- disp_clk, req_clocks);
- return true;
-}
-
-bool dal_display_clock_set_min_clocks_state(
- struct display_clock *disp_clk,
- enum clocks_state clocks_state)
-{
- if (!disp_clk->funcs->set_min_clocks_state)
- return false;
-
- disp_clk->funcs->set_min_clocks_state(disp_clk, clocks_state);
- return true;
-}
-
+++ /dev/null
-/*
- * Copyright 2012-15 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: AMD
- *
- */
-
-#ifndef __DAL_DISPLAY_CLOCK_H__
-#define __DAL_DISPLAY_CLOCK_H__
-
-#include "include/display_clock_interface.h"
-
-#endif /* __DAL_DISPLAY_CLOCK_H__*/
void dal_display_clock_destroy(struct display_clock **to_destroy);
-bool dal_display_clock_get_min_clocks_state(
- struct display_clock *disp_clk,
- enum clocks_state *clocks_state);
-bool dal_display_clock_get_required_clocks_state(
- struct display_clock *disp_clk,
- struct state_dependent_clocks *req_clocks,
- enum clocks_state *clocks_state);
-bool dal_display_clock_set_min_clocks_state(
- struct display_clock *disp_clk,
- enum clocks_state clocks_state);
-
#endif /* __DISPLAY_CLOCK_INTERFACE_H__ */