From: abhinavk@codeaurora.org To: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Stephen Boyd <swboyd@chromium.org>, sbillaka@codeaurora.org, Tanmay Shah <tanmay@codeaurora.org>, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, freedreno@lists.freedesktop.org, Chandan Uddaraju <chandanu@codeaurora.org> Subject: Re: [Freedreno] [PATCH 4/4] drm/msm/dp: Add support for SC8180x eDP Date: Fri, 28 May 2021 16:40:32 -0700 [thread overview] Message-ID: <a1a8221a44edc3a509bdc1bb89bb5a97@codeaurora.org> (raw) In-Reply-To: <20210511042043.592802-5-bjorn.andersson@linaro.org> On 2021-05-10 21:20, Bjorn Andersson wrote: > The eDP controller found in SC8180x is at large compatible with the > current implementation, but has its register blocks at slightly > different offsets. > > Add the compatible and the new register layout. > I am not able to completely recall the history of why in the DP bindings we added DP register base as a big hunk and let catalog handle the submodule offsets. I guess earlier that made sense because DP sub-block offsets were fixed. But if we plan to re-use the DP driver for eDP as well like this series, then maybe it might be better if this comes from device tree like the earlier version was planning to https://patchwork.kernel.org/project/dri-devel/patch/0101016ec6ddf446-e87ab1ce-5cbf-40a0-a0bb-cd0151cd577a-000000@us-west-2.amazonses.com/ +- reg: Base address and length of DP hardware's memory mapped regions. +- cell-index: Specifies the controller instance. +- reg-names: A list of strings that name the list of regs. + "dp_ahb" - DP controller memory region. + "dp_aux" - DP AUX memory region. + "dp_link" - DP link layer memory region. + "dp_p0" - DP pixel clock domain memory region. + "dp_phy" - DP PHY memory region. + "dp_ln_tx0" - USB3 DP PHY combo TX-0 lane memory region. + "dp_ln_tx1" - USB3 DP PHY combo TX-1 lane memory region. Now there is more reason to separate the sub-module offsets like ahb/aux/link/p0 > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > drivers/gpu/drm/msm/dp/dp_display.c | 1 + > drivers/gpu/drm/msm/dp/dp_parser.c | 28 ++++++++++++++++++++-------- > 2 files changed, 21 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c > b/drivers/gpu/drm/msm/dp/dp_display.c > index d1319b58e901..0be03bdc882c 100644 > --- a/drivers/gpu/drm/msm/dp/dp_display.c > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > @@ -121,6 +121,7 @@ struct dp_display_private { > > static const struct of_device_id dp_dt_match[] = { > {.compatible = "qcom,sc7180-dp"}, > + { .compatible = "qcom,sc8180x-edp" }, > {} > }; > > diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c > b/drivers/gpu/drm/msm/dp/dp_parser.c > index 51ec85b4803b..47cf18bba4b2 100644 > --- a/drivers/gpu/drm/msm/dp/dp_parser.c > +++ b/drivers/gpu/drm/msm/dp/dp_parser.c > @@ -251,6 +251,7 @@ static int dp_parser_clock(struct dp_parser > *parser) > static int dp_parser_parse(struct dp_parser *parser) > { > struct dss_io_data *io = &parser->io.dp_controller; > + struct device *dev = &parser->pdev->dev; > int rc = 0; > > if (!parser) { > @@ -276,14 +277,25 @@ static int dp_parser_parse(struct dp_parser > *parser) > */ > parser->regulator_cfg = &sdm845_dp_reg_cfg; > > - io->ahb = io->base + 0x0; > - io->ahb_len = 0x200; > - io->aux = io->base + 0x200; > - io->aux_len = 0x200; > - io->link = io->base + 0x400; > - io->link_len = 0x600; > - io->p0 = io->base + 0x1000; > - io->p0_len = 0x400; > + if (of_device_is_compatible(dev->of_node, "qcom,sc8180x-edp")) { > + io->ahb = io->base + 0x0; > + io->ahb_len = 0x200; > + io->aux = io->base + 0x200; > + io->aux_len = 0x200; > + io->link = io->base + 0x400; > + io->link_len = 0x600; > + io->p0 = io->base + 0xa00; > + io->p0_len = 0x400; > + } else { > + io->ahb = io->base + 0x0; > + io->ahb_len = 0x200; > + io->aux = io->base + 0x200; > + io->aux_len = 0x200; > + io->link = io->base + 0x400; > + io->link_len = 0x600; > + io->p0 = io->base + 0x1000; > + io->p0_len = 0x400; > + } > > return 0; > }
WARNING: multiple messages have this Message-ID (diff)
From: abhinavk@codeaurora.org To: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: freedreno@lists.freedesktop.org, David Airlie <airlied@linux.ie>, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Tanmay Shah <tanmay@codeaurora.org>, Stephen Boyd <swboyd@chromium.org>, dri-devel@lists.freedesktop.org, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, sbillaka@codeaurora.org, Sean Paul <sean@poorly.run>, Chandan Uddaraju <chandanu@codeaurora.org> Subject: Re: [Freedreno] [PATCH 4/4] drm/msm/dp: Add support for SC8180x eDP Date: Fri, 28 May 2021 16:40:32 -0700 [thread overview] Message-ID: <a1a8221a44edc3a509bdc1bb89bb5a97@codeaurora.org> (raw) In-Reply-To: <20210511042043.592802-5-bjorn.andersson@linaro.org> On 2021-05-10 21:20, Bjorn Andersson wrote: > The eDP controller found in SC8180x is at large compatible with the > current implementation, but has its register blocks at slightly > different offsets. > > Add the compatible and the new register layout. > I am not able to completely recall the history of why in the DP bindings we added DP register base as a big hunk and let catalog handle the submodule offsets. I guess earlier that made sense because DP sub-block offsets were fixed. But if we plan to re-use the DP driver for eDP as well like this series, then maybe it might be better if this comes from device tree like the earlier version was planning to https://patchwork.kernel.org/project/dri-devel/patch/0101016ec6ddf446-e87ab1ce-5cbf-40a0-a0bb-cd0151cd577a-000000@us-west-2.amazonses.com/ +- reg: Base address and length of DP hardware's memory mapped regions. +- cell-index: Specifies the controller instance. +- reg-names: A list of strings that name the list of regs. + "dp_ahb" - DP controller memory region. + "dp_aux" - DP AUX memory region. + "dp_link" - DP link layer memory region. + "dp_p0" - DP pixel clock domain memory region. + "dp_phy" - DP PHY memory region. + "dp_ln_tx0" - USB3 DP PHY combo TX-0 lane memory region. + "dp_ln_tx1" - USB3 DP PHY combo TX-1 lane memory region. Now there is more reason to separate the sub-module offsets like ahb/aux/link/p0 > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > drivers/gpu/drm/msm/dp/dp_display.c | 1 + > drivers/gpu/drm/msm/dp/dp_parser.c | 28 ++++++++++++++++++++-------- > 2 files changed, 21 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c > b/drivers/gpu/drm/msm/dp/dp_display.c > index d1319b58e901..0be03bdc882c 100644 > --- a/drivers/gpu/drm/msm/dp/dp_display.c > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > @@ -121,6 +121,7 @@ struct dp_display_private { > > static const struct of_device_id dp_dt_match[] = { > {.compatible = "qcom,sc7180-dp"}, > + { .compatible = "qcom,sc8180x-edp" }, > {} > }; > > diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c > b/drivers/gpu/drm/msm/dp/dp_parser.c > index 51ec85b4803b..47cf18bba4b2 100644 > --- a/drivers/gpu/drm/msm/dp/dp_parser.c > +++ b/drivers/gpu/drm/msm/dp/dp_parser.c > @@ -251,6 +251,7 @@ static int dp_parser_clock(struct dp_parser > *parser) > static int dp_parser_parse(struct dp_parser *parser) > { > struct dss_io_data *io = &parser->io.dp_controller; > + struct device *dev = &parser->pdev->dev; > int rc = 0; > > if (!parser) { > @@ -276,14 +277,25 @@ static int dp_parser_parse(struct dp_parser > *parser) > */ > parser->regulator_cfg = &sdm845_dp_reg_cfg; > > - io->ahb = io->base + 0x0; > - io->ahb_len = 0x200; > - io->aux = io->base + 0x200; > - io->aux_len = 0x200; > - io->link = io->base + 0x400; > - io->link_len = 0x600; > - io->p0 = io->base + 0x1000; > - io->p0_len = 0x400; > + if (of_device_is_compatible(dev->of_node, "qcom,sc8180x-edp")) { > + io->ahb = io->base + 0x0; > + io->ahb_len = 0x200; > + io->aux = io->base + 0x200; > + io->aux_len = 0x200; > + io->link = io->base + 0x400; > + io->link_len = 0x600; > + io->p0 = io->base + 0xa00; > + io->p0_len = 0x400; > + } else { > + io->ahb = io->base + 0x0; > + io->ahb_len = 0x200; > + io->aux = io->base + 0x200; > + io->aux_len = 0x200; > + io->link = io->base + 0x400; > + io->link_len = 0x600; > + io->p0 = io->base + 0x1000; > + io->p0_len = 0x400; > + } > > return 0; > }
next prev parent reply other threads:[~2021-05-28 23:40 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-11 4:20 [PATCH 0/4] drm/msm/dp: Add support for SC8180x eDP controller Bjorn Andersson 2021-05-11 4:20 ` Bjorn Andersson 2021-05-11 4:20 ` [PATCH 1/4] drm/msm/dp: Simplify the mvid/nvid calculation Bjorn Andersson 2021-05-11 4:20 ` Bjorn Andersson 2021-05-28 23:11 ` [Freedreno] " abhinavk 2021-05-28 23:11 ` abhinavk 2021-06-08 20:13 ` Bjorn Andersson 2021-06-08 20:13 ` Bjorn Andersson 2021-06-09 0:08 ` abhinavk 2021-06-09 0:08 ` abhinavk 2021-05-11 4:20 ` [PATCH 2/4] drm/msm/dp: Store each subblock in the io region Bjorn Andersson 2021-05-11 4:20 ` Bjorn Andersson 2021-05-28 23:14 ` [Freedreno] " abhinavk 2021-05-28 23:14 ` abhinavk 2021-05-11 4:20 ` [PATCH 3/4] drm/msm/dp: Initialize the INTF_CONFIG register Bjorn Andersson 2021-05-11 4:20 ` Bjorn Andersson 2021-05-28 23:28 ` [Freedreno] " abhinavk 2021-05-28 23:28 ` abhinavk 2021-05-11 4:20 ` [PATCH 4/4] drm/msm/dp: Add support for SC8180x eDP Bjorn Andersson 2021-05-11 4:20 ` Bjorn Andersson 2021-05-28 23:40 ` abhinavk [this message] 2021-05-28 23:40 ` [Freedreno] " abhinavk 2021-05-29 17:09 ` Bjorn Andersson 2021-05-29 17:09 ` Bjorn Andersson 2021-06-04 21:56 ` Stephen Boyd 2021-06-04 21:56 ` Stephen Boyd 2021-05-19 3:41 ` [Freedreno] [PATCH 0/4] drm/msm/dp: Add support for SC8180x eDP controller abhinavk 2021-05-19 3:41 ` abhinavk 2021-05-19 14:51 ` Bjorn Andersson 2021-05-19 14:51 ` Bjorn Andersson 2021-05-28 22:37 ` abhinavk 2021-05-28 22:37 ` abhinavk
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a1a8221a44edc3a509bdc1bb89bb5a97@codeaurora.org \ --to=abhinavk@codeaurora.org \ --cc=airlied@linux.ie \ --cc=bjorn.andersson@linaro.org \ --cc=chandanu@codeaurora.org \ --cc=daniel@ffwll.ch \ --cc=dmitry.baryshkov@linaro.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=freedreno@lists.freedesktop.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=robdclark@gmail.com \ --cc=sbillaka@codeaurora.org \ --cc=sean@poorly.run \ --cc=swboyd@chromium.org \ --cc=tanmay@codeaurora.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.