From: Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 2/4] amdgpu/dc: kill some deadcode in dc core.
Date: Tue, 3 Oct 2017 15:11:00 +1000 [thread overview]
Message-ID: <20171003051102.325-2-airlied@gmail.com> (raw)
In-Reply-To: <20171003051102.325-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Dave Airlie <airlied@redhat.com>
Moves one function to an inline, but kills a bunch of deadcode.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 91 --------------------------------
drivers/gpu/drm/amd/display/dc/dc.h | 9 ++--
2 files changed, 4 insertions(+), 96 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index e8634b8..e3a014b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -575,30 +575,6 @@ static bool construct(struct dc *dc,
return false;
}
-/*
-void ProgramPixelDurationV(unsigned int pixelClockInKHz )
-{
- fixed31_32 pixel_duration = Fixed31_32(100000000, pixelClockInKHz) * 10;
- unsigned int pixDurationInPico = round(pixel_duration);
-
- DPG_PIPE_ARBITRATION_CONTROL1 arb_control;
-
- arb_control.u32All = ReadReg (mmDPGV0_PIPE_ARBITRATION_CONTROL1);
- arb_control.bits.PIXEL_DURATION = pixDurationInPico;
- WriteReg (mmDPGV0_PIPE_ARBITRATION_CONTROL1, arb_control.u32All);
-
- arb_control.u32All = ReadReg (mmDPGV1_PIPE_ARBITRATION_CONTROL1);
- arb_control.bits.PIXEL_DURATION = pixDurationInPico;
- WriteReg (mmDPGV1_PIPE_ARBITRATION_CONTROL1, arb_control.u32All);
-
- WriteReg (mmDPGV0_PIPE_ARBITRATION_CONTROL2, 0x4000800);
- WriteReg (mmDPGV0_REPEATER_PROGRAM, 0x11);
-
- WriteReg (mmDPGV1_PIPE_ARBITRATION_CONTROL2, 0x4000800);
- WriteReg (mmDPGV1_REPEATER_PROGRAM, 0x11);
-}
-*/
-
/*******************************************************************************
* Public functions
******************************************************************************/
@@ -1518,28 +1494,6 @@ struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i)
return NULL;
}
-struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
-{
- return dc->links[link_index];
-}
-
-const struct graphics_object_id dc_get_link_id_at_index(
- struct dc *dc, uint32_t link_index)
-{
- return dc->links[link_index]->link_id;
-}
-
-enum dc_irq_source dc_get_hpd_irq_source_at_index(
- struct dc *dc, uint32_t link_index)
-{
- return dc->links[link_index]->irq_source_hpd;
-}
-
-const struct audio **dc_get_audios(struct dc *dc)
-{
- return (const struct audio **)dc->res_pool->audios;
-}
-
enum dc_irq_source dc_interrupt_to_irq_source(
struct dc *dc,
uint32_t src_id,
@@ -1789,17 +1743,6 @@ struct dc_sink *dc_link_add_remote_sink(
return NULL;
}
-void dc_link_set_sink(struct dc_link *link, struct dc_sink *sink)
-{
- link->local_sink = sink;
-
- if (sink == NULL) {
- link->type = dc_connection_none;
- } else {
- link->type = dc_connection_single;
- }
-}
-
void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink)
{
int i;
@@ -1825,37 +1768,3 @@ void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink)
}
}
}
-
-bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data)
-{
- int i;
- struct mem_input *mi = NULL;
-
- for (i = 0; i < dc->res_pool->pipe_count; i++) {
- if (dc->res_pool->mis[i] != NULL) {
- mi = dc->res_pool->mis[i];
- break;
- }
- }
- if (mi == NULL) {
- dm_error("no mem_input!\n");
- return false;
- }
-
- if (dc->hwss.update_dchub)
- dc->hwss.update_dchub(dc->hwseq, dh_data);
- else
- ASSERT(dc->hwss.update_dchub);
-
-
- return true;
-
-}
-
-void dc_log_hw_state(struct dc *dc)
-{
-
- if (dc->hwss.log_hw_state)
- dc->hwss.log_hw_state(dc);
-}
-
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 31952b9..4ff5438 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -277,10 +277,6 @@ struct dc *dc_create(const struct dc_init_data *init_params);
void dc_destroy(struct dc **dc);
-bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data);
-
-void dc_log_hw_state(struct dc *dc);
-
/*******************************************************************************
* Surface Interfaces
******************************************************************************/
@@ -866,7 +862,10 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);
* boot time. They cannot be created or destroyed.
* Use dc_get_caps() to get number of links.
*/
-struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index);
+static inline struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
+{
+ return dc->links[link_index];
+}
/* Set backlight level of an embedded panel (eDP, LVDS). */
bool dc_link_set_backlight_level(const struct dc_link *dc_link, uint32_t level,
--
2.9.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-10-03 5:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 5:10 [PATCH 1/4] amdgpu/dc: fix indentation on a couple of returns Dave Airlie
[not found] ` <20171003051102.325-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-03 5:11 ` Dave Airlie [this message]
2017-10-03 5:11 ` [PATCH 3/4] amdgpu/dc: set a bunch of functions to static Dave Airlie
2017-10-03 5:11 ` [PATCH 4/4] amdgpu/dc: kill a bunch of dead code Dave Airlie
[not found] ` <20171003051102.325-4-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-03 15:16 ` 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=20171003051102.325-2-airlied@gmail.com \
--to=airlied-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox