Commit 35a395f1 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Sam Ravnborg

drm: bridge: dw-hdmi: Constify mode argument to dw_hdmi_phy_ops .init()

The PHY .init() must not modify the mode it receives. Make the pointer
const to enfore that.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-17-laurent.pinchart+renesas@ideasonboard.com
parent af05bba0
...@@ -1531,7 +1531,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi) ...@@ -1531,7 +1531,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi)
} }
static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data, static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
int i, ret; int i, ret;
......
...@@ -297,7 +297,7 @@ static inline void dw_hdmi_dwc_write_bits(struct meson_dw_hdmi *dw_hdmi, ...@@ -297,7 +297,7 @@ static inline void dw_hdmi_dwc_write_bits(struct meson_dw_hdmi *dw_hdmi,
/* Setup PHY bandwidth modes */ /* Setup PHY bandwidth modes */
static void meson_hdmi_phy_setup_mode(struct meson_dw_hdmi *dw_hdmi, static void meson_hdmi_phy_setup_mode(struct meson_dw_hdmi *dw_hdmi,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
struct meson_drm *priv = dw_hdmi->priv; struct meson_drm *priv = dw_hdmi->priv;
unsigned int pixel_clock = mode->clock; unsigned int pixel_clock = mode->clock;
...@@ -427,7 +427,7 @@ static void dw_hdmi_set_vclk(struct meson_dw_hdmi *dw_hdmi, ...@@ -427,7 +427,7 @@ static void dw_hdmi_set_vclk(struct meson_dw_hdmi *dw_hdmi,
} }
static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data, static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data; struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data;
struct meson_drm *priv = dw_hdmi->priv; struct meson_drm *priv = dw_hdmi->priv;
......
...@@ -312,7 +312,7 @@ static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_fun ...@@ -312,7 +312,7 @@ static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_fun
}; };
static int dw_hdmi_rockchip_genphy_init(struct dw_hdmi *dw_hdmi, void *data, static int dw_hdmi_rockchip_genphy_init(struct dw_hdmi *dw_hdmi, void *data,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
struct rockchip_hdmi *hdmi = (struct rockchip_hdmi *)data; struct rockchip_hdmi *hdmi = (struct rockchip_hdmi *)data;
......
...@@ -341,7 +341,7 @@ static int sun8i_hdmi_phy_config_h3(struct dw_hdmi *hdmi, ...@@ -341,7 +341,7 @@ static int sun8i_hdmi_phy_config_h3(struct dw_hdmi *hdmi,
} }
static int sun8i_hdmi_phy_config(struct dw_hdmi *hdmi, void *data, static int sun8i_hdmi_phy_config(struct dw_hdmi *hdmi, void *data,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
struct sun8i_hdmi_phy *phy = (struct sun8i_hdmi_phy *)data; struct sun8i_hdmi_phy *phy = (struct sun8i_hdmi_phy *)data;
u32 val = 0; u32 val = 0;
......
...@@ -114,7 +114,7 @@ struct dw_hdmi_phy_config { ...@@ -114,7 +114,7 @@ struct dw_hdmi_phy_config {
struct dw_hdmi_phy_ops { struct dw_hdmi_phy_ops {
int (*init)(struct dw_hdmi *hdmi, void *data, int (*init)(struct dw_hdmi *hdmi, void *data,
struct drm_display_mode *mode); const struct drm_display_mode *mode);
void (*disable)(struct dw_hdmi *hdmi, void *data); void (*disable)(struct dw_hdmi *hdmi, void *data);
enum drm_connector_status (*read_hpd)(struct dw_hdmi *hdmi, void *data); enum drm_connector_status (*read_hpd)(struct dw_hdmi *hdmi, void *data);
void (*update_hpd)(struct dw_hdmi *hdmi, void *data, void (*update_hpd)(struct dw_hdmi *hdmi, void *data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment