drm/rockchip: cdn-dp: Remove unused functions
Subsystems (4)
PATCH 1/1 drm/rockchip: cdn-dp: Remove unused functions
From: "Dr. David Alan Gilbert" <[email protected]>
cdn_dp_get_event and cdn_dp_dpcd_write were added in 2017 by commit 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399")
but unused.
Remove them.
(Build tested only on x86-64)
Signed-off-by Dr. David Alan Gilbert <[email protected]>
--- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 39 --------------------------- drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 -- 2 files changed, 41 deletions(-)
drivers/gpu/drm/rockchip/cdn-dp-reg.c +0 -39
@@ -244,40 +244,6 @@ int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len)return ret; } -int cdn_dp_dpcd_write (struct cdn_dp_device *dp,u32 addr,u8 value) -{ -u8 msg[6 ], reg[5 ]; -int ret; - - msg[0 ] =0 ; - msg[1 ] =1 ; - msg[2 ] = (addr >>16 ) &0xff ; - msg[3 ] = (addr >>8 ) &0xff ; - msg[4 ] = addr &0xff ; - msg[5 ] = value; - ret =cdn_dp_mailbox_send (dp,MB_MODULE_ID_DP_TX ,DPTX_WRITE_DPCD , -sizeof (msg), msg); -if (ret) - goto err_dpcd_write; - - ret =cdn_dp_mailbox_validate_receive (dp,MB_MODULE_ID_DP_TX , -DPTX_WRITE_DPCD ,sizeof (reg)); -if (ret) - goto err_dpcd_write; - - ret =cdn_dp_mailbox_read_receive (dp, reg,sizeof (reg)); -if (ret) - goto err_dpcd_write; - -if (addr != (reg[2 ] <<16 | reg[3 ] <<8 | reg[4 ])) - ret = -EINVAL ; - -err_dpcd_write: -if (ret) -DRM_DEV_ERROR (dp->dev,"dpcd write failed: %d\n" , ret); -return ret; -} -int cdn_dp_load_firmware (struct cdn_dp_device *dp,const u32 *i_mem,u32 i_size,const u32 *d_mem,u32 d_size) {
@@ -400,11 +366,6 @@ int cdn_dp_event_config(struct cdn_dp_device *dp)return ret; } -u32 cdn_dp_get_event (struct cdn_dp_device *dp) -{ -return readl (dp->regs +SW_EVENTS0 ); -} -int cdn_dp_get_hpd_status (struct cdn_dp_device *dp) {u8 status;
drivers/gpu/drm/rockchip/cdn-dp-reg.h +0 -2
@@ -459,9 +459,7 @@ int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem,int cdn_dp_set_firmware_active (struct cdn_dp_device *dp,bool enable);int cdn_dp_set_host_cap (struct cdn_dp_device *dp,u8 lanes,bool flip);int cdn_dp_event_config (struct cdn_dp_device *dp); -u32 cdn_dp_get_event (struct cdn_dp_device *dp);int cdn_dp_get_hpd_status (struct cdn_dp_device *dp); -int cdn_dp_dpcd_write (struct cdn_dp_device *dp,u32 addr,u8 value);int cdn_dp_dpcd_read (struct cdn_dp_device *dp,u32 addr,u8 *data,u16 len);int cdn_dp_get_edid_block (void *dp,u8 *edid,unsigned int block,size_t length);
Signature · 1 line
2.46.2
Quoted 10 lines · * [email protected] ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
cdn_dp_get_eventandcdn_dp_dpcd_writewere added in 2017 by commit1a0f7ed3abe2("drm/rockchip: cdn-dp: add cdn DP support for rk3399")but unused.
Remove them.
(Build tested only on x86-64)Signed-off-by Dr. David Alan Gilbert <[email protected]>
Ping.
Dave
Quoted 79 lines
--- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 39 --------------------------- drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 -- 2 files changed, 41 deletions(-)drivers/gpu/drm/rockchip/cdn-dp-reg.c +0
-39@@ -244,40 +244,6 @@ int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len)return ret; } -int cdn_dp_dpcd_write (struct cdn_dp_device *dp,u32 addr,u8 value) -{ -u8 msg[6 ], reg[5 ]; -int ret; - - msg[0 ] =0 ; - msg[1 ] =1 ; - msg[2 ] = (addr >>16 ) &0xff ; - msg[3 ] = (addr >>8 ) &0xff ; - msg[4 ] = addr &0xff ; - msg[5 ] = value; - ret =cdn_dp_mailbox_send (dp,MB_MODULE_ID_DP_TX ,DPTX_WRITE_DPCD , -sizeof (msg), msg); -if (ret) - goto err_dpcd_write; - - ret =cdn_dp_mailbox_validate_receive (dp,MB_MODULE_ID_DP_TX , -DPTX_WRITE_DPCD ,sizeof (reg)); -if (ret) - goto err_dpcd_write; - - ret =cdn_dp_mailbox_read_receive (dp, reg,sizeof (reg)); -if (ret) - goto err_dpcd_write; - -if (addr != (reg[2 ] <<16 | reg[3 ] <<8 | reg[4 ])) - ret = -EINVAL ; - -err_dpcd_write: -if (ret) -DRM_DEV_ERROR (dp->dev,"dpcd write failed: %d\n" , ret); -return ret; -} -int cdn_dp_load_firmware (struct cdn_dp_device *dp,const u32 *i_mem,u32 i_size,const u32 *d_mem,u32 d_size) {@@ -400,11 +366,6 @@ int cdn_dp_event_config(struct cdn_dp_device *dp)return ret; } -u32 cdn_dp_get_event (struct cdn_dp_device *dp) -{ -return readl (dp->regs +SW_EVENTS0 ); -} -int cdn_dp_get_hpd_status (struct cdn_dp_device *dp) {u8 status;drivers/gpu/drm/rockchip/cdn-dp-reg.h +0
-2@@ -459,9 +459,7 @@ int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem,int cdn_dp_set_firmware_active (struct cdn_dp_device *dp,bool enable);int cdn_dp_set_host_cap (struct cdn_dp_device *dp,u8 lanes,bool flip);int cdn_dp_event_config (struct cdn_dp_device *dp); -u32 cdn_dp_get_event (struct cdn_dp_device *dp);int cdn_dp_get_hpd_status (struct cdn_dp_device *dp); -int cdn_dp_dpcd_write (struct cdn_dp_device *dp,u32 addr,u8 value);int cdn_dp_dpcd_read (struct cdn_dp_device *dp,u32 addr,u8 *data,u16 len);int cdn_dp_get_edid_block (void *dp,u8 *edid,unsigned int block,size_t length);Signature · 1 line
2.46.2
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/