Re: [PATCH v3 15/15] drm/msm/hdmi: drop old HDMI PHY code

2023-10-26 Thread Konrad Dybcio




On 10/26/23 23:03, Dmitry Baryshkov wrote:

On Fri, 27 Oct 2023 at 00:00, Konrad Dybcio  wrote:




On 9/28/23 13:16, Dmitry Baryshkov wrote:

Drop source files used by old HDMI PHY and HDMI PLL drivers.

Signed-off-by: Dmitry Baryshkov 
---
   drivers/gpu/drm/msm/hdmi/hdmi_phy.c  | 216 ---
   drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c |  51 --
   drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 765 ---
   drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 141 -
   drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c |  44 --
   drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 458 --
   6 files changed, 1675 deletions(-)
   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy.c
   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c

Uh-oh, is the 8996 HDMI phy accounted for somwhere else?


Yes, it is the QMP PHY now.

Right, I realized that as soon as I've seen that you replied :D

Konrad


Re: [PATCH v3 15/15] drm/msm/hdmi: drop old HDMI PHY code

2023-10-26 Thread Dmitry Baryshkov
On Fri, 27 Oct 2023 at 00:00, Konrad Dybcio  wrote:
>
>
>
> On 9/28/23 13:16, Dmitry Baryshkov wrote:
> > Drop source files used by old HDMI PHY and HDMI PLL drivers.
> >
> > Signed-off-by: Dmitry Baryshkov 
> > ---
> >   drivers/gpu/drm/msm/hdmi/hdmi_phy.c  | 216 ---
> >   drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c |  51 --
> >   drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 765 ---
> >   drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 141 -
> >   drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c |  44 --
> >   drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 458 --
> >   6 files changed, 1675 deletions(-)
> >   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy.c
> >   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
> >   delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> Uh-oh, is the 8996 HDMI phy accounted for somwhere else?

Yes, it is the QMP PHY now.


-- 
With best wishes
Dmitry


Re: [PATCH v3 15/15] drm/msm/hdmi: drop old HDMI PHY code

2023-10-26 Thread Konrad Dybcio




On 9/28/23 13:16, Dmitry Baryshkov wrote:

Drop source files used by old HDMI PHY and HDMI PLL drivers.

Signed-off-by: Dmitry Baryshkov 
---
  drivers/gpu/drm/msm/hdmi/hdmi_phy.c  | 216 ---
  drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c |  51 --
  drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 765 ---
  drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 141 -
  drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c |  44 --
  drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 458 --
  6 files changed, 1675 deletions(-)
  delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy.c
  delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
  delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c

Uh-oh, is the 8996 HDMI phy accounted for somwhere else?

Konrad


[PATCH v3 15/15] drm/msm/hdmi: drop old HDMI PHY code

2023-09-28 Thread Dmitry Baryshkov
Drop source files used by old HDMI PHY and HDMI PLL drivers.

Signed-off-by: Dmitry Baryshkov 
---
 drivers/gpu/drm/msm/hdmi/hdmi_phy.c  | 216 ---
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c |  51 --
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 765 ---
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 141 -
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c |  44 --
 drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 458 --
 6 files changed, 1675 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy.c
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c
 delete mode 100644 drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c 
b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
deleted file mode 100644
index 88a3423b7f24..
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
+++ /dev/null
@@ -1,216 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (c) 2016, The Linux Foundation. All rights reserved.
- */
-
-#include 
-#include 
-
-#include "hdmi.h"
-
-static int msm_hdmi_phy_resource_init(struct hdmi_phy *phy)
-{
-   struct hdmi_phy_cfg *cfg = phy->cfg;
-   struct device *dev = >pdev->dev;
-   int i, ret;
-
-   phy->regs = devm_kcalloc(dev, cfg->num_regs, sizeof(phy->regs[0]),
-GFP_KERNEL);
-   if (!phy->regs)
-   return -ENOMEM;
-
-   phy->clks = devm_kcalloc(dev, cfg->num_clks, sizeof(phy->clks[0]),
-GFP_KERNEL);
-   if (!phy->clks)
-   return -ENOMEM;
-
-   for (i = 0; i < cfg->num_regs; i++)
-   phy->regs[i].supply = cfg->reg_names[i];
-
-   ret = devm_regulator_bulk_get(dev, cfg->num_regs, phy->regs);
-   if (ret) {
-   if (ret != -EPROBE_DEFER)
-   DRM_DEV_ERROR(dev, "failed to get phy regulators: 
%d\n", ret);
-
-   return ret;
-   }
-
-   for (i = 0; i < cfg->num_clks; i++) {
-   struct clk *clk;
-
-   clk = msm_clk_get(phy->pdev, cfg->clk_names[i]);
-   if (IS_ERR(clk)) {
-   ret = PTR_ERR(clk);
-   DRM_DEV_ERROR(dev, "failed to get phy clock: %s (%d)\n",
-   cfg->clk_names[i], ret);
-   return ret;
-   }
-
-   phy->clks[i] = clk;
-   }
-
-   return 0;
-}
-
-int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy)
-{
-   struct hdmi_phy_cfg *cfg = phy->cfg;
-   struct device *dev = >pdev->dev;
-   int i, ret = 0;
-
-   pm_runtime_get_sync(dev);
-
-   ret = regulator_bulk_enable(cfg->num_regs, phy->regs);
-   if (ret) {
-   DRM_DEV_ERROR(dev, "failed to enable regulators: (%d)\n", ret);
-   return ret;
-   }
-
-   for (i = 0; i < cfg->num_clks; i++) {
-   ret = clk_prepare_enable(phy->clks[i]);
-   if (ret)
-   DRM_DEV_ERROR(dev, "failed to enable clock: %s (%d)\n",
-   cfg->clk_names[i], ret);
-   }
-
-   return ret;
-}
-
-void msm_hdmi_phy_resource_disable(struct hdmi_phy *phy)
-{
-   struct hdmi_phy_cfg *cfg = phy->cfg;
-   struct device *dev = >pdev->dev;
-   int i;
-
-   for (i = cfg->num_clks - 1; i >= 0; i--)
-   clk_disable_unprepare(phy->clks[i]);
-
-   regulator_bulk_disable(cfg->num_regs, phy->regs);
-
-   pm_runtime_put_sync(dev);
-}
-
-void msm_hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock)
-{
-   if (!phy || !phy->cfg->powerup)
-   return;
-
-   phy->cfg->powerup(phy, pixclock);
-}
-
-void msm_hdmi_phy_powerdown(struct hdmi_phy *phy)
-{
-   if (!phy || !phy->cfg->powerdown)
-   return;
-
-   phy->cfg->powerdown(phy);
-}
-
-static int msm_hdmi_phy_pll_init(struct platform_device *pdev,
-enum hdmi_phy_type type)
-{
-   int ret;
-
-   switch (type) {
-   case MSM_HDMI_PHY_8960:
-   ret = msm_hdmi_pll_8960_init(pdev);
-   break;
-   case MSM_HDMI_PHY_8996:
-   ret = msm_hdmi_pll_8996_init(pdev);
-   break;
-   /*
-* we don't have PLL support for these, don't report an error for now
-*/
-   case MSM_HDMI_PHY_8x60:
-   case MSM_HDMI_PHY_8x74:
-   default:
-   ret = 0;
-   break;
-   }
-
-   return ret;
-}
-
-static int msm_hdmi_phy_probe(struct platform_device *pdev)
-{
-   struct device *dev = >dev;
-   struct hdmi_phy *phy;
-   int ret;
-
-   phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
-   if (!phy)
-   return -ENODEV;
-
-   phy->cfg = (struct hdmi_phy_cfg