Re: [Freedreno] [PATCH v6 16/24] drm: sti: Provide ddc symlink in hdmi connector sysfs directory
Le ven. 26 juil. 2019 à 19:27, Andrzej Pietrasiewicz a écrit : > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Benjamin Gaignard > --- > drivers/gpu/drm/sti/sti_hdmi.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c > index f03d617edc4c..33d06e0a9168 100644 > --- a/drivers/gpu/drm/sti/sti_hdmi.c > +++ b/drivers/gpu/drm/sti/sti_hdmi.c > @@ -1284,8 +1284,10 @@ static int sti_hdmi_bind(struct device *dev, struct > device *master, void *data) > > drm_connector->polled = DRM_CONNECTOR_POLL_HPD; > > - drm_connector_init(drm_dev, drm_connector, > - _hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA); > + drm_connector_init_with_ddc(drm_dev, drm_connector, > + _hdmi_connector_funcs, > + DRM_MODE_CONNECTOR_HDMIA, > + hdmi->ddc_adapt); > drm_connector_helper_add(drm_connector, > _hdmi_connector_helper_funcs); > > -- > 2.17.1 > ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [PATCH v4 15/23] drm: sti: Provide ddc symlink in hdmi connector sysfs directory
Le jeu. 11 juil. 2019 à 13:30, Andrzej Pietrasiewicz a écrit : > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Benjamin Gaignard > --- > drivers/gpu/drm/sti/sti_hdmi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c > index f03d617edc4c..90f8db63c095 100644 > --- a/drivers/gpu/drm/sti/sti_hdmi.c > +++ b/drivers/gpu/drm/sti/sti_hdmi.c > @@ -1279,6 +1279,7 @@ static int sti_hdmi_bind(struct device *dev, struct > device *master, void *data) > drm_bridge_attach(encoder, bridge, NULL); > > connector->encoder = encoder; > + drm_connector->ddc = hdmi->ddc_adapt; > > drm_connector = (struct drm_connector *)connector; > > -- > 2.17.1 > ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h
Le lun. 10 déc. 2018 à 12:10, Benjamin Gaignard a écrit : > > Le lun. 10 déc. 2018 à 11:24, Thierry Reding > a écrit : > > > > On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote: > > > Having the probe helper stuff (which pretty much everyone needs) in > > > the drm_crtc_helper.h file (which atomic drivers should never need) is > > > confusing. Split them out. > > > > > > To make sure I actually achieved the goal here I went through all > > > drivers. And indeed, all atomic drivers are now free of > > > drm_crtc_helper.h includes. > > > > > I have difficulties to apply this with git on top of drm-misc-next. > It is because of that I got errors (encoder and connector types not > found) while compiling adv7511_audio.c and exynos_dp.c ? > Nack on this patch because it break compiling at least on sti driver. drm_probe_helper.h doesn't bring the same includes than drm_crtc_helper.h: #include #include #include so some types, structures and functions proptotypes are missing while compiling. > Benjamin > > > Signed-off-by: Daniel Vetter > > > Cc: linux-arm-ker...@lists.infradead.org > > > Cc: virtualizat...@lists.linux-foundation.org > > > Cc: etna...@lists.freedesktop.org > > > Cc: linux-samsung-...@vger.kernel.org > > > Cc: intel-...@lists.freedesktop.org > > > Cc: linux-media...@lists.infradead.org > > > Cc: linux-amlo...@lists.infradead.org > > > Cc: linux-arm-...@vger.kernel.org > > > Cc: freedreno@lists.freedesktop.org > > > Cc: nouv...@lists.freedesktop.org > > > Cc: spice-de...@lists.freedesktop.org > > > Cc: amd-...@lists.freedesktop.org > > > Cc: linux-renesas-...@vger.kernel.org > > > Cc: linux-rockc...@lists.infradead.org > > > Cc: linux-st...@st-md-mailman.stormreply.com > > > Cc: linux-te...@vger.kernel.org > > > Cc: xen-de...@lists.xen.org > > > --- > > > .../gpu/drm/amd/amdgpu/amdgpu_connectors.c| 2 +- > > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 +- > > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- > > > drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + > > > .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- > > > .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 2 +- > > > .../display/amdgpu_dm/amdgpu_dm_services.c| 2 +- > > > drivers/gpu/drm/arc/arcpgu_crtc.c | 2 +- > > > drivers/gpu/drm/arc/arcpgu_drv.c | 2 +- > > > drivers/gpu/drm/arc/arcpgu_sim.c | 2 +- > > > drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +- > > > drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- > > > drivers/gpu/drm/arm/malidp_crtc.c | 2 +- > > > drivers/gpu/drm/arm/malidp_drv.c | 2 +- > > > drivers/gpu/drm/arm/malidp_mw.c | 2 +- > > > drivers/gpu/drm/armada/armada_510.c | 2 +- > > > drivers/gpu/drm/armada/armada_crtc.c | 2 +- > > > drivers/gpu/drm/armada/armada_drv.c | 2 +- > > > drivers/gpu/drm/armada/armada_fb.c| 2 +- > > > drivers/gpu/drm/ast/ast_drv.c | 1 + > > > drivers/gpu/drm/ast/ast_mode.c| 1 + > > > .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c| 2 +- > > > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 2 +- > > > drivers/gpu/drm/bochs/bochs_drv.c | 1 + > > > drivers/gpu/drm/bochs/bochs_kms.c | 1 + > > > drivers/gpu/drm/bridge/adv7511/adv7511.h | 2 +- > > > drivers/gpu/drm/bridge/analogix-anx78xx.c | 3 +- > > > .../drm/bridge/analogix/analogix_dp_core.c| 2 +- > > > drivers/gpu/drm/bridge/cdns-dsi.c | 2 +- > > > drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- > > > .../bridge/megachips-stdp-ge-b850v3-fw.c | 2 +- > > > drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +- > > > drivers/gpu/drm/bridge/panel.c| 2 +- > > > drivers/gpu/drm/bridge/parade-ps8622.c| 2 +- > > > drivers/gpu/drm/bridge/sii902x.c | 2 +- > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- > > > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 2 +- > > > drivers/gpu/drm/bridge/tc358764.c | 2 +- > > > drivers/gpu/drm/bridge/tc358767.c | 2 +- > > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > > > drivers/gpu/drm/bridge/ti-tfp410.c| 2 +- > > > drivers/gpu/drm/cirrus
Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h
Le lun. 10 déc. 2018 à 11:24, Thierry Reding a écrit : > > On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote: > > Having the probe helper stuff (which pretty much everyone needs) in > > the drm_crtc_helper.h file (which atomic drivers should never need) is > > confusing. Split them out. > > > > To make sure I actually achieved the goal here I went through all > > drivers. And indeed, all atomic drivers are now free of > > drm_crtc_helper.h includes. > > I have difficulties to apply this with git on top of drm-misc-next. It is because of that I got errors (encoder and connector types not found) while compiling adv7511_audio.c and exynos_dp.c ? Benjamin > > Signed-off-by: Daniel Vetter > > Cc: linux-arm-ker...@lists.infradead.org > > Cc: virtualizat...@lists.linux-foundation.org > > Cc: etna...@lists.freedesktop.org > > Cc: linux-samsung-...@vger.kernel.org > > Cc: intel-...@lists.freedesktop.org > > Cc: linux-media...@lists.infradead.org > > Cc: linux-amlo...@lists.infradead.org > > Cc: linux-arm-...@vger.kernel.org > > Cc: freedreno@lists.freedesktop.org > > Cc: nouv...@lists.freedesktop.org > > Cc: spice-de...@lists.freedesktop.org > > Cc: amd-...@lists.freedesktop.org > > Cc: linux-renesas-...@vger.kernel.org > > Cc: linux-rockc...@lists.infradead.org > > Cc: linux-st...@st-md-mailman.stormreply.com > > Cc: linux-te...@vger.kernel.org > > Cc: xen-de...@lists.xen.org > > --- > > .../gpu/drm/amd/amdgpu/amdgpu_connectors.c| 2 +- > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 +- > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- > > drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + > > .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- > > .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 2 +- > > .../display/amdgpu_dm/amdgpu_dm_services.c| 2 +- > > drivers/gpu/drm/arc/arcpgu_crtc.c | 2 +- > > drivers/gpu/drm/arc/arcpgu_drv.c | 2 +- > > drivers/gpu/drm/arc/arcpgu_sim.c | 2 +- > > drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +- > > drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- > > drivers/gpu/drm/arm/malidp_crtc.c | 2 +- > > drivers/gpu/drm/arm/malidp_drv.c | 2 +- > > drivers/gpu/drm/arm/malidp_mw.c | 2 +- > > drivers/gpu/drm/armada/armada_510.c | 2 +- > > drivers/gpu/drm/armada/armada_crtc.c | 2 +- > > drivers/gpu/drm/armada/armada_drv.c | 2 +- > > drivers/gpu/drm/armada/armada_fb.c| 2 +- > > drivers/gpu/drm/ast/ast_drv.c | 1 + > > drivers/gpu/drm/ast/ast_mode.c| 1 + > > .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c| 2 +- > > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 2 +- > > drivers/gpu/drm/bochs/bochs_drv.c | 1 + > > drivers/gpu/drm/bochs/bochs_kms.c | 1 + > > drivers/gpu/drm/bridge/adv7511/adv7511.h | 2 +- > > drivers/gpu/drm/bridge/analogix-anx78xx.c | 3 +- > > .../drm/bridge/analogix/analogix_dp_core.c| 2 +- > > drivers/gpu/drm/bridge/cdns-dsi.c | 2 +- > > drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- > > .../bridge/megachips-stdp-ge-b850v3-fw.c | 2 +- > > drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +- > > drivers/gpu/drm/bridge/panel.c| 2 +- > > drivers/gpu/drm/bridge/parade-ps8622.c| 2 +- > > drivers/gpu/drm/bridge/sii902x.c | 2 +- > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- > > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 2 +- > > drivers/gpu/drm/bridge/tc358764.c | 2 +- > > drivers/gpu/drm/bridge/tc358767.c | 2 +- > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > > drivers/gpu/drm/bridge/ti-tfp410.c| 2 +- > > drivers/gpu/drm/cirrus/cirrus_drv.c | 1 + > > drivers/gpu/drm/cirrus/cirrus_mode.c | 1 + > > drivers/gpu/drm/drm_atomic_helper.c | 1 - > > drivers/gpu/drm/drm_dp_mst_topology.c | 2 +- > > drivers/gpu/drm/drm_modeset_helper.c | 2 +- > > drivers/gpu/drm/drm_probe_helper.c| 2 +- > > drivers/gpu/drm/drm_simple_kms_helper.c | 2 +- > > drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - > > drivers/gpu/drm/exynos/exynos_dp.c| 2 +- > > drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +- > > drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 +- > > drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- > > drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +- > > drivers/gpu/drm/exynos/exynos_drm_fb.c| 2 +- > > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > > drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +- > > drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- > > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c| 2 +- > > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- > > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c |
[Freedreno] [PATCH 04/15] drm: msm: use devm_of_platform_populate()
Use devm_of_platform_populate() to simplify driver code. Signed-off-by: Benjamin Gaignard <benjamin.gaign...@linaro.org> CC: Rob Clark <robdcl...@gmail.com> CC: David Airlie <airl...@linux.ie> CC: linux-arm-...@vger.kernel.org CC: dri-de...@lists.freedesktop.org CC: freedreno@lists.freedesktop.org CC: linux-ker...@vger.kernel.org --- drivers/gpu/drm/msm/msm_drv.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 87b5695..545fb6f 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -969,7 +969,7 @@ static int add_display_components(struct device *dev, * to our components list. */ if (of_device_is_compatible(dev->of_node, "qcom,mdss")) { - ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = devm_of_platform_populate(dev); if (ret) { dev_err(dev, "failed to populate children devices\n"); return ret; @@ -978,7 +978,6 @@ static int add_display_components(struct device *dev, mdp_dev = device_find_child(dev, NULL, compare_name_mdp); if (!mdp_dev) { dev_err(dev, "failed to find MDSS MDP node\n"); - of_platform_depopulate(dev); return -ENODEV; } @@ -992,11 +991,7 @@ static int add_display_components(struct device *dev, mdp_dev = dev; } - ret = add_components_mdp(mdp_dev, matchptr); - if (ret) - of_platform_depopulate(dev); - - return ret; + return add_components_mdp(mdp_dev, matchptr); } /* @@ -1072,7 +1067,6 @@ static int msm_pdev_probe(struct platform_device *pdev) static int msm_pdev_remove(struct platform_device *pdev) { component_master_del(>dev, _drm_ops); - of_platform_depopulate(>dev); return 0; } -- 1.9.1 ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
[Freedreno] [PATCH 00/15] make more driver use devm_of_platform_populate()
Number of calls to of_platform_populate() aren't unbalanced by a call to of_platform_depopulate() that could generate issue will loading/unloading the drivers. Make those drivers use devm_of_platform_populate() fix the problem without need to add remove function. In some case replacing of_platform_populate() by devm_of_platform_populate() allow to delete driver remove function and save some lines of code. This series of patches based on v4.12-rc3 tag. CC: Alexandre Torgue <alexandre.tor...@st.com> CC: David Airlie <airl...@linux.ie> CC: Fabrice Gasnier <fabrice.gasn...@st.com> CC: Hartmut Knaack <knaac...@gmx.de> CC: Jaroslav Kysela <pe...@perex.cz> CC: Javier Martinez Canillas <jav...@osg.samsung.com> CC: Jonathan Cameron <ji...@kernel.org> CC: Krzysztof Kozlowski <k...@kernel.org> CC: Kukjin Kim <kg...@kernel.org> CC: Kyungmin Park <kyungmin.p...@samsung.com> CC: Lars-Peter Clausen <l...@metafoo.de> CC: Lee Jones <lee.jo...@linaro.org> CC: Liam Girdwood <lgirdw...@gmail.com> CC: Mark Brown <broo...@kernel.org> CC: Mauro Carvalho Chehab <mche...@kernel.org> CC: Olivier Moysan <olivier.moy...@st.com> CC: Rob Clark <robdcl...@gmail.com> CC: Shawn Guo <shawn...@kernel.org> CC: Sylwester Nawrocki <s.nawro...@samsung.com> CC: Takashi Iwai <ti...@suse.com> CC: Tony Lindgren <t...@atomide.com> CC: linux-...@vger.kernel.org CC: linux-arm-ker...@lists.infradead.org CC: linux-ker...@vger.kernel.org CC: dri-de...@lists.freedesktop.org CC: linux-arm-...@vger.kernel.org CC: freedreno@lists.freedesktop.org CC: linux-samsung-...@vger.kernel.org CC: alsa-de...@alsa-project.org CC: linux-me...@vger.kernel.org Benjamin Gaignard (15): iio: adc: stm32: use devm_of_platform_populate() iio: dac: stm32: use devm_of_platform_populate() drm: zte: use devm_of_platform_populate() drm: msm: use devm_of_platform_populate() mfd: stm32-timers: use devm_of_platform_populate mfd: atmel: use devm_of_platform_populate() mfd: cros_ec: use devm_of_platform_populate() mfd: exynos: use devm_of_platform_populate() mfd: fsl-imx25: use devm_of_platform_populate() mfd: motorola-cpcap: use devm_of_platform_populate() mfd: palmas: use devm_of_platform_populate() mfd: qcom-spmi-pmic: use devm_of_platform_populate() mfd: smsc-ece: use devm_of_platform_populate() sound: stm32: use devm_of_platform_populate() media: exynos4-is: use devm_of_platform_populate() drivers/gpu/drm/msm/msm_drv.c | 10 ++ drivers/gpu/drm/zte/zx_drm_drv.c| 2 +- drivers/iio/adc/stm32-adc-core.c| 4 +--- drivers/iio/dac/stm32-dac-core.c| 3 +-- drivers/media/platform/exynos4-is/fimc-is.c | 7 ++- drivers/mfd/atmel-flexcom.c | 2 +- drivers/mfd/cros_ec.c | 2 +- drivers/mfd/exynos-lpass.c | 2 +- drivers/mfd/fsl-imx25-tsadc.c | 5 + drivers/mfd/motorola-cpcap.c| 13 + drivers/mfd/palmas.c| 2 +- drivers/mfd/qcom-spmi-pmic.c| 9 + drivers/mfd/smsc-ece1099.c | 3 +-- drivers/mfd/stm32-timers.c | 10 +- sound/soc/stm/stm32_sai.c | 11 +-- 15 files changed, 17 insertions(+), 68 deletions(-) -- 1.9.1 ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno