Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Yan and committed by
Dmitry Baryshkov
02bb63d1 a6cfa4c8

+77 -77
+8 -8
drivers/gpu/drm/bridge/adv7511/adv7511.h
··· 399 399 } 400 400 401 401 #ifdef CONFIG_DRM_I2C_ADV7511_CEC 402 - int adv7511_cec_init(struct drm_connector *connector, 403 - struct drm_bridge *bridge); 402 + int adv7511_cec_init(struct drm_bridge *bridge, 403 + struct drm_connector *connector); 404 404 int adv7511_cec_enable(struct drm_bridge *bridge, bool enable); 405 405 int adv7511_cec_log_addr(struct drm_bridge *bridge, u8 addr); 406 406 int adv7511_cec_transmit(struct drm_bridge *bridge, u8 attempts, ··· 424 424 int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv); 425 425 426 426 #ifdef CONFIG_DRM_I2C_ADV7511_AUDIO 427 - int adv7511_hdmi_audio_startup(struct drm_connector *connector, 428 - struct drm_bridge *bridge); 429 - void adv7511_hdmi_audio_shutdown(struct drm_connector *connector, 430 - struct drm_bridge *bridge); 431 - int adv7511_hdmi_audio_prepare(struct drm_connector *connector, 432 - struct drm_bridge *bridge, 427 + int adv7511_hdmi_audio_startup(struct drm_bridge *bridge, 428 + struct drm_connector *connector); 429 + void adv7511_hdmi_audio_shutdown(struct drm_bridge *bridge, 430 + struct drm_connector *connector); 431 + int adv7511_hdmi_audio_prepare(struct drm_bridge *bridge, 432 + struct drm_connector *connector, 433 433 struct hdmi_codec_daifmt *fmt, 434 434 struct hdmi_codec_params *hparms); 435 435 #else /*CONFIG_DRM_I2C_ADV7511_AUDIO */
+6 -6
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
··· 55 55 return 0; 56 56 } 57 57 58 - int adv7511_hdmi_audio_prepare(struct drm_connector *connector, 59 - struct drm_bridge *bridge, 58 + int adv7511_hdmi_audio_prepare(struct drm_bridge *bridge, 59 + struct drm_connector *connector, 60 60 struct hdmi_codec_daifmt *fmt, 61 61 struct hdmi_codec_params *hparms) 62 62 { ··· 168 168 return 0; 169 169 } 170 170 171 - int adv7511_hdmi_audio_startup(struct drm_connector *connector, 172 - struct drm_bridge *bridge) 171 + int adv7511_hdmi_audio_startup(struct drm_bridge *bridge, 172 + struct drm_connector *connector) 173 173 { 174 174 struct adv7511 *adv7511 = bridge_to_adv7511(bridge); 175 175 ··· 206 206 return 0; 207 207 } 208 208 209 - void adv7511_hdmi_audio_shutdown(struct drm_connector *connector, 210 - struct drm_bridge *bridge) 209 + void adv7511_hdmi_audio_shutdown(struct drm_bridge *bridge, 210 + struct drm_connector *connector) 211 211 { 212 212 struct adv7511 *adv7511 = bridge_to_adv7511(bridge); 213 213
+2 -2
drivers/gpu/drm/bridge/adv7511/adv7511_cec.c
··· 346 346 return 0; 347 347 } 348 348 349 - int adv7511_cec_init(struct drm_connector *connector, 350 - struct drm_bridge *bridge) 349 + int adv7511_cec_init(struct drm_bridge *bridge, 350 + struct drm_connector *connector) 351 351 { 352 352 struct adv7511 *adv7511 = bridge_to_adv7511(bridge); 353 353 struct device *dev = &adv7511->i2c_main->dev;
+6 -6
drivers/gpu/drm/bridge/lontium-lt9611.c
··· 936 936 return MODE_OK; 937 937 } 938 938 939 - static int lt9611_hdmi_audio_startup(struct drm_connector *connector, 940 - struct drm_bridge *bridge) 939 + static int lt9611_hdmi_audio_startup(struct drm_bridge *bridge, 940 + struct drm_connector *connector) 941 941 { 942 942 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); 943 943 ··· 952 952 return 0; 953 953 } 954 954 955 - static int lt9611_hdmi_audio_prepare(struct drm_connector *connector, 956 - struct drm_bridge *bridge, 955 + static int lt9611_hdmi_audio_prepare(struct drm_bridge *bridge, 956 + struct drm_connector *connector, 957 957 struct hdmi_codec_daifmt *fmt, 958 958 struct hdmi_codec_params *hparms) 959 959 { ··· 974 974 &hparms->cea); 975 975 } 976 976 977 - static void lt9611_hdmi_audio_shutdown(struct drm_connector *connector, 978 - struct drm_bridge *bridge) 977 + static void lt9611_hdmi_audio_shutdown(struct drm_bridge *bridge, 978 + struct drm_connector *connector) 979 979 { 980 980 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); 981 981
+6 -6
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
··· 440 440 dw_hdmi_qp_set_cts_n(hdmi, cts, n); 441 441 } 442 442 443 - static int dw_hdmi_qp_audio_enable(struct drm_connector *connector, 444 - struct drm_bridge *bridge) 443 + static int dw_hdmi_qp_audio_enable(struct drm_bridge *bridge, 444 + struct drm_connector *connector) 445 445 { 446 446 struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge); 447 447 ··· 451 451 return 0; 452 452 } 453 453 454 - static int dw_hdmi_qp_audio_prepare(struct drm_connector *connector, 455 - struct drm_bridge *bridge, 454 + static int dw_hdmi_qp_audio_prepare(struct drm_bridge *bridge, 455 + struct drm_connector *connector, 456 456 struct hdmi_codec_daifmt *fmt, 457 457 struct hdmi_codec_params *hparms) 458 458 { ··· 497 497 AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE); 498 498 } 499 499 500 - static void dw_hdmi_qp_audio_disable(struct drm_connector *connector, 501 - struct drm_bridge *bridge) 500 + static void dw_hdmi_qp_audio_disable(struct drm_bridge *bridge, 501 + struct drm_connector *connector) 502 502 { 503 503 struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge); 504 504
+9 -9
drivers/gpu/drm/display/drm_bridge_connector.c
··· 463 463 if (!bridge->funcs->hdmi_audio_startup) 464 464 return 0; 465 465 466 - return bridge->funcs->hdmi_audio_startup(connector, bridge); 466 + return bridge->funcs->hdmi_audio_startup(bridge, connector); 467 467 } 468 468 469 469 if (bridge_connector->bridge_dp_audio) { ··· 472 472 if (!bridge->funcs->dp_audio_startup) 473 473 return 0; 474 474 475 - return bridge->funcs->dp_audio_startup(connector, bridge); 475 + return bridge->funcs->dp_audio_startup(bridge, connector); 476 476 } 477 477 478 478 return -EINVAL; ··· 489 489 if (bridge_connector->bridge_hdmi_audio) { 490 490 bridge = bridge_connector->bridge_hdmi_audio; 491 491 492 - return bridge->funcs->hdmi_audio_prepare(connector, bridge, fmt, hparms); 492 + return bridge->funcs->hdmi_audio_prepare(bridge, connector, fmt, hparms); 493 493 } 494 494 495 495 if (bridge_connector->bridge_dp_audio) { 496 496 bridge = bridge_connector->bridge_dp_audio; 497 497 498 - return bridge->funcs->dp_audio_prepare(connector, bridge, fmt, hparms); 498 + return bridge->funcs->dp_audio_prepare(bridge, connector, fmt, hparms); 499 499 } 500 500 501 501 return -EINVAL; ··· 509 509 510 510 if (bridge_connector->bridge_hdmi_audio) { 511 511 bridge = bridge_connector->bridge_hdmi_audio; 512 - bridge->funcs->hdmi_audio_shutdown(connector, bridge); 512 + bridge->funcs->hdmi_audio_shutdown(bridge, connector); 513 513 } 514 514 515 515 if (bridge_connector->bridge_dp_audio) { 516 516 bridge = bridge_connector->bridge_dp_audio; 517 - bridge->funcs->dp_audio_shutdown(connector, bridge); 517 + bridge->funcs->dp_audio_shutdown(bridge, connector); 518 518 } 519 519 } 520 520 ··· 531 531 if (!bridge->funcs->hdmi_audio_mute_stream) 532 532 return -ENOTSUPP; 533 533 534 - return bridge->funcs->hdmi_audio_mute_stream(connector, bridge, 534 + return bridge->funcs->hdmi_audio_mute_stream(bridge, connector, 535 535 enable, direction); 536 536 } 537 537 ··· 541 541 if (!bridge->funcs->dp_audio_mute_stream) 542 542 return -ENOTSUPP; 543 543 544 - return bridge->funcs->dp_audio_mute_stream(connector, bridge, 544 + return bridge->funcs->dp_audio_mute_stream(bridge, connector, 545 545 enable, direction); 546 546 } 547 547 ··· 604 604 if (!bridge->funcs->hdmi_cec_init) 605 605 return 0; 606 606 607 - return bridge->funcs->hdmi_cec_init(connector, bridge); 607 + return bridge->funcs->hdmi_cec_init(bridge, connector); 608 608 } 609 609 610 610 static const struct drm_connector_hdmi_cec_funcs drm_bridge_connector_hdmi_cec_funcs = {
+4 -4
drivers/gpu/drm/msm/dp/dp_audio.c
··· 265 265 return container_of(msm_dp_audio, struct msm_dp_audio_private, msm_dp_audio); 266 266 } 267 267 268 - int msm_dp_audio_prepare(struct drm_connector *connector, 269 - struct drm_bridge *bridge, 268 + int msm_dp_audio_prepare(struct drm_bridge *bridge, 269 + struct drm_connector *connector, 270 270 struct hdmi_codec_daifmt *daifmt, 271 271 struct hdmi_codec_params *params) 272 272 { ··· 308 308 return rc; 309 309 } 310 310 311 - void msm_dp_audio_shutdown(struct drm_connector *connector, 312 - struct drm_bridge *bridge) 311 + void msm_dp_audio_shutdown(struct drm_bridge *bridge, 312 + struct drm_connector *connecter) 313 313 { 314 314 struct msm_dp_audio_private *audio; 315 315 struct msm_dp *msm_dp_display;
+4 -4
drivers/gpu/drm/msm/dp/dp_audio.h
··· 45 45 */ 46 46 void msm_dp_audio_put(struct msm_dp_audio *msm_dp_audio); 47 47 48 - int msm_dp_audio_prepare(struct drm_connector *connector, 49 - struct drm_bridge *bridge, 48 + int msm_dp_audio_prepare(struct drm_bridge *bridge, 49 + struct drm_connector *connector, 50 50 struct hdmi_codec_daifmt *daifmt, 51 51 struct hdmi_codec_params *params); 52 - void msm_dp_audio_shutdown(struct drm_connector *connector, 53 - struct drm_bridge *bridge); 52 + void msm_dp_audio_shutdown(struct drm_bridge *bridge, 53 + struct drm_connector *connector); 54 54 55 55 #endif /* _DP_AUDIO_H_ */ 56 56
+4 -4
drivers/gpu/drm/msm/hdmi/hdmi.h
··· 200 200 struct hdmi_codec_params; 201 201 202 202 int msm_hdmi_audio_update(struct hdmi *hdmi); 203 - int msm_hdmi_bridge_audio_prepare(struct drm_connector *connector, 204 - struct drm_bridge *bridge, 203 + int msm_hdmi_bridge_audio_prepare(struct drm_bridge *bridge, 204 + struct drm_connector *connector, 205 205 struct hdmi_codec_daifmt *daifmt, 206 206 struct hdmi_codec_params *params); 207 - void msm_hdmi_bridge_audio_shutdown(struct drm_connector *connector, 208 - struct drm_bridge *bridge); 207 + void msm_hdmi_bridge_audio_shutdown(struct drm_bridge *bridge, 208 + struct drm_connector *connector); 209 209 210 210 /* 211 211 * hdmi bridge:
+4 -4
drivers/gpu/drm/msm/hdmi/hdmi_audio.c
··· 122 122 return 0; 123 123 } 124 124 125 - int msm_hdmi_bridge_audio_prepare(struct drm_connector *connector, 126 - struct drm_bridge *bridge, 125 + int msm_hdmi_bridge_audio_prepare(struct drm_bridge *bridge, 126 + struct drm_connector *connector, 127 127 struct hdmi_codec_daifmt *daifmt, 128 128 struct hdmi_codec_params *params) 129 129 { ··· 163 163 return msm_hdmi_audio_update(hdmi); 164 164 } 165 165 166 - void msm_hdmi_bridge_audio_shutdown(struct drm_connector *connector, 167 - struct drm_bridge *bridge) 166 + void msm_hdmi_bridge_audio_shutdown(struct drm_bridge *bridge, 167 + struct drm_connector *connector) 168 168 { 169 169 struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); 170 170 struct hdmi *hdmi = hdmi_bridge->hdmi;
+6 -6
drivers/gpu/drm/rockchip/cdn-dp-core.c
··· 743 743 return 0; 744 744 } 745 745 746 - static int cdn_dp_audio_prepare(struct drm_connector *connector, 747 - struct drm_bridge *bridge, 746 + static int cdn_dp_audio_prepare(struct drm_bridge *bridge, 747 + struct drm_connector *connector, 748 748 struct hdmi_codec_daifmt *daifmt, 749 749 struct hdmi_codec_params *params) 750 750 { ··· 784 784 return ret; 785 785 } 786 786 787 - static void cdn_dp_audio_shutdown(struct drm_connector *connector, 788 - struct drm_bridge *bridge) 787 + static void cdn_dp_audio_shutdown(struct drm_bridge *bridge, 788 + struct drm_connector *connector) 789 789 { 790 790 struct cdn_dp_device *dp = bridge_to_dp(bridge); 791 791 int ret; ··· 801 801 mutex_unlock(&dp->lock); 802 802 } 803 803 804 - static int cdn_dp_audio_mute_stream(struct drm_connector *connector, 805 - struct drm_bridge *bridge, 804 + static int cdn_dp_audio_mute_stream(struct drm_bridge *bridge, 805 + struct drm_connector *connector, 806 806 bool enable, int direction) 807 807 { 808 808 struct cdn_dp_device *dp = bridge_to_dp(bridge);
+18 -18
include/drm/drm_bridge.h
··· 817 817 * Returns: 818 818 * 0 on success, a negative error code otherwise 819 819 */ 820 - int (*hdmi_audio_startup)(struct drm_connector *connector, 821 - struct drm_bridge *bridge); 820 + int (*hdmi_audio_startup)(struct drm_bridge *bridge, 821 + struct drm_connector *connector); 822 822 823 823 /** 824 824 * @hdmi_audio_prepare: ··· 831 831 * Returns: 832 832 * 0 on success, a negative error code otherwise 833 833 */ 834 - int (*hdmi_audio_prepare)(struct drm_connector *connector, 835 - struct drm_bridge *bridge, 834 + int (*hdmi_audio_prepare)(struct drm_bridge *bridge, 835 + struct drm_connector *connector, 836 836 struct hdmi_codec_daifmt *fmt, 837 837 struct hdmi_codec_params *hparms); 838 838 ··· 847 847 * Returns: 848 848 * 0 on success, a negative error code otherwise 849 849 */ 850 - void (*hdmi_audio_shutdown)(struct drm_connector *connector, 851 - struct drm_bridge *bridge); 850 + void (*hdmi_audio_shutdown)(struct drm_bridge *bridge, 851 + struct drm_connector *connector); 852 852 853 853 /** 854 854 * @hdmi_audio_mute_stream: ··· 861 861 * Returns: 862 862 * 0 on success, a negative error code otherwise 863 863 */ 864 - int (*hdmi_audio_mute_stream)(struct drm_connector *connector, 865 - struct drm_bridge *bridge, 864 + int (*hdmi_audio_mute_stream)(struct drm_bridge *bridge, 865 + struct drm_connector *connector, 866 866 bool enable, int direction); 867 867 868 - int (*hdmi_cec_init)(struct drm_connector *connector, 869 - struct drm_bridge *bridge); 868 + int (*hdmi_cec_init)(struct drm_bridge *bridge, 869 + struct drm_connector *connector); 870 870 871 871 int (*hdmi_cec_enable)(struct drm_bridge *bridge, bool enable); 872 872 ··· 886 886 * Returns: 887 887 * 0 on success, a negative error code otherwise 888 888 */ 889 - int (*dp_audio_startup)(struct drm_connector *connector, 890 - struct drm_bridge *bridge); 889 + int (*dp_audio_startup)(struct drm_bridge *bridge, 890 + struct drm_connector *connector); 891 891 892 892 /** 893 893 * @dp_audio_prepare: ··· 900 900 * Returns: 901 901 * 0 on success, a negative error code otherwise 902 902 */ 903 - int (*dp_audio_prepare)(struct drm_connector *connector, 904 - struct drm_bridge *bridge, 903 + int (*dp_audio_prepare)(struct drm_bridge *bridge, 904 + struct drm_connector *connector, 905 905 struct hdmi_codec_daifmt *fmt, 906 906 struct hdmi_codec_params *hparms); 907 907 ··· 916 916 * Returns: 917 917 * 0 on success, a negative error code otherwise 918 918 */ 919 - void (*dp_audio_shutdown)(struct drm_connector *connector, 920 - struct drm_bridge *bridge); 919 + void (*dp_audio_shutdown)(struct drm_bridge *bridge, 920 + struct drm_connector *connector); 921 921 922 922 /** 923 923 * @dp_audio_mute_stream: ··· 930 930 * Returns: 931 931 * 0 on success, a negative error code otherwise 932 932 */ 933 - int (*dp_audio_mute_stream)(struct drm_connector *connector, 934 - struct drm_bridge *bridge, 933 + int (*dp_audio_mute_stream)(struct drm_bridge *bridge, 934 + struct drm_connector *connector, 935 935 bool enable, int direction); 936 936 937 937 /**