I re-used the same scripted approach taken by Arnd [1] to look at patches backported to TI's ti-linux-4.19.y tree [2] (the full list can be found below). Out of the lot about a hundred were considered but most of them either didn't apply cleanly, involved multiple files or did not compile.
The remaining set is submitted herein and applies correctly to v4.19.68.
Regards, Mathieu
[1]. https://lore.kernel.org/lkml/20190322154425.3852517-19-arnd@arndb.de/T/ [2]. http://git.ti.com/gitweb/?p=ti-linux-kernel/ti-linux-kernel.git%3Ba=summary
Jyri Sarha (1): drm/tilcdc: Register cpufreq notifier after we have initialized crtc
Pedro Sousa (1): scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
Tomi Valkeinen (1): drm/bridge: tfp410: fix memleak in get_modes()
drivers/gpu/drm/bridge/ti-tfp410.c | 7 +++++- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 34 ++++++++++++++--------------- drivers/scsi/ufs/unipro.h | 2 +- 3 files changed, 24 insertions(+), 19 deletions(-)
From: Tomi Valkeinen tomi.valkeinen@ti.com
commit c08f99c39083ab55a9c93b3e93cef48711294dad upstream
We don't free the edid blob allocated by the call to drm_get_edid(), causing a memleak. Fix this by calling kfree(edid) at the end of the get_modes().
Signed-off-by: Tomi Valkeinen tomi.valkeinen@ti.com Signed-off-by: Andrzej Hajda a.hajda@samsung.com Link: https://patchwork.freedesktop.org/patch/msgid/20190610135739.6077-1-tomi.val... Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org --- drivers/gpu/drm/bridge/ti-tfp410.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index c3e32138c6bb..9dc109df0808 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -64,7 +64,12 @@ static int tfp410_get_modes(struct drm_connector *connector)
drm_connector_update_edid_property(connector, edid);
- return drm_add_edid_modes(connector, edid); + ret = drm_add_edid_modes(connector, edid); + + kfree(edid); + + return ret; + fallback: /* No EDID, fallback on the XGA standard modes */ ret = drm_add_modes_noedid(connector, 1920, 1200);
On Thu, Aug 29, 2019 at 01:59:59PM -0600, Mathieu Poirier wrote:
From: Tomi Valkeinen tomi.valkeinen@ti.com
commit c08f99c39083ab55a9c93b3e93cef48711294dad upstream
We don't free the edid blob allocated by the call to drm_get_edid(), causing a memleak. Fix this by calling kfree(edid) at the end of the get_modes().
Signed-off-by: Tomi Valkeinen tomi.valkeinen@ti.com Signed-off-by: Andrzej Hajda a.hajda@samsung.com Link: https://patchwork.freedesktop.org/patch/msgid/20190610135739.6077-1-tomi.val... Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org
I've queued this one for 4.14-5.2, thanks!
-- Thanks, Sasha
From: Pedro Sousa sousa@synopsys.com
commit ebcb8f8508c5edf428f52525cec74d28edea7bcb upstream
Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9 according to MIPI Alliance MPHY specification.
Fixes: e785060ea3a1 ("ufs: definitions for phy interface") Signed-off-by: Pedro Sousa sousa@synopsys.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org --- drivers/scsi/ufs/unipro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h index 23129d7b2678..c77e36526447 100644 --- a/drivers/scsi/ufs/unipro.h +++ b/drivers/scsi/ufs/unipro.h @@ -52,7 +52,7 @@ #define RX_HS_UNTERMINATED_ENABLE 0x00A6 #define RX_ENTER_HIBERN8 0x00A7 #define RX_BYPASS_8B10B_ENABLE 0x00A8 -#define RX_TERMINATION_FORCE_ENABLE 0x0089 +#define RX_TERMINATION_FORCE_ENABLE 0x00A9 #define RX_MIN_ACTIVATETIME_CAPABILITY 0x008F #define RX_HIBERN8TIME_CAPABILITY 0x0092 #define RX_REFCLKFREQ 0x00EB
On Thu, Aug 29, 2019 at 02:00:00PM -0600, Mathieu Poirier wrote:
From: Pedro Sousa sousa@synopsys.com
commit ebcb8f8508c5edf428f52525cec74d28edea7bcb upstream
Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9 according to MIPI Alliance MPHY specification.
Fixes: e785060ea3a1 ("ufs: definitions for phy interface") Signed-off-by: Pedro Sousa sousa@synopsys.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org
I've queued this for 4.14-4.19, thanks!
-- Thanks, Sasha
From: Jyri Sarha jsarha@ti.com
commit 432973fd3a20102840d5f7e61af9f1a03c217a4c upstream
Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash.
Reported-by: Peter Ujfalusi peter.ujfalusi@ti.com Signed-off-by: Jyri Sarha jsarha@ti.com Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 0fb300d41a09..e1868776da25 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -184,6 +184,12 @@ static void tilcdc_fini(struct drm_device *dev) { struct tilcdc_drm_private *priv = dev->dev_private;
+#ifdef CONFIG_CPU_FREQ + if (priv->freq_transition.notifier_call) + cpufreq_unregister_notifier(&priv->freq_transition, + CPUFREQ_TRANSITION_NOTIFIER); +#endif + if (priv->crtc) tilcdc_crtc_shutdown(priv->crtc);
@@ -198,12 +204,6 @@ static void tilcdc_fini(struct drm_device *dev) drm_mode_config_cleanup(dev); tilcdc_remove_external_device(dev);
-#ifdef CONFIG_CPU_FREQ - if (priv->freq_transition.notifier_call) - cpufreq_unregister_notifier(&priv->freq_transition, - CPUFREQ_TRANSITION_NOTIFIER); -#endif - if (priv->clk) clk_put(priv->clk);
@@ -274,17 +274,6 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) goto init_failed; }
-#ifdef CONFIG_CPU_FREQ - priv->freq_transition.notifier_call = cpufreq_transition; - ret = cpufreq_register_notifier(&priv->freq_transition, - CPUFREQ_TRANSITION_NOTIFIER); - if (ret) { - dev_err(dev, "failed to register cpufreq notifier\n"); - priv->freq_transition.notifier_call = NULL; - goto init_failed; - } -#endif - if (of_property_read_u32(node, "max-bandwidth", &priv->max_bandwidth)) priv->max_bandwidth = TILCDC_DEFAULT_MAX_BANDWIDTH;
@@ -361,6 +350,17 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) } modeset_init(ddev);
+#ifdef CONFIG_CPU_FREQ + priv->freq_transition.notifier_call = cpufreq_transition; + ret = cpufreq_register_notifier(&priv->freq_transition, + CPUFREQ_TRANSITION_NOTIFIER); + if (ret) { + dev_err(dev, "failed to register cpufreq notifier\n"); + priv->freq_transition.notifier_call = NULL; + goto init_failed; + } +#endif + if (priv->is_componentized) { ret = component_bind_all(dev, ddev); if (ret < 0)
On Thu, Aug 29, 2019 at 02:00:01PM -0600, Mathieu Poirier wrote:
From: Jyri Sarha jsarha@ti.com
commit 432973fd3a20102840d5f7e61af9f1a03c217a4c upstream
Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash.
Reported-by: Peter Ujfalusi peter.ujfalusi@ti.com Signed-off-by: Jyri Sarha jsarha@ti.com Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org
I've queued this one for 4.19 and 4.14, thank you!
-- Thanks, Sasha
linux-stable-mirror@lists.linaro.org