From cddd4591404fb4c53dc0b3c0b15b942cdbed4356 Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Fri, 10 Apr 2020 10:47:05 +0800 Subject: layerscape: add patches-5.4 Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu --- ...rm-Add-drm_of_component_probe_with_match-.patch | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 target/linux/layerscape/patches-5.4/805-display-0038-MLK-16290-drm-Add-drm_of_component_probe_with_match-.patch (limited to 'target/linux/layerscape/patches-5.4/805-display-0038-MLK-16290-drm-Add-drm_of_component_probe_with_match-.patch') diff --git a/target/linux/layerscape/patches-5.4/805-display-0038-MLK-16290-drm-Add-drm_of_component_probe_with_match-.patch b/target/linux/layerscape/patches-5.4/805-display-0038-MLK-16290-drm-Add-drm_of_component_probe_with_match-.patch new file mode 100644 index 0000000000..40977336a2 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/805-display-0038-MLK-16290-drm-Add-drm_of_component_probe_with_match-.patch @@ -0,0 +1,114 @@ +From 43265ca8cc62395e1750686daa8b7007b617e53b Mon Sep 17 00:00:00 2001 +From: Liu Ying +Date: Tue, 29 Aug 2017 16:58:58 +0800 +Subject: [PATCH] MLK-16290 drm: Add drm_of_component_probe_with_match() helper + +A component master may have both OF based and non-OF based components to be +bound with. This patch adds a helper drm_of_component_probe_with_match() +similar to drm_of_component_probe() so that the new helper may get an +additional provided match pointer(contains match entries for non-OF based +components) to support this case. + +Tested-by: Meng Mingming +Signed-off-by: Liu Ying +(cherry picked from commit c3cad7223488638ab56c20b2c29345487857bc5f) +--- + drivers/gpu/drm/drm_of.c | 31 ++++++++++++++++++++++++++++--- + include/drm/drm_of.h | 13 +++++++++++++ + 2 files changed, 41 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/drm_of.c ++++ b/drivers/gpu/drm/drm_of.c +@@ -100,8 +100,10 @@ void drm_of_component_match_add(struct d + EXPORT_SYMBOL_GPL(drm_of_component_match_add); + + /** +- * drm_of_component_probe - Generic probe function for a component based master ++ * drm_of_component_probe_with_match - Generic probe function with match ++ * entries for a component based master + * @dev: master device containing the OF node ++ * @match: component match pointer provided to store matches + * @compare_of: compare function used for matching components + * @m_ops: component master ops to be used + * +@@ -112,12 +114,12 @@ EXPORT_SYMBOL_GPL(drm_of_component_match + * + * Returns zero if successful, or one of the standard error codes if it fails. + */ +-int drm_of_component_probe(struct device *dev, ++int drm_of_component_probe_with_match(struct device *dev, ++ struct component_match *match, + int (*compare_of)(struct device *, void *), + const struct component_master_ops *m_ops) + { + struct device_node *ep, *port, *remote; +- struct component_match *match = NULL; + int i; + + if (!dev->of_node) +@@ -183,6 +185,29 @@ int drm_of_component_probe(struct device + + return component_master_add_with_match(dev, m_ops, match); + } ++EXPORT_SYMBOL(drm_of_component_probe_with_match); ++ ++/** ++ * drm_of_component_probe - Generic probe function for a component based master ++ * @dev: master device containing the OF node ++ * @compare_of: compare function used for matching components ++ * @master_ops: component master ops to be used ++ * ++ * Parse the platform device OF node and bind all the components associated ++ * with the master. Interface ports are added before the encoders in order to ++ * satisfy their .bind requirements ++ * See Documentation/devicetree/bindings/graph.txt for the bindings. ++ * ++ * Returns zero if successful, or one of the standard error codes if it fails. ++ */ ++int drm_of_component_probe(struct device *dev, ++ int (*compare_of)(struct device *, void *), ++ const struct component_master_ops *m_ops) ++{ ++ struct component_match *match = NULL; ++ ++ return drm_of_component_probe_with_match(dev, match, compare_of, m_ops); ++} + EXPORT_SYMBOL(drm_of_component_probe); + + /* +--- a/include/drm/drm_of.h ++++ b/include/drm/drm_of.h +@@ -7,6 +7,7 @@ + #include + #endif + ++struct component_match; + struct component_master_ops; + struct component_match; + struct device; +@@ -25,6 +26,10 @@ void drm_of_component_match_add(struct d + struct component_match **matchptr, + int (*compare)(struct device *, void *), + struct device_node *node); ++extern int drm_of_component_probe_with_match(struct device *dev, ++ struct component_match *match, ++ int (*compare_of)(struct device *, void *), ++ const struct component_master_ops *m_ops); + int drm_of_component_probe(struct device *dev, + int (*compare_of)(struct device *, void *), + const struct component_master_ops *m_ops); +@@ -56,6 +61,14 @@ drm_of_component_match_add(struct device + { + } + ++static int drm_of_component_probe_with_match(struct device *dev, ++ struct component_match *match, ++ int (*compare_of)(struct device *, void *), ++ const struct component_master_ops *m_ops) ++{ ++ return -EINVAL; ++} ++ + static inline int + drm_of_component_probe(struct device *dev, + int (*compare_of)(struct device *, void *), -- cgit v1.2.3