From 5c9b271633bb022ec77f48c7fd9205004966e2aa Mon Sep 17 00:00:00 2001 From: Wenkui Date: Fri, 21 Jun 2024 01:59:14 +0000 Subject: [PATCH 1/3] Fix i915 shutdown warning logs Maybe there is no display, the dmc would not be initialized, hence don't need to suspend dmc in i915 shutdown Tracked-On: OAM-112676 Signed-off-by: Wenkui --- drivers/gpu/drm/i915/i915_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 6fe02630f616..1bd012fa97a3 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1203,7 +1203,8 @@ void i915_driver_shutdown(struct drm_i915_private *i915) intel_suspend_encoders(i915); intel_shutdown_encoders(i915); - intel_dmc_ucode_suspend(i915); + if (HAS_DISPLAY(i915)) + intel_dmc_ucode_suspend(i915); i915_gem_suspend(i915); From 9ea4d1627f64aa7e8f3dd0d8d43e14f07056e0f5 Mon Sep 17 00:00:00 2001 From: Weifeng Liu Date: Fri, 21 Jun 2024 06:44:07 +0000 Subject: [PATCH 2/3] touchscreen/ef1e_tp: Destroy leaked workqueue upon failure Bump the version to 2024062101. The workqueue for initialization of interrupt of serdes was not destroyed upon failure during probing and hence leaked. In most situation this is just fine but if we gets really unlucky that the work bound to the workqueue runs after the probe function returns, kernel panic is doomed. Also move creation of the workqueue and queuing of the work to the end of the probe function to avoid unnecessary work when serdes screen is not present. Test-done: Boot Android with/without serdes screen. Tracked-On: OAM-121149 Signed-off-by: Weifeng Liu --- drivers/input/touchscreen/ef1e_tp/ef1e_tp.h | 2 +- .../touchscreen/ef1e_tp/ef1e_tp_driver.c | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/ef1e_tp/ef1e_tp.h b/drivers/input/touchscreen/ef1e_tp/ef1e_tp.h index ef359947e023..655666353500 100644 --- a/drivers/input/touchscreen/ef1e_tp/ef1e_tp.h +++ b/drivers/input/touchscreen/ef1e_tp/ef1e_tp.h @@ -32,7 +32,7 @@ #include "ef1e_tp_protocol.h" -#define EF1E_TP_VERSION "2024081801" +#define EF1E_TP_VERSION "2024062101" #define TP_WIDTH 2880 #define TP_HEIGHT 1620 diff --git a/drivers/input/touchscreen/ef1e_tp/ef1e_tp_driver.c b/drivers/input/touchscreen/ef1e_tp/ef1e_tp_driver.c index 8dba49a81da1..4af3ff676202 100644 --- a/drivers/input/touchscreen/ef1e_tp/ef1e_tp_driver.c +++ b/drivers/input/touchscreen/ef1e_tp/ef1e_tp_driver.c @@ -578,23 +578,15 @@ static int ef1e_tp_probe(struct platform_device *dev) i2c_bus_number = fpd_dp_ser_get_i2c_bus_number(); i2c_adap = i2c_get_adapter(i2c_bus_number); if (!i2c_adap) { - pr_err("cannot find a valid i2c bus for tp\n"); + pr_err("%s: cannot find a valid i2c bus for tp\n", __func__); ret = -ENODEV; goto error; } priv->i2c_adap = i2c_adap; - priv->init_wq = create_workqueue("ef1e_tp-init-wq"); - if (IS_ERR_OR_NULL(priv->init_wq)) { - dev_err(&dev->dev, "failed to create init wq\n"); - ret = -ENOMEM; - goto error; - } - queue_work(priv->init_wq, &priv->init_work); - ret = tp_input_dev_init(priv); if (ret < 0) { - pr_err("Failed to initialize input device\n"); + pr_err("%s: failed to initialize input device\n", __func__); goto error; } @@ -605,11 +597,23 @@ static int ef1e_tp_probe(struct platform_device *dev) if (ret < 0) goto error; + priv->init_wq = alloc_workqueue("ef1e_tp-init-wq", WQ_HIGHPRI, 0); + if (IS_ERR_OR_NULL(priv->init_wq)) { + dev_err(&dev->dev, "failed to create init wq\n"); + ret = -ENOMEM; + goto error; + } + queue_work(priv->init_wq, &priv->init_work); + pr_info("%s(): done\n", __func__); return 0; error: + if (!IS_ERR_OR_NULL(priv->init_wq)) + destroy_workqueue(priv->init_wq); + tp_input_dev_destroy(priv); + if (priv->polling) { if (priv->polling_kthread) kthread_stop(priv->polling_kthread); From afcb7f933aa096a7605adb9773953dcab64b2a42 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 26 Jun 2024 14:04:35 +0800 Subject: [PATCH 3/3] Revert "dwc3: set as high speed device" This reverts commit 657bdb2b53428638d351908cc4c39be0de73d123. --- drivers/usb/dwc3/gadget.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2b644af70d90..99f93c67475c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -30,8 +30,6 @@ #define DWC3_ALIGN_FRAME(d, n) (((d)->frame_number + ((d)->interval * (n))) \ & ~((d)->interval - 1)) -#define FORCE_HIGH_SPEED - /** * dwc3_gadget_set_test_mode - enables usb2 test modes * @dwc: pointer to our context structure @@ -2413,14 +2411,6 @@ static void __dwc3_gadget_set_speed(struct dwc3 *dwc) enum usb_device_speed speed; u32 reg; -#ifdef FORCE_HIGH_SPEED - /* - * Forcing to High speed as platform dont have mechanism - * to detect disconnect and this will put device LPM mode - * which result in slow detection on connect. - */ - speed = USB_SPEED_HIGH; -#else speed = dwc->gadget_max_speed; if (speed == USB_SPEED_UNKNOWN || speed > dwc->maximum_speed) speed = dwc->maximum_speed; @@ -2430,10 +2420,15 @@ static void __dwc3_gadget_set_speed(struct dwc3 *dwc) __dwc3_gadget_set_ssp_rate(dwc); return; } -#endif reg = dwc3_readl(dwc->regs, DWC3_DCFG); reg &= ~(DWC3_DCFG_SPEED_MASK); + /* + * Forcing to High speed as platform dont have mechanism + * to detect disconnect and this will put device LPM mode + * which result in slow detection on connect. + */ + speed = DWC3_DCFG_HIGHSPEED; /* * WORKAROUND: DWC3 revision < 2.20a have an issue * which would cause metastability state on Run/Stop @@ -2451,9 +2446,6 @@ static void __dwc3_gadget_set_speed(struct dwc3 *dwc) !dwc->dis_metastability_quirk) { reg |= DWC3_DCFG_SUPERSPEED; } else { -#ifdef FORCE_HIGH_SPEED - reg |= DWC3_DCFG_HIGHSPEED; -#else switch (speed) { case USB_SPEED_FULL: reg |= DWC3_DCFG_FULLSPEED; @@ -2478,7 +2470,6 @@ static void __dwc3_gadget_set_speed(struct dwc3 *dwc) else reg |= DWC3_DCFG_SUPERSPEED_PLUS; } -#endif } if (DWC3_IP_IS(DWC32) && speed > USB_SPEED_UNKNOWN &&