Marek Vasut
7f4e171f9d
drm/bridge: tc358762: Handle HS/VS polarity
...
Add support for handling the HS/VS sync signals polarity in the bridge
driver, otherwise e.g. DSIM bridge feeds the TC358762 inverted polarity
sync signals and the image is shifted to the left, up, and wobbly.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-5-marex@denx.de
2023-06-22 11:13:31 +02:00
Marek Vasut
80382226ef
drm/bridge: tc358762: Guess the meaning of LCDCTRL bits
...
The register content and behavior is very similar to TC358764 VP_CTRL.
All the bits except for unknown bit 6 also seem to match, even though
the datasheet is just not available. Add a comment and reuse the bit
definitions.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-4-marex@denx.de
2023-06-22 11:13:30 +02:00
Marek Vasut
362fa8f6e6
drm/bridge: tc358762: Instruct DSI host to generate HSE packets
...
This bridge seems to need the HSE packet, otherwise the image is
shifted up and corrupted at the bottom. This makes the bridge
work with Samsung DSIM on i.MX8MM and i.MX8MP.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-3-marex@denx.de
2023-06-22 11:13:29 +02:00
Marek Vasut
404643859a
drm/bridge: tc358762: Switch to atomic ops
...
Switch the bridge driver over to atomic ops. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-2-marex@denx.de
2023-06-22 11:13:28 +02:00
Marek Vasut
8a4b2fc9c9
drm/bridge: tc358762: Split register programming from pre-enable to enable
...
Move the register programming part, which actually enables the bridge and
makes it push data out of its DPI side, into the enable callback. The DSI
host like DSIM may not be able to transmit commands in pre_enable, moving
the register programming into enable assures it can transmit commands.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-1-marex@denx.de
2023-06-22 11:13:26 +02:00
Marek Vasut
3355f4ee56
drm/bridge: tc358762: Add reset GPIO support
...
Add reset GPIO support. The reset GPIO is cleared after supply regulator
was enabled, and set before supply regulator is disabled.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230530192805.648646-2-marex@denx.de
2023-06-01 14:49:04 +02:00
Douglas Anderson
55cac10739
drm/bridge: tc358762: Set pre_enable_prev_first
...
Set the "pre_enable_prev_first" as provided by commit 4fb912e5e1
("drm/bridge: Introduce pre_enable_prev_first to alter bridge init
order"). This should allow us to revert commit ec7981e6c6
("drm/msm/dsi: don't powerup at modeset time for parade-ps8640") and
commit 7d8e9a9050 ("drm/msm/dsi: move DSI host powerup to modeset
time").
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230131141756.RFT.v2.1.I723a3761d57ea60c5dd754c144aed6c3b2ea6f5a@changeid
2023-03-02 09:14:35 -08:00
Thomas Zimmermann
45b64fd9f7
drm/fb-helper: Remove unnecessary include statements
...
Remove include statements for <drm/drm_fb_helper.h> where it is not
required (i.e., most of them). In a few places include other header
files that are required by the source code.
v3:
* fix amdgpu include statements
* fix rockchip include statements
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-23-tzimmermann@suse.de
2022-11-05 17:12:04 +01:00
Uwe Kleine-König
79abca2b39
drm/mipi-dsi: Make remove callback return void
...
All implementations return 0 and the return value of mipi_dsi_drv_remove()
is ignored anyhow.
So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220708094922.1408248-4-u.kleine-koenig@pengutronix.de
2022-07-09 10:50:03 +02:00
Dmitry Baryshkov
d8e9d69096
drm/bridge: tc358762: drop connector field
...
The tc358762.connector field is unused. Remove it to save space.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220426011359.2861224-1-dmitry.baryshkov@linaro.org
2022-04-26 14:04:11 +02:00
José Expósito
0d9c5e6733
drm/bridge: tc358762: switch to devm_drm_of_get_bridge
...
The function "drm_of_find_panel_or_bridge" has been deprecated in
favor of "devm_drm_of_get_bridge".
Switch to the new function and reduce boilerplate.
Signed-off-by: José Expósito <jose.exposito89@gmail.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20220228183342.24129-1-jose.exposito89@gmail.com
2022-03-08 12:07:46 +01:00
Marek Vasut
1930d19cb4
drm/bridge: tc358762: Add basic driver for Toshiba TC358762 DSI-to-DPI bridge
...
Add very basic driver for Toshiba TC358762 DSI-to-DPI bridge, derived
from tc358764 driver and panel-raspberrypi-touchscreen. This driver is
meant to replace the panel-raspberrypi-touchscreen too, as the bridge
connection can be described in DT too.
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: dri-devel@lists.freedesktop.org
Cc: Eric Anholt <eric@anholt.net >
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: devicetree@vger.kernel.org
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Sam Ravnborg <sam.ravnborg@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200809105705.6334-2-marex@denx.de
2020-08-12 22:06:18 +02:00