Skip to content

Commit

Permalink
drm/msm/dp: drop dp_parser
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Dmitry Baryshkov committed Feb 11, 2024
1 parent b3b1d12 commit 6215f15
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 115 deletions.
1 change: 0 additions & 1 deletion drivers/gpu/drm/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ msm-$(CONFIG_DRM_MSM_DP)+= dp/dp_aux.o \
dp/dp_drm.o \
dp/dp_link.o \
dp/dp_panel.o \
dp/dp_parser.o \
dp/dp_audio.o

msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/msm/dp/dp_aux.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void dp_aux_init(struct drm_dp_aux *dp_aux);
void dp_aux_deinit(struct drm_dp_aux *dp_aux);
void dp_aux_reconfig(struct drm_dp_aux *dp_aux);

struct phy;
struct drm_dp_aux *dp_aux_get(struct device *dev, struct dp_catalog *catalog,
struct phy *phy,
bool is_edp);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/msm/dp/dp_catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <drm/drm_modes.h>

#include "dp_parser.h"
#include "disp/msm_disp_snapshot.h"

/* interrupts */
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/msm/dp/dp_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
#include "dp_aux.h"
#include "dp_panel.h"
#include "dp_link.h"
#include "dp_parser.h"
#include "dp_catalog.h"

struct dp_ctrl {
atomic_t aborted;
bool wide_bus_en;
};

struct phy;

int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl);
int dp_ctrl_on_stream(struct dp_ctrl *dp_ctrl, bool force_link_train);
void dp_ctrl_off_link_stream(struct dp_ctrl *dp_ctrl);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/msm/dp/dp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_file.h>

#include "dp_parser.h"
#include "dp_catalog.h"
#include "dp_aux.h"
#include "dp_ctrl.h"
Expand Down
18 changes: 7 additions & 11 deletions drivers/gpu/drm/msm/dp/dp_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#include <linux/debugfs.h>
#include <linux/component.h>
#include <linux/of_irq.h>
#include <linux/phy/phy.h>
#include <linux/delay.h>
#include <drm/display/drm_dp_aux_bus.h>
#include <drm/drm_edid.h>

#include "msm_drv.h"
#include "msm_kms.h"
#include "dp_parser.h"
#include "dp_ctrl.h"
#include "dp_catalog.h"
#include "dp_aux.h"
Expand Down Expand Up @@ -88,7 +88,6 @@ struct dp_display_private {
struct drm_device *drm_dev;
struct dentry *root;

struct dp_parser *parser;
struct dp_catalog *catalog;
struct drm_dp_aux *aux;
struct dp_link *link;
Expand Down Expand Up @@ -705,14 +704,11 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
struct dp_panel_in panel_in = {
.dev = dev,
};
struct phy *phy;

dp->parser = dp_parser_get(dp->dp_display.pdev);
if (IS_ERR(dp->parser)) {
rc = PTR_ERR(dp->parser);
DRM_ERROR("failed to initialize parser, rc = %d\n", rc);
dp->parser = NULL;
goto error;
}
phy = devm_phy_get(dev, "dp");
if (IS_ERR(phy))
return PTR_ERR(phy);

dp->catalog = dp_catalog_get(dev);
if (IS_ERR(dp->catalog)) {
Expand All @@ -723,7 +719,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
}

dp->aux = dp_aux_get(dev, dp->catalog,
dp->parser->phy,
phy,
dp->dp_display.is_edp);
if (IS_ERR(dp->aux)) {
rc = PTR_ERR(dp->aux);
Expand Down Expand Up @@ -754,7 +750,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)

dp->ctrl = dp_ctrl_get(dev, dp->link, dp->panel, dp->aux,
dp->catalog,
dp->parser->phy);
phy);
if (IS_ERR(dp->ctrl)) {
rc = PTR_ERR(dp->ctrl);
DRM_ERROR("failed to initialize ctrl, rc = %d\n", rc);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/msm/dp/dp_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <sound/hdmi-codec.h>
#include "disp/msm_disp_snapshot.h"

#define DP_MAX_PIXEL_CLK_KHZ 675000

struct msm_dp {
struct drm_device *drm_dev;
struct platform_device *pdev;
Expand Down
61 changes: 0 additions & 61 deletions drivers/gpu/drm/msm/dp/dp_parser.c

This file was deleted.

39 changes: 0 additions & 39 deletions drivers/gpu/drm/msm/dp/dp_parser.h

This file was deleted.

0 comments on commit 6215f15

Please sign in to comment.