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/msm/dp: remove PHY handling from dp_catalog.c

Inline dp_catalog_aux_update_cfg() and call phy_calibrate() from dp_aux
functions directly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/576106/
Link: https://lore.kernel.org/r/20240126-dp-power-parser-cleanup-v3-10-098d5f581dd3@linaro.org

+11 -16
+7 -2
drivers/gpu/drm/msm/dp/dp_aux.c
··· 4 4 */ 5 5 6 6 #include <linux/delay.h> 7 + #include <linux/phy/phy.h> 7 8 #include <drm/drm_print.h> 8 9 9 10 #include "dp_reg.h" ··· 23 22 struct dp_aux_private { 24 23 struct device *dev; 25 24 struct dp_catalog *catalog; 25 + 26 + struct phy *phy; 26 27 27 28 struct mutex mutex; 28 29 struct completion comp; ··· 339 336 if (aux->native) { 340 337 aux->retry_cnt++; 341 338 if (!(aux->retry_cnt % MAX_AUX_RETRIES)) 342 - dp_catalog_aux_update_cfg(aux->catalog); 339 + phy_calibrate(aux->phy); 343 340 } 344 341 /* reset aux if link is in connected state */ 345 342 if (dp_catalog_link_is_connected(aux->catalog)) ··· 442 439 443 440 aux = container_of(dp_aux, struct dp_aux_private, dp_aux); 444 441 445 - dp_catalog_aux_update_cfg(aux->catalog); 442 + phy_calibrate(aux->phy); 446 443 dp_catalog_aux_reset(aux->catalog); 447 444 } 448 445 ··· 520 517 } 521 518 522 519 struct drm_dp_aux *dp_aux_get(struct device *dev, struct dp_catalog *catalog, 520 + struct phy *phy, 523 521 bool is_edp) 524 522 { 525 523 struct dp_aux_private *aux; ··· 541 537 542 538 aux->dev = dev; 543 539 aux->catalog = catalog; 540 + aux->phy = phy; 544 541 aux->retry_cnt = 0; 545 542 546 543 /*
+1
drivers/gpu/drm/msm/dp/dp_aux.h
··· 17 17 void dp_aux_reconfig(struct drm_dp_aux *dp_aux); 18 18 19 19 struct drm_dp_aux *dp_aux_get(struct device *dev, struct dp_catalog *catalog, 20 + struct phy *phy, 20 21 bool is_edp); 21 22 void dp_aux_put(struct drm_dp_aux *aux); 22 23
-12
drivers/gpu/drm/msm/dp/dp_catalog.c
··· 7 7 8 8 #include <linux/delay.h> 9 9 #include <linux/iopoll.h> 10 - #include <linux/phy/phy.h> 11 - #include <linux/phy/phy-dp.h> 12 10 #include <linux/rational.h> 13 11 #include <drm/display/drm_dp_helper.h> 14 12 #include <drm/drm_print.h> ··· 239 241 } 240 242 241 243 dp_write_aux(catalog, REG_DP_AUX_CTRL, aux_ctrl); 242 - } 243 - 244 - void dp_catalog_aux_update_cfg(struct dp_catalog *dp_catalog) 245 - { 246 - struct dp_catalog_private *catalog = container_of(dp_catalog, 247 - struct dp_catalog_private, dp_catalog); 248 - struct dp_io *dp_io = catalog->io; 249 - struct phy *phy = dp_io->phy; 250 - 251 - phy_calibrate(phy); 252 244 } 253 245 254 246 int dp_catalog_aux_wait_for_hpd_connect_state(struct dp_catalog *dp_catalog)
-1
drivers/gpu/drm/msm/dp/dp_catalog.h
··· 84 84 int dp_catalog_aux_clear_hw_interrupts(struct dp_catalog *dp_catalog); 85 85 void dp_catalog_aux_reset(struct dp_catalog *dp_catalog); 86 86 void dp_catalog_aux_enable(struct dp_catalog *dp_catalog, bool enable); 87 - void dp_catalog_aux_update_cfg(struct dp_catalog *dp_catalog); 88 87 int dp_catalog_aux_wait_for_hpd_connect_state(struct dp_catalog *dp_catalog); 89 88 u32 dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog); 90 89
+3 -1
drivers/gpu/drm/msm/dp/dp_display.c
··· 730 730 goto error; 731 731 } 732 732 733 - dp->aux = dp_aux_get(dev, dp->catalog, dp->dp_display.is_edp); 733 + dp->aux = dp_aux_get(dev, dp->catalog, 734 + dp->parser->io.phy, 735 + dp->dp_display.is_edp); 734 736 if (IS_ERR(dp->aux)) { 735 737 rc = PTR_ERR(dp->aux); 736 738 DRM_ERROR("failed to initialize aux, rc = %d\n", rc);