From: Neil Armstrong <narmstrong@baylibre.com> To: Algea Cao <algea.cao@rock-chips.com>, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: yang.zheng@rock-chips.com, kever.yang@rock-chips.com Subject: Re: [PATCH v2 2/7] drm/rockchip: dw_hdmi: add device type Date: Tue, 3 Oct 2017 11:52:33 +0200 [thread overview] Message-ID: <7133fdf3-afde-f548-06fa-81b0dc170116@baylibre.com> (raw) In-Reply-To: <1506735836-151661-1-git-send-email-algea.cao@rock-chips.com> On 30/09/2017 03:43, Algea Cao wrote: > To determine type of SOC, we add a parameter dev_type. > > Signed-off-by: Algea Cao <algea.cao@rock-chips.com> > --- > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 5 +++++ > include/drm/bridge/dw_hdmi.h | 10 ++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index 719452d..09c77f9 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -46,6 +46,7 @@ struct rockchip_hdmi { > struct regmap *regmap; > struct drm_encoder encoder; > const struct rockchip_hdmi_chip_data *chip_data; > + enum dw_hdmi_devtype dev_type; > struct clk *vpll_clk; > struct clk *grf_clk; > }; > @@ -305,6 +306,7 @@ static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = { > .cur_ctr = rockchip_cur_ctr, > .phy_config = rockchip_phy_config, > .phy_data = &rk3288_chip_data, > + .dev_type = RK3288_HDMI, > }; > > static struct rockchip_hdmi_chip_data rk3399_chip_data = { > @@ -315,6 +317,7 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = { > > static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = { > .mode_valid = dw_hdmi_rockchip_mode_valid, > + .dev_type = RK3328_HDMI, > }; > static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = { > .mode_valid = dw_hdmi_rockchip_mode_valid, > @@ -322,6 +325,7 @@ static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = { > .cur_ctr = rockchip_cur_ctr, > .phy_config = rockchip_phy_config, > .phy_data = &rk3399_chip_data, > + .dev_type = RK3399_HDMI, > }; > > static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = { > @@ -360,6 +364,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master, > plat_data = match->data; > hdmi->dev = &pdev->dev; > hdmi->chip_data = plat_data->phy_data; > + hdmi->dev_type = plat_data->dev_type; > encoder = &hdmi->encoder; > > encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); > diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h > index 182f832..fdb1f0a 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -92,6 +92,15 @@ enum dw_hdmi_phy_type { > DW_HDMI_PHY_VENDOR_PHY = 0xfe, > }; > > +enum dw_hdmi_devtype { > + RK3228_HDMI, > + RK3288_HDMI, > + RK3328_HDMI, > + RK3366_HDMI, > + RK3368_HDMI, > + RK3399_HDMI, > +}; > + > struct dw_hdmi_mpll_config { > unsigned long mpixelclock; > struct { > @@ -124,6 +133,7 @@ struct dw_hdmi_phy_ops { > > struct dw_hdmi_plat_data { > struct regmap *regm; > + enum dw_hdmi_devtype dev_type; Please don't do that, dw-hdmi driver should not have knowledge of the device type, if the vendor PHY reporting is broken, add a way to force phy_type to DW_HDMI_PHY_VENDOR_PHY. Neil > enum drm_mode_status (*mode_valid)(struct drm_connector *connector, > const struct drm_display_mode *mode); > unsigned long input_bus_format; >
WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com> To: Algea Cao <algea.cao@rock-chips.com>, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: yang.zheng@rock-chips.com, kever.yang@rock-chips.com Subject: Re: [PATCH v2 2/7] drm/rockchip: dw_hdmi: add device type Date: Tue, 3 Oct 2017 11:52:33 +0200 [thread overview] Message-ID: <7133fdf3-afde-f548-06fa-81b0dc170116@baylibre.com> (raw) In-Reply-To: <1506735836-151661-1-git-send-email-algea.cao@rock-chips.com> On 30/09/2017 03:43, Algea Cao wrote: > To determine type of SOC, we add a parameter dev_type. > > Signed-off-by: Algea Cao <algea.cao@rock-chips.com> > --- > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 5 +++++ > include/drm/bridge/dw_hdmi.h | 10 ++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index 719452d..09c77f9 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -46,6 +46,7 @@ struct rockchip_hdmi { > struct regmap *regmap; > struct drm_encoder encoder; > const struct rockchip_hdmi_chip_data *chip_data; > + enum dw_hdmi_devtype dev_type; > struct clk *vpll_clk; > struct clk *grf_clk; > }; > @@ -305,6 +306,7 @@ static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = { > .cur_ctr = rockchip_cur_ctr, > .phy_config = rockchip_phy_config, > .phy_data = &rk3288_chip_data, > + .dev_type = RK3288_HDMI, > }; > > static struct rockchip_hdmi_chip_data rk3399_chip_data = { > @@ -315,6 +317,7 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = { > > static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = { > .mode_valid = dw_hdmi_rockchip_mode_valid, > + .dev_type = RK3328_HDMI, > }; > static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = { > .mode_valid = dw_hdmi_rockchip_mode_valid, > @@ -322,6 +325,7 @@ static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = { > .cur_ctr = rockchip_cur_ctr, > .phy_config = rockchip_phy_config, > .phy_data = &rk3399_chip_data, > + .dev_type = RK3399_HDMI, > }; > > static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = { > @@ -360,6 +364,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master, > plat_data = match->data; > hdmi->dev = &pdev->dev; > hdmi->chip_data = plat_data->phy_data; > + hdmi->dev_type = plat_data->dev_type; > encoder = &hdmi->encoder; > > encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); > diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h > index 182f832..fdb1f0a 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -92,6 +92,15 @@ enum dw_hdmi_phy_type { > DW_HDMI_PHY_VENDOR_PHY = 0xfe, > }; > > +enum dw_hdmi_devtype { > + RK3228_HDMI, > + RK3288_HDMI, > + RK3328_HDMI, > + RK3366_HDMI, > + RK3368_HDMI, > + RK3399_HDMI, > +}; > + > struct dw_hdmi_mpll_config { > unsigned long mpixelclock; > struct { > @@ -124,6 +133,7 @@ struct dw_hdmi_phy_ops { > > struct dw_hdmi_plat_data { > struct regmap *regm; > + enum dw_hdmi_devtype dev_type; Please don't do that, dw-hdmi driver should not have knowledge of the device type, if the vendor PHY reporting is broken, add a way to force phy_type to DW_HDMI_PHY_VENDOR_PHY. Neil > enum drm_mode_status (*mode_valid)(struct drm_connector *connector, > const struct drm_display_mode *mode); > unsigned long input_bus_format; > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-10-03 9:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <1506735713-147081-0> 2017-09-30 1:43 ` [PATCH v2 1/7] drm/rockchip: dw_hdmi: update dw_hdmi_rockchip_dt_ids Algea Cao 2017-09-30 1:43 ` [PATCH v2 2/7] drm/rockchip: dw_hdmi: add device type Algea Cao 2017-10-03 9:52 ` Neil Armstrong [this message] 2017-10-03 9:52 ` Neil Armstrong 2017-09-30 1:44 ` [PATCH v2 3/7] drm: bridge: dw-hdmi: change hdmi phy hpd read function to export Algea Cao 2017-09-30 1:44 ` [PATCH v2 4/7] drm/rockchip: dw_hdmi: add inno hdmi phy ops Algea Cao 2017-12-09 17:09 ` Heiko Stuebner 2017-12-09 17:09 ` Heiko Stuebner 2017-09-30 1:45 ` [PATCH v2 5/7] drm/rockchip: dw_hdmi: add hclk_vio Algea Cao 2017-12-10 17:08 ` Heiko Stuebner 2017-12-10 17:08 ` Heiko Stuebner 2017-09-30 1:45 ` [PATCH v2 6/7] drm/rockchip: dw_hdmi: update dw-hdmi encoder enable Algea Cao 2017-09-30 1:46 ` [PATCH v2 7/7] drm: bridge: dw-hdmi: get phy ops by device type Algea Cao
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=7133fdf3-afde-f548-06fa-81b0dc170116@baylibre.com \ --to=narmstrong@baylibre.com \ --cc=airlied@linux.ie \ --cc=algea.cao@rock-chips.com \ --cc=daniel.vetter@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=jani.nikula@linux.intel.com \ --cc=kever.yang@rock-chips.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=seanpaul@chromium.org \ --cc=yang.zheng@rock-chips.com \ /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.