Message ID | 20200224191230.30972-2-tony@atomide.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | e28bb32b6d9931f325bf0f9678a690bf333e6838 |
Headers | show |
Series | ti-sysc changes for probing DSS with dts data | expand |
Hi Tony, Thank you for the patch. On Mon, Feb 24, 2020 at 11:12:28AM -0800, Tony Lindgren wrote: > In order to probe display subsystem (DSS) components with ti-sysc > interconnect target module without legacy platform data and using > devicetree, we need to update dss probing a bit. > > In the device tree, we will be defining the data also for the interconnect > target modules as DSS really is a private interconnect. There is some > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > example where it mentions "32-bit interconnect (SLX)". > > The changes we need to make are: > > 1. Parse also device tree subnodes for the compatible property fixup > > 2. Update the component code to consider device tree subnodes > > Cc: dri-devel@lists.freedesktop.org > Cc: Jyri Sarha <jsarha@ti.com> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > > This is needed for dropping DSS platform data that I'll be posting > seprately. If this looks OK, can you guys please test and ack? > > --- > drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- > .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ > 2 files changed, 39 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c > --- a/drivers/gpu/drm/omapdrm/dss/dss.c > +++ b/drivers/gpu/drm/omapdrm/dss/dss.c > @@ -1339,9 +1339,15 @@ static int dss_component_compare(struct device *dev, void *data) > return dev == child; > } > > +struct dss_component_match_data { > + struct device *dev; > + struct component_match **match; > +}; > + > static int dss_add_child_component(struct device *dev, void *data) > { > - struct component_match **match = data; > + struct dss_component_match_data *cmatch = data; > + struct component_match **match = cmatch->match; > > /* > * HACK > @@ -1352,7 +1358,17 @@ static int dss_add_child_component(struct device *dev, void *data) > if (strstr(dev_name(dev), "rfbi")) > return 0; > > - component_match_add(dev->parent, match, dss_component_compare, dev); > + /* > + * Handle possible interconnect target modules defined within the DSS. > + * The DSS components can be children of an interconnect target module > + * after the device tree has been updated for the module data. > + * See also omapdss_boot_init() for compatible fixup. > + */ > + if (strstr(dev_name(dev), "target-module")) > + return device_for_each_child(dev, cmatch, > + dss_add_child_component); > + > + component_match_add(cmatch->dev, match, dss_component_compare, dev); > > return 0; > } > @@ -1395,6 +1411,7 @@ static int dss_probe_hardware(struct dss_device *dss) > static int dss_probe(struct platform_device *pdev) > { > const struct soc_device_attribute *soc; > + struct dss_component_match_data cmatch; > struct component_match *match = NULL; > struct resource *dss_mem; > struct dss_device *dss; > @@ -1472,7 +1489,9 @@ static int dss_probe(struct platform_device *pdev) > > omapdss_gather_components(&pdev->dev); > > - device_for_each_child(&pdev->dev, &match, dss_add_child_component); > + cmatch.dev = &pdev->dev; > + cmatch.match = &match; > + device_for_each_child(&pdev->dev, &cmatch, dss_add_child_component); > > r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match); > if (r) > diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > @@ -183,9 +183,24 @@ static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = { > {}, > }; > > +static void __init omapdss_find_children(struct device_node *np) > +{ > + struct device_node *child; > + > + for_each_available_child_of_node(np, child) { > + if (!of_find_property(child, "compatible", NULL)) > + continue; > + > + omapdss_walk_device(child, true); > + > + if (of_device_is_compatible(child, "ti,sysc")) > + omapdss_find_children(child); > + } > +} > + > static int __init omapdss_boot_init(void) > { > - struct device_node *dss, *child; > + struct device_node *dss; > > INIT_LIST_HEAD(&dss_conv_list); > > @@ -195,13 +210,7 @@ static int __init omapdss_boot_init(void) > return 0; > > omapdss_walk_device(dss, true); > - > - for_each_available_child_of_node(dss, child) { > - if (!of_find_property(child, "compatible", NULL)) > - continue; > - > - omapdss_walk_device(child, true); > - } > + omapdss_find_children(dss); > > while (!list_empty(&dss_conv_list)) { > struct dss_conv_node *n;
Hi, On Mon, Feb 24, 2020 at 11:12:28AM -0800, Tony Lindgren wrote: > In order to probe display subsystem (DSS) components with ti-sysc > interconnect target module without legacy platform data and using > devicetree, we need to update dss probing a bit. > > In the device tree, we will be defining the data also for the interconnect > target modules as DSS really is a private interconnect. There is some > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > example where it mentions "32-bit interconnect (SLX)". > > The changes we need to make are: > > 1. Parse also device tree subnodes for the compatible property fixup > > 2. Update the component code to consider device tree subnodes > > Cc: dri-devel@lists.freedesktop.org > Cc: Jyri Sarha <jsarha@ti.com> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Tony Lindgren <tony@atomide.com> > --- > > This is needed for dropping DSS platform data that I'll be posting > seprately. If this looks OK, can you guys please test and ack? > > --- Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> FWIW, I dropped omapdss-boot-init.c in my patch series updating DSI code to use common panel infrastructure, so this will conflict. -- Sebastian > drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- > .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ > 2 files changed, 39 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c > --- a/drivers/gpu/drm/omapdrm/dss/dss.c > +++ b/drivers/gpu/drm/omapdrm/dss/dss.c > @@ -1339,9 +1339,15 @@ static int dss_component_compare(struct device *dev, void *data) > return dev == child; > } > > +struct dss_component_match_data { > + struct device *dev; > + struct component_match **match; > +}; > + > static int dss_add_child_component(struct device *dev, void *data) > { > - struct component_match **match = data; > + struct dss_component_match_data *cmatch = data; > + struct component_match **match = cmatch->match; > > /* > * HACK > @@ -1352,7 +1358,17 @@ static int dss_add_child_component(struct device *dev, void *data) > if (strstr(dev_name(dev), "rfbi")) > return 0; > > - component_match_add(dev->parent, match, dss_component_compare, dev); > + /* > + * Handle possible interconnect target modules defined within the DSS. > + * The DSS components can be children of an interconnect target module > + * after the device tree has been updated for the module data. > + * See also omapdss_boot_init() for compatible fixup. > + */ > + if (strstr(dev_name(dev), "target-module")) > + return device_for_each_child(dev, cmatch, > + dss_add_child_component); > + > + component_match_add(cmatch->dev, match, dss_component_compare, dev); > > return 0; > } > @@ -1395,6 +1411,7 @@ static int dss_probe_hardware(struct dss_device *dss) > static int dss_probe(struct platform_device *pdev) > { > const struct soc_device_attribute *soc; > + struct dss_component_match_data cmatch; > struct component_match *match = NULL; > struct resource *dss_mem; > struct dss_device *dss; > @@ -1472,7 +1489,9 @@ static int dss_probe(struct platform_device *pdev) > > omapdss_gather_components(&pdev->dev); > > - device_for_each_child(&pdev->dev, &match, dss_add_child_component); > + cmatch.dev = &pdev->dev; > + cmatch.match = &match; > + device_for_each_child(&pdev->dev, &cmatch, dss_add_child_component); > > r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match); > if (r) > diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > @@ -183,9 +183,24 @@ static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = { > {}, > }; > > +static void __init omapdss_find_children(struct device_node *np) > +{ > + struct device_node *child; > + > + for_each_available_child_of_node(np, child) { > + if (!of_find_property(child, "compatible", NULL)) > + continue; > + > + omapdss_walk_device(child, true); > + > + if (of_device_is_compatible(child, "ti,sysc")) > + omapdss_find_children(child); > + } > +} > + > static int __init omapdss_boot_init(void) > { > - struct device_node *dss, *child; > + struct device_node *dss; > > INIT_LIST_HEAD(&dss_conv_list); > > @@ -195,13 +210,7 @@ static int __init omapdss_boot_init(void) > return 0; > > omapdss_walk_device(dss, true); > - > - for_each_available_child_of_node(dss, child) { > - if (!of_find_property(child, "compatible", NULL)) > - continue; > - > - omapdss_walk_device(child, true); > - } > + omapdss_find_children(dss); > > while (!list_empty(&dss_conv_list)) { > struct dss_conv_node *n; > -- > 2.25.1
* Sebastian Reichel <sre@kernel.org> [200224 23:32]: > Hi, > > On Mon, Feb 24, 2020 at 11:12:28AM -0800, Tony Lindgren wrote: > > In order to probe display subsystem (DSS) components with ti-sysc > > interconnect target module without legacy platform data and using > > devicetree, we need to update dss probing a bit. > > > > In the device tree, we will be defining the data also for the interconnect > > target modules as DSS really is a private interconnect. There is some > > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > > example where it mentions "32-bit interconnect (SLX)". > > > > The changes we need to make are: > > > > 1. Parse also device tree subnodes for the compatible property fixup > > > > 2. Update the component code to consider device tree subnodes > > > > Cc: dri-devel@lists.freedesktop.org > > Cc: Jyri Sarha <jsarha@ti.com> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > --- > > > > This is needed for dropping DSS platform data that I'll be posting > > seprately. If this looks OK, can you guys please test and ack? > > > > --- > > Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> > > FWIW, I dropped omapdss-boot-init.c in my patch series updating DSI > code to use common panel infrastructure, so this will conflict. Hey that's great :) Sounds like we can set up an immutable branch for just this $subject patch against v5.6-rc1 to resolve the conflict. I can set it up for Tomi or Tomi can set it up for me, whichever Tomi prefers. Regards, Tony
Tomi, * Tony Lindgren <tony@atomide.com> [200224 23:44]: > * Sebastian Reichel <sre@kernel.org> [200224 23:32]: > > Hi, > > > > On Mon, Feb 24, 2020 at 11:12:28AM -0800, Tony Lindgren wrote: > > > In order to probe display subsystem (DSS) components with ti-sysc > > > interconnect target module without legacy platform data and using > > > devicetree, we need to update dss probing a bit. > > > > > > In the device tree, we will be defining the data also for the interconnect > > > target modules as DSS really is a private interconnect. There is some > > > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > > > example where it mentions "32-bit interconnect (SLX)". > > > > > > The changes we need to make are: > > > > > > 1. Parse also device tree subnodes for the compatible property fixup > > > > > > 2. Update the component code to consider device tree subnodes > > > > > > Cc: dri-devel@lists.freedesktop.org > > > Cc: Jyri Sarha <jsarha@ti.com> > > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > > --- > > > > > > This is needed for dropping DSS platform data that I'll be posting > > > seprately. If this looks OK, can you guys please test and ack? > > > > > > --- > > > > Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> > > > > FWIW, I dropped omapdss-boot-init.c in my patch series updating DSI > > code to use common panel infrastructure, so this will conflict. > > Hey that's great :) Sounds like we can set up an immutable branch > for just this $subject patch against v5.6-rc1 to resolve the > conflict. I can set it up for Tomi or Tomi can set it up for me, > whichever Tomi prefers. Do you want me to send you a pull request for just this one patch against v5.6-rc1? Regards, Tony
On 27/02/2020 19:44, Tony Lindgren wrote: >>> FWIW, I dropped omapdss-boot-init.c in my patch series updating DSI >>> code to use common panel infrastructure, so this will conflict. >> >> Hey that's great :) Sounds like we can set up an immutable branch >> for just this $subject patch against v5.6-rc1 to resolve the >> conflict. I can set it up for Tomi or Tomi can set it up for me, >> whichever Tomi prefers. > > Do you want me to send you a pull request for just this one patch > against v5.6-rc1? It's probably easier if Sebastian drops the removal patch, and instead creates a patch that removes the panel-dsi-cm from omapdss_of_fixups_whitelist. That change should not conflict, and effectively makes the omapdss-boot-init.c a no-op. We can then remove the file later. Tomi
* Tomi Valkeinen <tomi.valkeinen@ti.com> [200302 10:29]: > On 27/02/2020 19:44, Tony Lindgren wrote: > > > > > FWIW, I dropped omapdss-boot-init.c in my patch series updating DSI > > > > code to use common panel infrastructure, so this will conflict. > > > > > > Hey that's great :) Sounds like we can set up an immutable branch > > > for just this $subject patch against v5.6-rc1 to resolve the > > > conflict. I can set it up for Tomi or Tomi can set it up for me, > > > whichever Tomi prefers. > > > > Do you want me to send you a pull request for just this one patch > > against v5.6-rc1? > > It's probably easier if Sebastian drops the removal patch, and instead > creates a patch that removes the panel-dsi-cm from > omapdss_of_fixups_whitelist. That change should not conflict, and > effectively makes the omapdss-boot-init.c a no-op. > > We can then remove the file later. OK for resolving the merge commit that works too. Tomi, so do you care to ack the $subject patch though so I can set up an immutable branch for us for the $subject patch? Or Tomi, do you want to set up an immutable branch for me for the $subject patch? Regards, Tony
On 24/02/2020 21:12, Tony Lindgren wrote: > In order to probe display subsystem (DSS) components with ti-sysc > interconnect target module without legacy platform data and using > devicetree, we need to update dss probing a bit. > > In the device tree, we will be defining the data also for the interconnect > target modules as DSS really is a private interconnect. There is some > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > example where it mentions "32-bit interconnect (SLX)". > > The changes we need to make are: > > 1. Parse also device tree subnodes for the compatible property fixup > > 2. Update the component code to consider device tree subnodes > > Cc: dri-devel@lists.freedesktop.org > Cc: Jyri Sarha <jsarha@ti.com> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Tony Lindgren <tony@atomide.com> > --- > > This is needed for dropping DSS platform data that I'll be posting > seprately. If this looks OK, can you guys please test and ack? > > --- > drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- > .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ > 2 files changed, 39 insertions(+), 11 deletions(-) Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> This doesn't conflict with drm-next (with Laurent's recent patches), so it should be fine for you to have this in your branch. And not a biggie, but I wonder if the changes to these two files should be in separate patches, due to omapdss-boot-init going away. Well, probably doesn't matter. Tomi
* Tomi Valkeinen <tomi.valkeinen@ti.com> [200303 09:19]: > On 24/02/2020 21:12, Tony Lindgren wrote: > > In order to probe display subsystem (DSS) components with ti-sysc > > interconnect target module without legacy platform data and using > > devicetree, we need to update dss probing a bit. > > > > In the device tree, we will be defining the data also for the interconnect > > target modules as DSS really is a private interconnect. There is some > > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > > example where it mentions "32-bit interconnect (SLX)". > > > > The changes we need to make are: > > > > 1. Parse also device tree subnodes for the compatible property fixup > > > > 2. Update the component code to consider device tree subnodes > > > > Cc: dri-devel@lists.freedesktop.org > > Cc: Jyri Sarha <jsarha@ti.com> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > --- > > > > This is needed for dropping DSS platform data that I'll be posting > > seprately. If this looks OK, can you guys please test and ack? > > > > --- > > drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- > > .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ > > 2 files changed, 39 insertions(+), 11 deletions(-) > > Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > > This doesn't conflict with drm-next (with Laurent's recent patches), so it > should be fine for you to have this in your branch. OK thank you. I've pushed out omap-for-v5.7/dss-probe which has just this commit against v5.6-rc1 [0][1]. Let's consider commit cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") immutable so we can both merge it in as needed. I have not added any tag yet as it seems that we could add also apply Sebastian's few preparatory dts changes to this branch when ready. > And not a biggie, but I wonder if the changes to these two files should be > in separate patches, due to omapdss-boot-init going away. Well, probably > doesn't matter. Hmm yeah good reason to put every change into a seprate patch for future. I really did not expect this to conflict with anything after years of no changes :) Regards, Tony [0] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git omap-for-v5.7/dss-probe [1] https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git/commit/?h=omap-for-v5.7/dss-probe&id=cef766300353613aa273791f70b3125d1f0420ae
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1339,9 +1339,15 @@ static int dss_component_compare(struct device *dev, void *data) return dev == child; } +struct dss_component_match_data { + struct device *dev; + struct component_match **match; +}; + static int dss_add_child_component(struct device *dev, void *data) { - struct component_match **match = data; + struct dss_component_match_data *cmatch = data; + struct component_match **match = cmatch->match; /* * HACK @@ -1352,7 +1358,17 @@ static int dss_add_child_component(struct device *dev, void *data) if (strstr(dev_name(dev), "rfbi")) return 0; - component_match_add(dev->parent, match, dss_component_compare, dev); + /* + * Handle possible interconnect target modules defined within the DSS. + * The DSS components can be children of an interconnect target module + * after the device tree has been updated for the module data. + * See also omapdss_boot_init() for compatible fixup. + */ + if (strstr(dev_name(dev), "target-module")) + return device_for_each_child(dev, cmatch, + dss_add_child_component); + + component_match_add(cmatch->dev, match, dss_component_compare, dev); return 0; } @@ -1395,6 +1411,7 @@ static int dss_probe_hardware(struct dss_device *dss) static int dss_probe(struct platform_device *pdev) { const struct soc_device_attribute *soc; + struct dss_component_match_data cmatch; struct component_match *match = NULL; struct resource *dss_mem; struct dss_device *dss; @@ -1472,7 +1489,9 @@ static int dss_probe(struct platform_device *pdev) omapdss_gather_components(&pdev->dev); - device_for_each_child(&pdev->dev, &match, dss_add_child_component); + cmatch.dev = &pdev->dev; + cmatch.match = &match; + device_for_each_child(&pdev->dev, &cmatch, dss_add_child_component); r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match); if (r) diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c @@ -183,9 +183,24 @@ static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = { {}, }; +static void __init omapdss_find_children(struct device_node *np) +{ + struct device_node *child; + + for_each_available_child_of_node(np, child) { + if (!of_find_property(child, "compatible", NULL)) + continue; + + omapdss_walk_device(child, true); + + if (of_device_is_compatible(child, "ti,sysc")) + omapdss_find_children(child); + } +} + static int __init omapdss_boot_init(void) { - struct device_node *dss, *child; + struct device_node *dss; INIT_LIST_HEAD(&dss_conv_list); @@ -195,13 +210,7 @@ static int __init omapdss_boot_init(void) return 0; omapdss_walk_device(dss, true); - - for_each_available_child_of_node(dss, child) { - if (!of_find_property(child, "compatible", NULL)) - continue; - - omapdss_walk_device(child, true); - } + omapdss_find_children(dss); while (!list_empty(&dss_conv_list)) { struct dss_conv_node *n;
In order to probe display subsystem (DSS) components with ti-sysc interconnect target module without legacy platform data and using devicetree, we need to update dss probing a bit. In the device tree, we will be defining the data also for the interconnect target modules as DSS really is a private interconnect. There is some information about that in 4460 TRM in "Figure 10-3. DSS Integration" for example where it mentions "32-bit interconnect (SLX)". The changes we need to make are: 1. Parse also device tree subnodes for the compatible property fixup 2. Update the component code to consider device tree subnodes Cc: dri-devel@lists.freedesktop.org Cc: Jyri Sarha <jsarha@ti.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- This is needed for dropping DSS platform data that I'll be posting seprately. If this looks OK, can you guys please test and ack? --- drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ 2 files changed, 39 insertions(+), 11 deletions(-)