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: drop dp_parser

Finally drop separate "parsing" submodule. There is no need in it
anymore. All submodules handle DT properties directly rather than
passing them via the separate structure pointer.

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/576116/
Link: https://lore.kernel.org/r/20240126-dp-power-parser-cleanup-v3-15-098d5f581dd3@linaro.org

+12 -115
-1
drivers/gpu/drm/msm/Makefile
··· 127 127 dp/dp_drm.o \ 128 128 dp/dp_link.o \ 129 129 dp/dp_panel.o \ 130 - dp/dp_parser.o \ 131 130 dp/dp_audio.o 132 131 133 132 msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o
+1
drivers/gpu/drm/msm/dp/dp_aux.h
··· 16 16 void dp_aux_deinit(struct drm_dp_aux *dp_aux); 17 17 void dp_aux_reconfig(struct drm_dp_aux *dp_aux); 18 18 19 + struct phy; 19 20 struct drm_dp_aux *dp_aux_get(struct device *dev, struct dp_catalog *catalog, 20 21 struct phy *phy, 21 22 bool is_edp);
-1
drivers/gpu/drm/msm/dp/dp_catalog.h
··· 8 8 9 9 #include <drm/drm_modes.h> 10 10 11 - #include "dp_parser.h" 12 11 #include "disp/msm_disp_snapshot.h" 13 12 14 13 /* interrupts */
+2 -1
drivers/gpu/drm/msm/dp/dp_ctrl.h
··· 9 9 #include "dp_aux.h" 10 10 #include "dp_panel.h" 11 11 #include "dp_link.h" 12 - #include "dp_parser.h" 13 12 #include "dp_catalog.h" 14 13 15 14 struct dp_ctrl { 16 15 atomic_t aborted; 17 16 bool wide_bus_en; 18 17 }; 18 + 19 + struct phy; 19 20 20 21 int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl); 21 22 int dp_ctrl_on_stream(struct dp_ctrl *dp_ctrl, bool force_link_train);
-1
drivers/gpu/drm/msm/dp/dp_debug.c
··· 9 9 #include <drm/drm_connector.h> 10 10 #include <drm/drm_file.h> 11 11 12 - #include "dp_parser.h" 13 12 #include "dp_catalog.h" 14 13 #include "dp_aux.h" 15 14 #include "dp_ctrl.h"
+7 -11
drivers/gpu/drm/msm/dp/dp_display.c
··· 9 9 #include <linux/debugfs.h> 10 10 #include <linux/component.h> 11 11 #include <linux/of_irq.h> 12 + #include <linux/phy/phy.h> 12 13 #include <linux/delay.h> 13 14 #include <drm/display/drm_dp_aux_bus.h> 14 15 #include <drm/drm_edid.h> 15 16 16 17 #include "msm_drv.h" 17 18 #include "msm_kms.h" 18 - #include "dp_parser.h" 19 19 #include "dp_ctrl.h" 20 20 #include "dp_catalog.h" 21 21 #include "dp_aux.h" ··· 88 88 struct drm_device *drm_dev; 89 89 struct dentry *root; 90 90 91 - struct dp_parser *parser; 92 91 struct dp_catalog *catalog; 93 92 struct drm_dp_aux *aux; 94 93 struct dp_link *link; ··· 704 705 struct dp_panel_in panel_in = { 705 706 .dev = dev, 706 707 }; 708 + struct phy *phy; 707 709 708 - dp->parser = dp_parser_get(dp->dp_display.pdev); 709 - if (IS_ERR(dp->parser)) { 710 - rc = PTR_ERR(dp->parser); 711 - DRM_ERROR("failed to initialize parser, rc = %d\n", rc); 712 - dp->parser = NULL; 713 - goto error; 714 - } 710 + phy = devm_phy_get(dev, "dp"); 711 + if (IS_ERR(phy)) 712 + return PTR_ERR(phy); 715 713 716 714 dp->catalog = dp_catalog_get(dev); 717 715 if (IS_ERR(dp->catalog)) { ··· 719 723 } 720 724 721 725 dp->aux = dp_aux_get(dev, dp->catalog, 722 - dp->parser->phy, 726 + phy, 723 727 dp->dp_display.is_edp); 724 728 if (IS_ERR(dp->aux)) { 725 729 rc = PTR_ERR(dp->aux); ··· 750 754 751 755 dp->ctrl = dp_ctrl_get(dev, dp->link, dp->panel, dp->aux, 752 756 dp->catalog, 753 - dp->parser->phy); 757 + phy); 754 758 if (IS_ERR(dp->ctrl)) { 755 759 rc = PTR_ERR(dp->ctrl); 756 760 DRM_ERROR("failed to initialize ctrl, rc = %d\n", rc);
+2
drivers/gpu/drm/msm/dp/dp_display.h
··· 10 10 #include <sound/hdmi-codec.h> 11 11 #include "disp/msm_disp_snapshot.h" 12 12 13 + #define DP_MAX_PIXEL_CLK_KHZ 675000 14 + 13 15 struct msm_dp { 14 16 struct drm_device *drm_dev; 15 17 struct platform_device *pdev;
-61
drivers/gpu/drm/msm/dp/dp_parser.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 4 - */ 5 - 6 - #include <linux/of_gpio.h> 7 - #include <linux/phy/phy.h> 8 - 9 - #include <drm/drm_of.h> 10 - #include <drm/drm_print.h> 11 - #include <drm/drm_bridge.h> 12 - 13 - #include "dp_parser.h" 14 - #include "dp_reg.h" 15 - 16 - static int dp_parser_ctrl_res(struct dp_parser *parser) 17 - { 18 - struct platform_device *pdev = parser->pdev; 19 - 20 - parser->phy = devm_phy_get(&pdev->dev, "dp"); 21 - if (IS_ERR(parser->phy)) 22 - return PTR_ERR(parser->phy); 23 - 24 - return 0; 25 - } 26 - 27 - static int dp_parser_parse(struct dp_parser *parser) 28 - { 29 - int rc = 0; 30 - 31 - if (!parser) { 32 - DRM_ERROR("invalid input\n"); 33 - return -EINVAL; 34 - } 35 - 36 - rc = dp_parser_ctrl_res(parser); 37 - if (rc) 38 - return rc; 39 - 40 - return 0; 41 - } 42 - 43 - struct dp_parser *dp_parser_get(struct platform_device *pdev) 44 - { 45 - struct dp_parser *parser; 46 - int ret; 47 - 48 - parser = devm_kzalloc(&pdev->dev, sizeof(*parser), GFP_KERNEL); 49 - if (!parser) 50 - return ERR_PTR(-ENOMEM); 51 - 52 - parser->pdev = pdev; 53 - 54 - ret = dp_parser_parse(parser); 55 - if (ret) { 56 - dev_err(&pdev->dev, "device tree parsing failed\n"); 57 - return ERR_PTR(ret); 58 - } 59 - 60 - return parser; 61 - }
-39
drivers/gpu/drm/msm/dp/dp_parser.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 4 - */ 5 - 6 - #ifndef _DP_PARSER_H_ 7 - #define _DP_PARSER_H_ 8 - 9 - #include <linux/platform_device.h> 10 - 11 - #include "msm_drv.h" 12 - 13 - #define DP_MAX_PIXEL_CLK_KHZ 675000 14 - 15 - /** 16 - * struct dp_parser - DP parser's data exposed to clients 17 - * 18 - * @pdev: platform data of the client 19 - * @phy: PHY handle 20 - */ 21 - struct dp_parser { 22 - struct platform_device *pdev; 23 - struct phy *phy; 24 - }; 25 - 26 - /** 27 - * dp_parser_get() - get the DP's device tree parser module 28 - * 29 - * @pdev: platform data of the client 30 - * return: pointer to dp_parser structure. 31 - * 32 - * This function provides client capability to parse the 33 - * device tree and populate the data structures. The data 34 - * related to clock, regulators, pin-control and other 35 - * can be parsed using this module. 36 - */ 37 - struct dp_parser *dp_parser_get(struct platform_device *pdev); 38 - 39 - #endif