Skip to content

Commit 9fbfa32

Browse files
Laurent Pinchartsravnborg
authored andcommitted
drm: bridge: dw-hdmi: Constify mode argument to internal functions
Several internal functions take a drm_display_mode argument to configure the HDMI encoder or the HDMI PHY. They must not modify the mode, make the pointer const to enforce that. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-18-laurent.pinchart+renesas@ideasonboard.com
1 parent 35a395f commit 9fbfa32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,8 @@ static void hdmi_tx_hdcp_config(struct dw_hdmi *hdmi)
16281628
HDMI_A_HDCPCFG1_ENCRYPTIONDISABLE_MASK, HDMI_A_HDCPCFG1);
16291629
}
16301630

1631-
static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
1631+
static void hdmi_config_AVI(struct dw_hdmi *hdmi,
1632+
const struct drm_display_mode *mode)
16321633
{
16331634
struct hdmi_avi_infoframe frame;
16341635
u8 val;
@@ -1756,7 +1757,7 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
17561757
}
17571758

17581759
static void hdmi_config_vendor_specific_infoframe(struct dw_hdmi *hdmi,
1759-
struct drm_display_mode *mode)
1760+
const struct drm_display_mode *mode)
17601761
{
17611762
struct hdmi_vendor_infoframe frame;
17621763
u8 buffer[10];
@@ -2112,7 +2113,8 @@ static void hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi)
21122113
HDMI_IH_MUTE_FC_STAT2);
21132114
}
21142115

2115-
static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
2116+
static int dw_hdmi_setup(struct dw_hdmi *hdmi,
2117+
const struct drm_display_mode *mode)
21162118
{
21172119
int ret;
21182120

0 commit comments

Comments
 (0)