[PATCH v2] drm/bridge: anx7625: Use pm_runtime_force_{suspend, resume}

2021-07-20 Thread Pi-Hsun Shih
Use pm_runtime_force_{suspend,resume} as system suspend/resume hook, to ensure that anx7625 is always powered off on suspend. Also add a device link between anx7625 driver and the encoder, to ensure that bridge_disable will be called before suspend. Signed-off-by: Pi-Hsun Shih --- Changes from

[PATCH v2 1/2] drm/bridge: anx7625: refactor power control to use runtime PM framework

2021-05-07 Thread Pi-Hsun Shih
tatus, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih --- drivers/gpu/drm/bridge/analogix/anx7625.c | 148 +- drivers/gpu/drm/bridge/analogix/anx7625.h | 1 - 2 files changed, 63 insertions(+), 86 deletions(-) diff --git a/driver

[PATCH v2 2/2] drm/bridge: anx7625: add suspend / resume hooks

2021-05-07 Thread Pi-Hsun Shih
Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih --- drivers/gpu/drm/bridge/analogix/anx7625.c | 27 +++ 1 file changed, 27 insertions(+) diff

[PATCH 1/2] drm/bridge: anx7625: refactor power control to use runtime PM framework

2021-05-07 Thread Pi-Hsun Shih
tatus, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih Change-Id: I58e19680b6d9ffb04be2a90f458400a1433925aa --- drivers/gpu/drm/bridge/analogix/anx7625.c | 147 +- drivers/gpu/drm/bridge/analogix/anx7625.h | 1 - 2 files change

[PATCH 2/2] drm/bridge: anx7625: add suspend / resume hooks

2021-05-07 Thread Pi-Hsun Shih
Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih Change-Id: I62122cc2a4eafdfce4859cbb419edc39875ebe3b --- drivers/gpu/drm/bridge/analogix/anx7625.c | 27

[PATCH v3 2/2] drm/bridge: anx7625: add suspend / resume hooks

2021-05-10 Thread Pi-Hsun Shih
Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih --- Changes from v2: * No change. --- drivers/gpu/drm/bridge/analogix/anx7625.c | 27 +++ 1 file

[PATCH v3 1/2] drm/bridge: anx7625: refactor power control to use runtime PM framework

2021-05-10 Thread Pi-Hsun Shih
tatus, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih --- Changes from v2: * Add missing .pm field to anx7625_driver. --- drivers/gpu/drm/bridge/analogix/anx7625.c | 149 ++ drivers/gpu/drm/bridge/analogix/anx7625.h | 1 - 2

[PATCH v4 1/2] drm/bridge: anx7625: refactor power control to use runtime PM framework

2021-05-15 Thread Pi-Hsun Shih
tatus, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih --- Changes from v3: * Maintain separate powered state, since the power state is not sync with runtime PM suspended state on suspend / resume, and the irq callback shouldn't be run while

[PATCH v4 2/2] drm/bridge: anx7625: add suspend / resume hooks

2021-05-15 Thread Pi-Hsun Shih
Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih --- Changes from v2, v3: * No change. --- drivers/gpu/drm/bridge/analogix/anx7625.c | 27 +++ 1

[PATCH v5 2/2] drm/bridge: anx7625: add suspend / resume hooks

2021-05-17 Thread Pi-Hsun Shih
Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih --- Changes in v5: * Disable irq and flush workqueue in suspend hook, so the irq handler won't be run during su

[PATCH v5 1/2] drm/bridge: anx7625: refactor power control to use runtime PM framework

2021-05-17 Thread Pi-Hsun Shih
tatus, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih --- Changes in v5: * Revert changes from v4, and move fix to the suspend / resume hook (2/2 in series). Changes in v4: * Maintain separate powered state, since the power state is not sync with ru

[PATCH] drm/bridge: anx7625: Synchronously run runtime suspend.

2021-05-20 Thread Pi-Hsun Shih
o all power off operations are guaranteed to be done after the call returns. Fixes: 60487584a79a ("drm/bridge: anx7625: refactor power control to use runtime PM framework") Signed-off-by: Pi-Hsun Shih --- drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++-- 1 file changed, 2 insertions(

[PATCH] drm/bridge: anx7625: Use pm_runtime_force_{suspend,resume}

2021-07-13 Thread Pi-Hsun Shih
spend / resume hooks") Signed-off-by: Pi-Hsun Shih --- An issue was found that the anx7625 driver won't power off when used as eDP bridge on Asurada board if suspend is entered via VT2. The reason is that in this case, anx7625_suspend won't power off anx7625 (since intp_

Re: [PATCH] drm/bridge: anx7625: Use pm_runtime_force_{suspend, resume}

2021-07-16 Thread Pi-Hsun Shih
) On Wed, Jul 14, 2021 at 6:32 PM Daniel Vetter wrote: > > On Wed, Jul 14, 2021 at 02:01:59PM +0800, Pi-Hsun Shih wrote: > > Use pm_runtime_force_suspend and pm_runtime_force_resume to ensure that > > anx7625 would always be powered off when suspended. Also update the > &g

[PATCH] drm/bridge: anx7625: Add anx7625 port switching.

2020-11-12 Thread Pi-Hsun Shih
the two ports currently has DP enabled. Signed-off-by: Pi-Hsun Shih This is an attempt to use typec framework with how we're using anx7625 on Chrome OS asurada board. An example of the dts for the two ports case can be fou

Re: [PATCH] drm/bridge: anx7625: Add anx7625 port switching.

2020-11-13 Thread Pi-Hsun Shih
Hi Prashant, Please see inline reply as below. On Thu, Nov 12, 2020 at 4:59 PM Prashant Malani wrote: > > Hi Pi-Hsun, > > I haven't gone through the code, but did have a high-level comment > (kindly see inline) > > On Thu, Nov 12, 2020 at 02:40:40PM +0800, Pi-Hsun Shi

Re: [PATCH v3 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

2019-11-08 Thread Pi-Hsun Shih
Hi, On Tue, Oct 15, 2019 at 5:52 PM Xin Ji wrote: > > The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed > for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. > > The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI > to DP feature. This driver o

[PATCH] drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane.

2019-11-18 Thread Pi-Hsun Shih
The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't check for it. Add check for it. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Pi-Hsun Shih --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 13 + 1

Re: [PATCH v7 3/3] drm/bridge: add it6505 driver

2020-03-09 Thread Pi-Hsun Shih
Hi allen, On Mon, Mar 9, 2020 at 2:32 PM allen wrote: > > From: Allen Chen > > This adds support for the iTE IT6505. > This device can convert DPI signal to DP output. > > Signed-off-by: Jitao Shi > Signed-off-by: Yilun Lin > Signed-off-by: Allen Chen &g

Re: [PATCH 2/2] drm/mediatek: Apply CMDQ control flow

2019-09-23 Thread Pi-Hsun Shih
Hi Bibby, On Fri, Aug 30, 2019 at 3:41 PM Bibby Hsieh wrote: > ... > +static void ddp_cmdq_cb(struct cmdq_cb_data data) > +{ > + > +#if IS_ENABLED(CONFIG_MTK_CMDQ) > + struct mtk_cmdq_cb_data *cb_data = data.data; > + struct drm_crtc_state *crtc_state = cb_data->state; > + struc

[PATCH] drm/mediatek: Fix can't get component for external display plane.

2019-11-28 Thread Pi-Hsun Shih
t; (count + mtk_ddp_comp_layer_nr(comp))) Fix this by using the offset of the plane to mtk_crtc->planes as index, instead of plane->index. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Yongqiang Niu Signed-off-by: Pi-Hsun Shih ---

[PATCH] drm/bridge: anx7625: Make hpd workqueue freezable

2021-06-14 Thread Pi-Hsun Shih
LE so all works won't run while suspending. Fixes: 409776fa3c42 ("drm/bridge: anx7625: add suspend / resume hooks") Signed-off-by: Pi-Hsun Shih --- drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bri

Re: [PATCH v3] drm/bridge: add it6505 driver

2020-09-23 Thread Pi-Hsun Shih
On Fri, Sep 4, 2020 at 10:17 AM allen wrote: > > This adds support for the iTE IT6505. > This device can convert DPI signal to DP output. > > From: Allen Chen > Signed-off-by: Jitao Shi > Signed-off-by: Pi-Hsun Shih > Signed-off-by: Yilun Lin > Signed-off-by: Hermes