mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
drm/bridge: Make dp/hdmi_audio_* callback keep the same paramter order with get_modes
Make the dp/hdmi_audio_* callback maintain the same parameter order as get_modes and edid_read: first the bridge, then the connector. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250703125027.311109-2-andyshrk@163.com [DB: added the chunk to the cdn-dp driver] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
parent
a6cfa4c883
commit
02bb63d1a5
|
|
@ -399,8 +399,8 @@ static inline struct adv7511 *bridge_to_adv7511(struct drm_bridge *bridge)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_DRM_I2C_ADV7511_CEC
|
||||
int adv7511_cec_init(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
int adv7511_cec_init(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
int adv7511_cec_enable(struct drm_bridge *bridge, bool enable);
|
||||
int adv7511_cec_log_addr(struct drm_bridge *bridge, u8 addr);
|
||||
int adv7511_cec_transmit(struct drm_bridge *bridge, u8 attempts,
|
||||
|
|
@ -424,12 +424,12 @@ int adv7533_attach_dsi(struct adv7511 *adv);
|
|||
int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv);
|
||||
|
||||
#ifdef CONFIG_DRM_I2C_ADV7511_AUDIO
|
||||
int adv7511_hdmi_audio_startup(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
void adv7511_hdmi_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
int adv7511_hdmi_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int adv7511_hdmi_audio_startup(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
void adv7511_hdmi_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
int adv7511_hdmi_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms);
|
||||
#else /*CONFIG_DRM_I2C_ADV7511_AUDIO */
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ static int adv7511_update_cts_n(struct adv7511 *adv7511)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int adv7511_hdmi_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int adv7511_hdmi_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms)
|
||||
{
|
||||
|
|
@ -168,8 +168,8 @@ int adv7511_hdmi_audio_prepare(struct drm_connector *connector,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int adv7511_hdmi_audio_startup(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
int adv7511_hdmi_audio_startup(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct adv7511 *adv7511 = bridge_to_adv7511(bridge);
|
||||
|
||||
|
|
@ -206,8 +206,8 @@ int adv7511_hdmi_audio_startup(struct drm_connector *connector,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void adv7511_hdmi_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
void adv7511_hdmi_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct adv7511 *adv7511 = bridge_to_adv7511(bridge);
|
||||
|
||||
|
|
|
|||
|
|
@ -346,8 +346,8 @@ static int adv7511_cec_parse_dt(struct device *dev, struct adv7511 *adv7511)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int adv7511_cec_init(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
int adv7511_cec_init(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct adv7511 *adv7511 = bridge_to_adv7511(bridge);
|
||||
struct device *dev = &adv7511->i2c_main->dev;
|
||||
|
|
|
|||
|
|
@ -936,8 +936,8 @@ lt9611_hdmi_tmds_char_rate_valid(const struct drm_bridge *bridge,
|
|||
return MODE_OK;
|
||||
}
|
||||
|
||||
static int lt9611_hdmi_audio_startup(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
static int lt9611_hdmi_audio_startup(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
|
||||
|
||||
|
|
@ -952,8 +952,8 @@ static int lt9611_hdmi_audio_startup(struct drm_connector *connector,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lt9611_hdmi_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
static int lt9611_hdmi_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms)
|
||||
{
|
||||
|
|
@ -974,8 +974,8 @@ static int lt9611_hdmi_audio_prepare(struct drm_connector *connector,
|
|||
&hparms->cea);
|
||||
}
|
||||
|
||||
static void lt9611_hdmi_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
static void lt9611_hdmi_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
|
||||
|
||||
|
|
|
|||
|
|
@ -440,8 +440,8 @@ static void dw_hdmi_qp_set_sample_rate(struct dw_hdmi_qp *hdmi, unsigned long lo
|
|||
dw_hdmi_qp_set_cts_n(hdmi, cts, n);
|
||||
}
|
||||
|
||||
static int dw_hdmi_qp_audio_enable(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
static int dw_hdmi_qp_audio_enable(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
|
||||
|
||||
|
|
@ -451,8 +451,8 @@ static int dw_hdmi_qp_audio_enable(struct drm_connector *connector,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int dw_hdmi_qp_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
static int dw_hdmi_qp_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms)
|
||||
{
|
||||
|
|
@ -497,8 +497,8 @@ static void dw_hdmi_qp_audio_disable_regs(struct dw_hdmi_qp *hdmi)
|
|||
AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
|
||||
}
|
||||
|
||||
static void dw_hdmi_qp_audio_disable(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
static void dw_hdmi_qp_audio_disable(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
|
||||
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ static int drm_bridge_connector_audio_startup(struct drm_connector *connector)
|
|||
if (!bridge->funcs->hdmi_audio_startup)
|
||||
return 0;
|
||||
|
||||
return bridge->funcs->hdmi_audio_startup(connector, bridge);
|
||||
return bridge->funcs->hdmi_audio_startup(bridge, connector);
|
||||
}
|
||||
|
||||
if (bridge_connector->bridge_dp_audio) {
|
||||
|
|
@ -472,7 +472,7 @@ static int drm_bridge_connector_audio_startup(struct drm_connector *connector)
|
|||
if (!bridge->funcs->dp_audio_startup)
|
||||
return 0;
|
||||
|
||||
return bridge->funcs->dp_audio_startup(connector, bridge);
|
||||
return bridge->funcs->dp_audio_startup(bridge, connector);
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
|
|
@ -489,13 +489,13 @@ static int drm_bridge_connector_audio_prepare(struct drm_connector *connector,
|
|||
if (bridge_connector->bridge_hdmi_audio) {
|
||||
bridge = bridge_connector->bridge_hdmi_audio;
|
||||
|
||||
return bridge->funcs->hdmi_audio_prepare(connector, bridge, fmt, hparms);
|
||||
return bridge->funcs->hdmi_audio_prepare(bridge, connector, fmt, hparms);
|
||||
}
|
||||
|
||||
if (bridge_connector->bridge_dp_audio) {
|
||||
bridge = bridge_connector->bridge_dp_audio;
|
||||
|
||||
return bridge->funcs->dp_audio_prepare(connector, bridge, fmt, hparms);
|
||||
return bridge->funcs->dp_audio_prepare(bridge, connector, fmt, hparms);
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
|
|
@ -509,12 +509,12 @@ static void drm_bridge_connector_audio_shutdown(struct drm_connector *connector)
|
|||
|
||||
if (bridge_connector->bridge_hdmi_audio) {
|
||||
bridge = bridge_connector->bridge_hdmi_audio;
|
||||
bridge->funcs->hdmi_audio_shutdown(connector, bridge);
|
||||
bridge->funcs->hdmi_audio_shutdown(bridge, connector);
|
||||
}
|
||||
|
||||
if (bridge_connector->bridge_dp_audio) {
|
||||
bridge = bridge_connector->bridge_dp_audio;
|
||||
bridge->funcs->dp_audio_shutdown(connector, bridge);
|
||||
bridge->funcs->dp_audio_shutdown(bridge, connector);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ static int drm_bridge_connector_audio_mute_stream(struct drm_connector *connecto
|
|||
if (!bridge->funcs->hdmi_audio_mute_stream)
|
||||
return -ENOTSUPP;
|
||||
|
||||
return bridge->funcs->hdmi_audio_mute_stream(connector, bridge,
|
||||
return bridge->funcs->hdmi_audio_mute_stream(bridge, connector,
|
||||
enable, direction);
|
||||
}
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ static int drm_bridge_connector_audio_mute_stream(struct drm_connector *connecto
|
|||
if (!bridge->funcs->dp_audio_mute_stream)
|
||||
return -ENOTSUPP;
|
||||
|
||||
return bridge->funcs->dp_audio_mute_stream(connector, bridge,
|
||||
return bridge->funcs->dp_audio_mute_stream(bridge, connector,
|
||||
enable, direction);
|
||||
}
|
||||
|
||||
|
|
@ -604,7 +604,7 @@ static int drm_bridge_connector_hdmi_cec_init(struct drm_connector *connector)
|
|||
if (!bridge->funcs->hdmi_cec_init)
|
||||
return 0;
|
||||
|
||||
return bridge->funcs->hdmi_cec_init(connector, bridge);
|
||||
return bridge->funcs->hdmi_cec_init(bridge, connector);
|
||||
}
|
||||
|
||||
static const struct drm_connector_hdmi_cec_funcs drm_bridge_connector_hdmi_cec_funcs = {
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@ static struct msm_dp_audio_private *msm_dp_audio_get_data(struct msm_dp *msm_dp_
|
|||
return container_of(msm_dp_audio, struct msm_dp_audio_private, msm_dp_audio);
|
||||
}
|
||||
|
||||
int msm_dp_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int msm_dp_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *daifmt,
|
||||
struct hdmi_codec_params *params)
|
||||
{
|
||||
|
|
@ -308,8 +308,8 @@ int msm_dp_audio_prepare(struct drm_connector *connector,
|
|||
return rc;
|
||||
}
|
||||
|
||||
void msm_dp_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
void msm_dp_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connecter)
|
||||
{
|
||||
struct msm_dp_audio_private *audio;
|
||||
struct msm_dp *msm_dp_display;
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ struct msm_dp_audio *msm_dp_audio_get(struct platform_device *pdev,
|
|||
*/
|
||||
void msm_dp_audio_put(struct msm_dp_audio *msm_dp_audio);
|
||||
|
||||
int msm_dp_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int msm_dp_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *daifmt,
|
||||
struct hdmi_codec_params *params);
|
||||
void msm_dp_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
void msm_dp_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
#endif /* _DP_AUDIO_H_ */
|
||||
|
||||
|
|
|
|||
|
|
@ -200,12 +200,12 @@ struct hdmi_codec_daifmt;
|
|||
struct hdmi_codec_params;
|
||||
|
||||
int msm_hdmi_audio_update(struct hdmi *hdmi);
|
||||
int msm_hdmi_bridge_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int msm_hdmi_bridge_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *daifmt,
|
||||
struct hdmi_codec_params *params);
|
||||
void msm_hdmi_bridge_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
void msm_hdmi_bridge_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
/*
|
||||
* hdmi bridge:
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ int msm_hdmi_audio_update(struct hdmi *hdmi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int msm_hdmi_bridge_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int msm_hdmi_bridge_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *daifmt,
|
||||
struct hdmi_codec_params *params)
|
||||
{
|
||||
|
|
@ -163,8 +163,8 @@ int msm_hdmi_bridge_audio_prepare(struct drm_connector *connector,
|
|||
return msm_hdmi_audio_update(hdmi);
|
||||
}
|
||||
|
||||
void msm_hdmi_bridge_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
void msm_hdmi_bridge_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
|
||||
struct hdmi *hdmi = hdmi_bridge->hdmi;
|
||||
|
|
|
|||
|
|
@ -743,8 +743,8 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cdn_dp_audio_prepare(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
static int cdn_dp_audio_prepare(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *daifmt,
|
||||
struct hdmi_codec_params *params)
|
||||
{
|
||||
|
|
@ -784,8 +784,8 @@ static int cdn_dp_audio_prepare(struct drm_connector *connector,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void cdn_dp_audio_shutdown(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge)
|
||||
static void cdn_dp_audio_shutdown(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct cdn_dp_device *dp = bridge_to_dp(bridge);
|
||||
int ret;
|
||||
|
|
@ -801,8 +801,8 @@ static void cdn_dp_audio_shutdown(struct drm_connector *connector,
|
|||
mutex_unlock(&dp->lock);
|
||||
}
|
||||
|
||||
static int cdn_dp_audio_mute_stream(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
static int cdn_dp_audio_mute_stream(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
bool enable, int direction)
|
||||
{
|
||||
struct cdn_dp_device *dp = bridge_to_dp(bridge);
|
||||
|
|
|
|||
|
|
@ -817,8 +817,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*hdmi_audio_startup)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
int (*hdmi_audio_startup)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
/**
|
||||
* @hdmi_audio_prepare:
|
||||
|
|
@ -831,8 +831,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*hdmi_audio_prepare)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int (*hdmi_audio_prepare)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms);
|
||||
|
||||
|
|
@ -847,8 +847,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
void (*hdmi_audio_shutdown)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
void (*hdmi_audio_shutdown)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
/**
|
||||
* @hdmi_audio_mute_stream:
|
||||
|
|
@ -861,12 +861,12 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*hdmi_audio_mute_stream)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int (*hdmi_audio_mute_stream)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
bool enable, int direction);
|
||||
|
||||
int (*hdmi_cec_init)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
int (*hdmi_cec_init)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
int (*hdmi_cec_enable)(struct drm_bridge *bridge, bool enable);
|
||||
|
||||
|
|
@ -886,8 +886,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*dp_audio_startup)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
int (*dp_audio_startup)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
/**
|
||||
* @dp_audio_prepare:
|
||||
|
|
@ -900,8 +900,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*dp_audio_prepare)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int (*dp_audio_prepare)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
struct hdmi_codec_daifmt *fmt,
|
||||
struct hdmi_codec_params *hparms);
|
||||
|
||||
|
|
@ -916,8 +916,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
void (*dp_audio_shutdown)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge);
|
||||
void (*dp_audio_shutdown)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector);
|
||||
|
||||
/**
|
||||
* @dp_audio_mute_stream:
|
||||
|
|
@ -930,8 +930,8 @@ struct drm_bridge_funcs {
|
|||
* Returns:
|
||||
* 0 on success, a negative error code otherwise
|
||||
*/
|
||||
int (*dp_audio_mute_stream)(struct drm_connector *connector,
|
||||
struct drm_bridge *bridge,
|
||||
int (*dp_audio_mute_stream)(struct drm_bridge *bridge,
|
||||
struct drm_connector *connector,
|
||||
bool enable, int direction);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user