[PATCH 1/4] drm/panel: seperate panel power control from panel prepare/unprepare

2021-04-20 Thread Jitao Shi
and drm_panel_unprepare. Signed-off-by: Jitao Shi --- drivers/gpu/drm/bridge/panel.c | 17 +++ drivers/gpu/drm/drm_panel.c| 38 ++ include/drm/drm_bridge.h | 2 ++ include/drm/drm_panel.h| 17 +++ 4 files changed, 74 insertions(+) diff

[PATCH 2/4] drm/panel: boe-tv101wum-n16 seperate the panel power control

2021-04-20 Thread Jitao Shi
Seperate the panel power control from prepare/unprepare. Signed-off-by: Jitao Shi --- .../gpu/drm/panel/panel-boe-tv101wum-nl6.c| 72 +-- 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel

[PATCH 4/4] drm/mediatek: add dsi module reset driver

2021-04-20 Thread Jitao Shi
Reset dsi HW to default when power on. Prevent the setting differet between bootloader and kernel. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 36 +- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH 3/4] drm/mediatek: fine tune the dsi panel's power sequence

2021-04-20 Thread Jitao Shi
Add the drm_panel_prepare_power and drm_panel_unprepare_power control. Turn on panel power(drm_panel_prepare_power) and control before dsi enable. And then dsi enable, send dcs cmd in drm_panel_prepare, last turn on backlight. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 12

[PATCH] drm/mediatek: force hsa hsa hfp packets multiple of line num to avoid screen shift

2021-04-07 Thread Jitao Shi
The bridge chip ANX7625 require the line packets ending at the sametime or ANX7625 will shift the screen. Change-Id: Ia324ad28fbff54140feedb9a1d6bfb2b246d0447 Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 1/3] drm/mediatek: dpi dual edge sample mode support

2021-03-30 Thread Jitao Shi
DPI can sample on falling, rising or both edge. When DPI sample the data both rising and falling edge. It can reduce half data io pins. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/mediatek

[PATCH 3/3] drm/mediatek: dpi: add bus format negociation

2021-03-30 Thread Jitao Shi
Add the atomic_get_output_bus_fmts, atomic_get_input_bus_fmts to negociate the possible output and input formats for the current mode and monitor, and use the negotiated formats in a basic atomic_check callback. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 96

[PATCH 0/3] mt8183 dpi supports dual edge

2021-03-30 Thread Jitao Shi
DPI can sample on falling, rising or both edge. When DPI sample the data both rising and falling edge. It can reduce half data io pins. Jitao Shi (3): drm/mediatek: dpi dual edge sample mode support drm/mediatek: config mt8183 driver data to support dual edge sample drm/mediatek: dpi: add

[PATCH 2/3] drm/mediatek: config mt8183 driver data to support dual edge sample

2021-03-30 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index ccd681a2a4c2..87bb27649c4c 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm

[PATCH v3 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

2021-02-07 Thread Jitao Shi
Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Doc

[PATCH v3 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 52f11a63a330

[PATCH v3 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192

2021-02-07 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index ffa4a0f1989f..f6f71eb67ff1 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu

[PATCH v3 0/3] Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Changes since v2: - add const struct drm_display_info *info in mtk_dpi_bridge_mode_valid Jitao Shi (3): drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid drm/mediatek: mtk_dpi: Add dpi config for mt8192 dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi .../display

[PATCH v2 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192

2021-02-07 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index ffa4a0f1989f..f6f71eb67ff1 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu

[PATCH v2 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 52f11a63a330

[PATCH v2 0/3] Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Changes since v1: - fix build err. Jitao Shi (3): drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid drm/mediatek: mtk_dpi: Add dpi config for mt8192 dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi .../display/mediatek/mediatek,dpi.yaml| 1 + drivers/gpu/drm

[PATCH v2 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

2021-02-07 Thread Jitao Shi
Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Doc

[PATCH 1/3] drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 52f11a63a330

[PATCH 2/3] drm/mediatek: mtk_dpi: Add dpi config for mt8192

2021-02-07 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index ffa4a0f1989f..b7905f3f4d1b 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers

[PATCH 0/3] Add check for max clock rate in mode_valid

2021-02-07 Thread Jitao Shi
Jitao Shi (3): drm/mediatek: mtk_dpi: Add check for max clock rate in mode_valid drm/mediatek: mtk_dpi: Add dpi config for mt8192 dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi .../display/mediatek/mediatek,dpi.yaml| 1 + drivers/gpu/drm/mediatek/mtk_dpi.c| 27

[PATCH 3/3] dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi

2021-02-07 Thread Jitao Shi
Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Doc

[PATCH] drm/mediatek: fine tune the data lane trail by project dts

2021-01-31 Thread Jitao Shi
Some panels or bridges require customized hs_da_trail time. So add a property in devicetree for this panels and bridges. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v2 0/2] Fix EoTp flag

2021-01-31 Thread Jitao Shi
Changes since v1: - Seperate the line time as single patch. Jitao Shi (2): drm/mediatek: dsi: Fix EoTp flag drm/mediatek: dsi: fine tune the line time cause by EOTp drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.12.5

[PATCH v2 1/2] drm/mediatek: dsi: Fix EoTp flag

2021-01-31 Thread Jitao Shi
SoC will transmit the EoTp (End of Transmission packet) when MIPI_DSI_MODE_EOT_PACKET flag is set. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm

[PATCH v2 2/2] drm/mediatek: dsi: fine tune the line time cause by EOTp

2021-01-31 Thread Jitao Shi
Enabling EoTp will make the line time larger, so the hfp and hbp should be reduced to keep line time. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c

[PATCH v2 2/3] pwm: mtk_disp: convert the driver to atomic API

2021-01-30 Thread Jitao Shi
Switch the driver to atomic API apply(). Signed-off-by: Jitao Shi --- drivers/pwm/pwm-mtk-disp.c | 114 +++-- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index 21416a8b6b47

[PATCH v2 1/3] pwm: mtk_disp: clear the clock operations

2021-01-30 Thread Jitao Shi
Remove the clk_prepare from mtk_disp_pwm_probe. Remove the clk_unprepare from mtk_disp_pwm_remove. Signed-off-by: Jitao Shi --- drivers/pwm/pwm-mtk-disp.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm

[PATCH v2 3/3] pwm: mtk_disp: implement .get_state()

2021-01-30 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/pwm/pwm-mtk-disp.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index 502228adf718..166e0a8ca703 100644 --- a/drivers/pwm/pwm-mtk-disp.c +++ b

[PATCH v2 0/3] Convert the mtk_disp driver to aotmic API

2021-01-30 Thread Jitao Shi
Changes since v1: - Seperate clock operation as single patch. - Seperate apply() as single patch. - Seperate get_state() operation as single patch. Jitao Shi (3): pwm: mtk_disp: clear the clock operations pwm: mtk_disp: convert the driver to atomic API pwm: mtk_disp: implement .get_state

[PATCH] drm/mediatek: dsi: Fix EoTp flag

2021-01-07 Thread Jitao Shi
SoC will transmit the EoTp (End of Transmission packet) when MIPI_DSI_MODE_EOT_PACKET flag is set. Enabling EoTp will make the line time larger, so the hfp and hbp should be reduced to keep line time. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 8 ++-- 1 file changed

[PATCH v5 1/1] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-10-13 Thread Jitao Shi
Replace horizontal_backporch_byte with vm->hback_porch * bpp to aovid flowing judgement negative number. if ((vm->hfront_porch * dsi_tmp_buf_bpp + horizontal_backporch_byte) > data_phy_cycles * dsi->lanes + delta) Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mt

[PATCH v5 0/1] fix scrolling of panel with small hfp or hbp

2020-10-13 Thread Jitao Shi
are > 0. Jitao Shi (1): drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp drivers/gpu/drm/mediatek/mtk_dsi.c | 65 +++--- 1 file changed, 25 insertions(+), 40 deletions(-) -- 2.12.5

Re: [v4 PATCH 0/2] fix scrolling of panel with small hfp or hbp

2020-10-13 Thread Jitao Shi
On Mon, 2020-10-12 at 23:22 +0800, Chun-Kuang Hu wrote: > Hi, Jitao: > > Jitao Shi 於 2020年10月10日 週六 下午3:09寫道: > > > > Changes since v3: > > - Revert v2, for v2 will cause some bridge ic no output. the cause > >the video linetime doesn't match display mod

[PATCH v4 2/2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-10-10 Thread Jitao Shi
Replace horizontal_backporch_byte with vm->hback_porch * bpp to aovid flowing judgement negative number. if ((vm->hfront_porch * dsi_tmp_buf_bpp + horizontal_backporch_byte) > data_phy_cycles * dsi->lanes + delta) Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mt

[PATCH v4 1/2] Revert "drm/mediatek: dsi: Fix scrolling of panel with small hfp or hbp"

2020-10-10 Thread Jitao Shi
This reverts commit 35bf948f1edbf507f6e57e0879fa6ea36d2d2930. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 80b7a082e874

[v4 PATCH 0/2] fix scrolling of panel with small hfp or hbp

2020-10-10 Thread Jitao Shi
Changes since v3: - Revert v2, for v2 will cause some bridge ic no output. the cause the video linetime doesn't match display mode from get mode. - Make sure the horizontal_frontporch_byte and horizontal_backporch_byte are > 0. Jitao Shi (2): Revert "drm/mediatek: dsi: Fix s

[v2 PATCH] dt-bindings: display: mediatek: convert the dpi bindings to yaml

2020-09-17 Thread Jitao Shi
Convert display/mediatek/mediatek,dpi.txt to display/mediatek/mediatek,dpi.yaml and remove the old text bindings. Signed-off-by: Jitao Shi --- .../bindings/display/mediatek/mediatek,dpi.txt | 42 -- .../bindings/display/mediatek/mediatek,dpi.yaml| 97 ++ 2

[v3 PATCH] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-09-16 Thread Jitao Shi
Replace horizontal_backporch_byte with vm->hback_porch * bpp to aovid flowing judgement negative number. if ((vm->hfront_porch * dsi_tmp_buf_bpp + horizontal_backporch_byte) > data_phy_cycles * dsi->lanes + delta) Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mt

Re: [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-08-17 Thread Jitao Shi
On Tue, 2020-08-18 at 07:42 +0800, Chun-Kuang Hu wrote: > Hi, Jitao: > > Jitao Shi 於 2020年8月17日 週一 下午9:07寫道: > > > > horizontal_backporch_byte should be hbp * bpp - hbp extra bytes. > > So remove the wrong subtraction 10. > > > > Signed-off-by: Jitao Shi

[PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-08-17 Thread Jitao Shi
horizontal_backporch_byte should be hbp * bpp - hbp extra bytes. So remove the wrong subtraction 10. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm

[PATCH] drm/panel: Fix auo,kd101n80-45na horizontal noise on edges of panel

2020-07-14 Thread Jitao Shi
Fine tune the HBP and HFP to avoid the dot noise on the left and right edges. Signed-off-by: Jitao Shi --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm

[v2 PATCH] drm/panel: auo,b116xw03: fix flash backlight when power on

2020-07-05 Thread Jitao Shi
Delay the backlight on to make sure the video stable. Signed-off-by: Jitao Shi --- drivers/gpu/drm/panel/panel-simple.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3ad828eaefe1..61781ffa7840 100644

Re: [PATCH] drm/panel: auo,b116xw03: fix flash backlight when power on

2020-07-05 Thread Jitao Shi
On Sun, 2020-07-05 at 10:06 +0200, Sam Ravnborg wrote: > Hi Jitao. > > On Fri, Jul 03, 2020 at 05:51:13PM +0800, Jitao Shi wrote: > > Delay the backlight on to make sure the video stable. > > > > Signed-off-by: Jitao Shi > > --- > > drivers/gpu/drm/p

[PATCH] drm/panel: auo,b116xw03: fix flash backlight when power on

2020-07-03 Thread Jitao Shi
Delay the backlight on to make sure the video stable. Signed-off-by: Jitao Shi --- drivers/gpu/drm/panel/panel-simple.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3ad828eaefe1..18f34f286d3d 100644

[PATCH v16 0/1] mt8183 dpi support pin mode swap

2020-06-14 Thread Jitao Shi
nges since v2: - update dt-bindings document for mt8183 dpi. - separate dual edge modfication as independent patch. Jitao Shi (1): dt-bindings: display: mediatek: convert the dpi bindings to yaml .../display/mediatek/mediatek,dpi.txt | 42 .../display/mediatek/mediatek,dpi.ya

[PATCH v16 1/1] dt-bindings: display: mediatek: convert the dpi bindings to yaml

2020-06-14 Thread Jitao Shi
Convert display/mediatek/mediatek,dpi.txt to display/mediatek/mediatek,dpi.yaml and remove the old text bindings. Signed-off-by: Jitao Shi --- .../display/mediatek/mediatek,dpi.txt | 42 .../display/mediatek/mediatek,dpi.yaml| 97 +++ 2 files changed, 97

[PATCH] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp

2020-05-22 Thread Jitao Shi
If panel has too small hfp or hbp, horizontal_frontporch_byte or horizontal_backporch_byte may become very small value or negative value. This patch adjusts their values so that they are greater than minimum value and keep total of them unchanged. Signed-off-by: Jitao Shi --- drivers/gpu/drm

[PATCH v6 3/3] drm/mediatek: add mipi_tx driver for mt8183

2019-08-07 Thread Jitao Shi
This patch add mt8183 mipi_tx driver. And also support other chips that use the same binding and driver. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 2 + drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 1

[v4 4/7] drm/mediatek: add frame size control

2019-06-01 Thread Jitao Shi
Our new DSI chip has frame size control. So add the driver data to control for different chips. Signed-off-by: Jitao Shi Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm

[v4 6/7] drm/mediatek: change the dsi phytiming calculate method

2019-06-01 Thread Jitao Shi
- data_phy_cycles * lanes - 12; Note: //(2: 1 for sync, 1 for phy idle) data_phy_cycles = T_hs_exit + T_lpx + T_hs_prepare + T_hs_zero + 2; bpp: bit per pixel Signed-off-by: Jitao Shi Tested-by: Ryan Case --- drivers/gpu/drm/mediatek/mtk_dsi.c | 122 - 1 file

[PATCH v1 1/2] drm/mediatek: separate mipi_tx to different file

2019-02-19 Thread Jitao Shi
Different IC has different mipi_tx setting of dsi. This patch separates the mipi_tx hardware relate part for mt8173. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 350 ++ drivers/gpu/drm

[PATCH v1 2/2] drm/mediatek: add mipi_tx driver for mt8183

2019-02-19 Thread Jitao Shi
This patch add mt8183 mipi_tx driver. And also support other chips that use the same binding and driver. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 2 + drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 1 + drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 168

[PATCH v1 0/2] drm/mediatek: add mipi_tx driver for mt8183

2019-02-19 Thread Jitao Shi
MT8183 has different setting to MT8173(exist chip). We add mt8183 mipi_tx driver. 1) Separate mipi_tx to common part and chip relate part. 2) Add mt8183 mipi_tx driver Changes since v0: - Separate two independent patches. Jitao Shi (2): drm/mediatek: separate mipi_tx to different file drm

[v2 1/1] drm/mediatek: add mt8183 dpi support

2019-02-18 Thread Jitao Shi
MT8183 samples on rising and falling edge. It can reduce half data io. MT8173 also has those registers. But the hw function is removed. So MT8173 doesn't support DPI dual edge sample and can't use the same setting to mt8183. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 29

Re: [PATCH] drm/mediatek: add mt8183 dpi support

2019-02-18 Thread Jitao Shi
On Fri, 2019-02-15 at 00:13 +0800, CK Hu wrote: > Hi, Jitao: > > On Mon, 2019-02-11 at 12:50 +0800, Jitao Shi wrote: > > MT8183 sample on rising and falling edge. It can reduce half data io. > > > > Signed-off-by: Jitao Shi > > --- > >

Re: [PATCH] drm/mediatek: add mt8183 dpi support

2019-02-17 Thread Jitao Shi
On Fri, 2019-02-15 at 00:13 +0800, CK Hu wrote: > Hi, Jitao: > > On Mon, 2019-02-11 at 12:50 +0800, Jitao Shi wrote: > > MT8183 sample on rising and falling edge. It can reduce half data io. > > > > Signed-off-by: Jitao Shi > > --- > >

Re: [PATCH] drm/mediatek: add mt8183 dpi support

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 15:41 -0500, Sean Paul wrote: > On Mon, Feb 11, 2019 at 12:50:59PM +0800, Jitao Shi wrote: > > MT8183 sample on rising and falling edge. It can reduce half data io. > > > > Signed-off-by: Jitao Shi > > --- > > driver

Re: [PATCH 2/3] drm/mediatek: CMDQ reg address of mt8173 is different with mt2701

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 13:48 +0800, Nicolas Boichat wrote: > On Thu, Feb 14, 2019 at 12:42 PM Jitao Shi wrote: > > > > Config the different CMDQ reg address in driver data. > > > > Signed-off-by: Jitao Shi > > --- > > drivers/gpu/drm/mediatek/mtk_dsi.c | 3

Re: [PATCH 1/3] drm/mediatek: move mipi_dsi_host_register to probe

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 14:02 +0800, Nicolas Boichat wrote: > Just some comments on the error path, I'm not sure about the change itself. > > On Thu, Feb 14, 2019 at 12:42 PM Jitao Shi wrote: > > > > DSI panel driver need attach function which is inculde in

Re: [PATCH 3/3] drm/mediatek: add mt8183 dsi driver support

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 13:54 +0800, Nicolas Boichat wrote: > On Thu, Feb 14, 2019 at 12:43 PM Jitao Shi wrote: > > > > MT8183 dsi has two changes with mt8173. > > 1. Add the register double buffer control, but we no need it, So make > >it default off. > > C

Re: [PATCH 3/3] drm/mediatek: add mt8183 dsi driver support

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 10:54 +0100, Matthias Brugger wrote: > > On 14/02/2019 05:42, Jitao Shi wrote: > > MT8183 dsi has two changes with mt8173. > > 1. Add the register double buffer control, but we no need it, So make > >it default off. > > 2. Add picture siz

Re: [PATCH 1/3] drm/mediatek: move mipi_dsi_host_register to probe

2019-02-17 Thread Jitao Shi
On Thu, 2019-02-14 at 15:48 -0500, Sean Paul wrote: > On Thu, Feb 14, 2019 at 12:42:41PM +0800, Jitao Shi wrote: > > DSI panel driver need attach function which is inculde in > > mipi_dsi_host_ops. > > Which function is required from dsi_host? > > Sean

Re: [PATCH] drm/mediatek: add mipi_tx driver for mt8183

2019-02-17 Thread Jitao Shi
On Tue, 2019-02-12 at 10:28 +0100, Matthias Brugger wrote: > > On 12/02/2019 07:19, Jitao Shi wrote: > > This patch adds mipi tx driver support for mt8183. > > > > Mipi_tx of mt8183 is very different to mt8173. > > 1.Separate mipi tx setting to mtk_mt8173_mipi_tx.c

[PATCH 3/3] drm/mediatek: add mt8183 dsi driver support

2019-02-13 Thread Jitao Shi
MT8183 dsi has two changes with mt8173. 1. Add the register double buffer control, but we no need it, So make it default off. 2. Add picture size control. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion

[PATCH 1/3] drm/mediatek: move mipi_dsi_host_register to probe

2019-02-13 Thread Jitao Shi
DSI panel driver need attach function which is inculde in mipi_dsi_host_ops. If mipi_dsi_host_register is not in probe, dsi panel will probe fail or more delay. So move the mipi_dsi_host_register to probe from bind. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 49

[PATCH 2/3] drm/mediatek: CMDQ reg address of mt8173 is different with mt2701

2019-02-13 Thread Jitao Shi
Config the different CMDQ reg address in driver data. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 39 -- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c

[PATCH] drm/mediatek: add mipi_tx driver for mt8183

2019-02-11 Thread Jitao Shi
Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/Makefile | 2 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 352 ++ drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 52 +++ drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c | 290 +++ drivers/gpu/drm

[PATCH] drm/mediatek: add mt8183 dpi support

2019-02-10 Thread Jitao Shi
MT8183 sample on rising and falling edge. It can reduce half data io. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index

Re: [PATCH V2] pwm: Add MediaTek MT8183 display PWM driver support

2019-01-22 Thread Jitao Shi
On Tue, 2019-01-22 at 10:16 +0100, Uwe Kleine-König wrote: > On Tue, Jan 22, 2019 at 05:02:43PM +0800, Jitao Shi wrote: > > Use the mtk_pwm_data struction to define different registers > > and add MT8183 specific register operations, such as MT8183 > > doesn't have c

[PATCH V2] pwm: Add MediaTek MT8183 display PWM driver support

2019-01-22 Thread Jitao Shi
Use the mtk_pwm_data struction to define different registers and add MT8183 specific register operations, such as MT8183 doesn't have commit register, needs to disable double buffer before writing register, and needs to select commit mode and use PWM_PERIOD/PWM_HIGH_WIDTH. Signed-off-by: Jitao

[PATCH] pwm: Add MediaTek MT8183 display PWM driver support

2019-01-22 Thread Jitao Shi
Use the mtk_pwm_data struction to define different registers and add MT8183 specific register operations, such as MT8183 doesn't have commit register, needs to disable double buffer before writing register, and needs to select commit mode and use PWM_PERIOD/PWM_HIGH_WIDTH. Signed-off-by: Jitao

Re: [PATCH 9/9] drm/mediatek: add dpi dual edge support

2019-01-21 Thread Jitao Shi
On Wed, 2019-01-09 at 17:58 +0100, Matthias Brugger wrote: > > On 04/01/2019 08:03, chunhui dai wrote: > > DPI sample on rising and falling edge. It can reduce half data io. > > > > Signed-off-by: Jitao Shi > > Signed-off-by: chunhui dai > > --- > >

Re: [PATCH 9/9] drm/mediatek: add dpi dual edge support

2019-01-21 Thread Jitao Shi
dead.org; > > linux-media...@lists.infradead.org; dri-de...@lists.freedesktop.org; > > srv_heupstream; Bibby Hsieh (謝濟遠); JamesJJ Liao (廖建智); Jitao Shi (石记 > > 涛) > > Subject: [PATCH 9/9] drm/mediatek: add dpi dual edge support > > > > DPI sample on rising and fal

[PATCH] pwm: Add MediaTek MT8183 display PWM driver support

2019-01-15 Thread Jitao Shi
Use the mtk_pwm_data struction to define different registers and add MT8183 specific register operations, such as MT8183 have commit register, needs to enable double buffer before writing register, and needs to select commit mode and use PWM_PERIOD/PWM_HIGH_WIDTH. Signed-off-by: Jitao Shi

[PATCH v5] drm/mediatek: fixed the calc method of data rate per lane

2016-11-15 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi <jitao@mediatek.com> --- Change since v4: - tune the calc comment more clear. - define the phy timings as constants. Chnage since v3: - wrapp the

[PATCH v5] drm/mediatek: fixed the calc method of data rate per lane

2016-11-15 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi --- Change since v4: - tune the calc comment more clear. - define the phy timings as constants. Chnage since v3: - wrapp the commit msg. - fix alignment

Re: [v17 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-11-14 Thread Jitao Shi
n 11/10/2016 10:09 PM, Enric Balletbo Serra wrote: > > Hi Jitao, > > > > 2016-08-27 8:44 GMT+02:00 Jitao Shi <jitao@mediatek.com>: > >> This patch adds drm_bridge driver for parade DSI to eDP bridge chip. > >> > >> Signed-off-by: Ji

Re: [v17 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-11-14 Thread Jitao Shi
n 11/10/2016 10:09 PM, Enric Balletbo Serra wrote: > > Hi Jitao, > > > > 2016-08-27 8:44 GMT+02:00 Jitao Shi : > >> This patch adds drm_bridge driver for parade DSI to eDP bridge chip. > >> > >> Signed-off-by: Jitao Shi > >> Reviewed-by: Danie

[PATCH v18 1/2] Documentation: bridge: Add documentation for ps8640 DT properties

2016-11-14 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi <jitao@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> --- Changes since v17: - No change. Changes since v16: - N

[PATCH v18 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-11-14 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi <jitao@mediatek.com> Reviewed-by: Daniel Kurtz <djku...@chromium.org> Reviewed-by: Enric Balletbo i Serra <enric.balle...@collabora.com> --- Changes since v17: - remove some

[PATCH v18 1/2] Documentation: bridge: Add documentation for ps8640 DT properties

2016-11-14 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi Acked-by: Rob Herring Reviewed-by: Philipp Zabel --- Changes since v17: - No change. Changes since v16: - No change. Changes since v15: - No change. Changes since v14: - change mode-sel

[PATCH v18 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-11-14 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi Reviewed-by: Daniel Kurtz Reviewed-by: Enric Balletbo i Serra --- Changes since v17: - remove some unused head files. - add macros for ps8640 pages. - remove ddc_i2c client - add

[PATCH v4] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
. coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi <jitao@mediatek.com> --- Chnage since v3: - wrapp the commit msg. - fix alignment of some lines. Change since v2: - move phy timin

[PATCH v4] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
. coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi --- Chnage since v3: - wrapp the commit msg. - fix alignment of some lines. Change since v2: - move phy timing back to dsi_phy_timconfig. Change since

Re: [PATCH v2] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
On Wed, 2016-10-26 at 14:41 +0800, CK Hu wrote: > Hi, Jitao: > > On Tue, 2016-10-25 at 13:40 +0800, Jitao Shi wrote: > > Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e. Tlpx, > > Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP mode, this

Re: [PATCH v2] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
On Wed, 2016-10-26 at 14:41 +0800, CK Hu wrote: > Hi, Jitao: > > On Tue, 2016-10-25 at 13:40 +0800, Jitao Shi wrote: > > Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e. Tlpx, > > Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP mode, this

[PATCH v3] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi <jitao@mediatek.com> --- Change since v2: - move phy timing back to dsi_phy_timconfig. Change since v1: - phy_timing2 and phy_timing3 refer clock cycl

[PATCH v3] drm/mediatek: fixed the calc method of data rate per lane

2016-10-26 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi --- Change since v2: - move phy timing back to dsi_phy_timconfig. Change since v1: - phy_timing2 and phy_timing3 refer clock cycle time. - define values of LPX

[PATCH v2] drm/mediatek: fixed the calc method of data rate per lane

2016-10-24 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi <jitao@mediatek.com> --- Change since v1: - phy_timing2 and phy_timing3 refer clock cycle time. - define values of LPX HS_PRPR HS_ZERO HS_TRAIL TA_GO T

[PATCH v2] drm/mediatek: fixed the calc method of data rate per lane

2016-10-24 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi --- Change since v1: - phy_timing2 and phy_timing3 refer clock cycle time. - define values of LPX HS_PRPR HS_ZERO HS_TRAIL TA_GO TA_SURE TA_GET DA_HS_EXIT

[v17 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-08-27 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi <jitao@mediatek.com> Reviewed-by: Daniel Kurtz <djku...@chromium.org> --- Changes since v16: - Disable ps8640 DSI MCS Function. - Rename gpios name more clearly. - Tune the

[v17 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2016-08-27 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi Reviewed-by: Daniel Kurtz --- Changes since v16: - Disable ps8640 DSI MCS Function. - Rename gpios name more clearly. - Tune the ps8640 power on sequence. Changes since v15: - Drop drm_connector_

[v17 1/2] Documentation: bridge: Add documentation for ps8640 DT properties

2016-08-27 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi <jitao@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> --- Changes since v16: - No change. Changes since v15: - N

[v17 1/2] Documentation: bridge: Add documentation for ps8640 DT properties

2016-08-27 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi Acked-by: Rob Herring Reviewed-by: Philipp Zabel --- Changes since v16: - No change. Changes since v15: - No change. Changes since v14: - change mode-sel-gpios as optional

drm/mediatek: fixed the calc method of data rate per lane

2016-08-26 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi <jitao@mediatek.com> --- drivers/gpu/drm/mediatek/mtk_dsi.c | 111 ++-- 1 file changed, 67 insertions(+), 44 deletions(-)

drm/mediatek: fixed the calc method of data rate per lane

2016-08-26 Thread Jitao Shi
= ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+Ths_trail+ Ths_exit)/(htotal*bpp/lane_number)) Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 111 ++-- 1 file changed, 67 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 2/2 v16] drm/bridge: Add I2C based driver for ps8640 bridge

2016-06-02 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi <jitao@mediatek.com> Reviewed-by: Daniel Kurtz <djku...@chromium.org> --- Changes since v15: - Drop drm_connector_(un)register calls from parade ps8640. The main DRM driver mtk_drm_d

[PATCH 2/2 v16] drm/bridge: Add I2C based driver for ps8640 bridge

2016-06-02 Thread Jitao Shi
This patch adds drm_bridge driver for parade DSI to eDP bridge chip. Signed-off-by: Jitao Shi Reviewed-by: Daniel Kurtz --- Changes since v15: - Drop drm_connector_(un)register calls from parade ps8640. The main DRM driver mtk_drm_drv now calls drm_connector_register_all() after

[PATCH 1/2 v16] Documentation: bridge: Add documentation for ps8640 DT properties

2016-06-02 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi <jitao@mediatek.com> Acked-by: Rob Herring <r...@kernel.org> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> --- Changes since v15: - No change. Changes since v14:

[PATCH 1/2 v16] Documentation: bridge: Add documentation for ps8640 DT properties

2016-06-02 Thread Jitao Shi
Add documentation for DT properties supported by ps8640 DSI-eDP converter. Signed-off-by: Jitao Shi Acked-by: Rob Herring Reviewed-by: Philipp Zabel --- Changes since v15: - No change. Changes since v14: - change mode-sel-gpios as optional. --- .../devicetree/bindings/display/bridge/ps8640

  1   2   >