Message ID | 20241005232551.307399-1-linux@treblig.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/rockchip: cdn-dp: Remove unused functions | expand |
* linux@treblig.org (linux@treblig.org) wrote: > From: "Dr. David Alan Gilbert" <linux@treblig.org> > > 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 <linux@treblig.org> Ping. Dave > --- > drivers/gpu/drm/rockchip/cdn-dp-reg.c | 39 --------------------------- > drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 -- > 2 files changed, 41 deletions(-) > > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c > index 33fb4d05c506..a57cda971f20 100644 > --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c > +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c > @@ -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; > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.h b/drivers/gpu/drm/rockchip/cdn-dp-reg.h > index 441248b7a79e..68c3dbff1123 100644 > --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.h > +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.h > @@ -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); > -- > 2.46.2 >
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c index 33fb4d05c506..a57cda971f20 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c @@ -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; diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.h b/drivers/gpu/drm/rockchip/cdn-dp-reg.h index 441248b7a79e..68c3dbff1123 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.h +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.h @@ -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);