Hello,
This patch series aims at adding support for runtime bus-format
negotiation between all elements of the
'encoder -> bridges -> connector/display' section of the pipeline.
In order to support that, we need drm bridges to fully take part in the
atomic state validation process, which requires addition of a
drm_bridge_state + a new drm_bridge_funcs.atomic_check() hook (patches
10 - 12).
Once those basic building blocks are in place, we can add new helpers
to facilitate bus-format …
[View More]negotiation between element of the encoder
chain (patches 13 - 14).
Patches 1 to 9 are preparatory patches for patches 10 - 14. Patch 1 is
needed to allow inclusion of drm_atomic.h from drm_bridge.h, which we
need to make drm_bridge/drm_bridge_state inherit from
drm_private_obj/drm_private_obj_state.
Patches 2 to 9 are about transitioning the bridge chain to a
double-linked list, which is needed to allow bridge elements to
negotiate with the next and prev element in the pipeline.
Most of those patches can be applied independently of the rest of the
series, especially patches 2 - 7 which I think fix some misuses of the
drm_bridge API.
To finish, patches 15 - 17 demonstrate how bus-format negotiation can
be done, and patches 18 - 19 were needed for the use case I used to test
whole solution.
As you've noticed, this is an RFC, so any kind of feedback is welcome
(apart from checkpatch reports :P).
Thanks,
Boris
Boris Brezillon (19):
drm: Stop including drm_bridge.h from drm_crtc.h
drm: Support custom encoder/bridge enable/disable sequences officially
drm/vc4: Get rid of the dsi->bridge field
drm/exynos: Get rid of exynos_dsi->out_bridge
drm/exynos: Don't reset bridge->next
drm/bridge: Create drm_bridge_chain_xx() wrappers
drm/msm: Use drm_attach_bridge() to attach a bridge to an encoder
drm/bridge: Introduce drm_bridge_chain_get_{first,last,next}_bridge()
drm/bridge: Make the bridge chain a double-linked list
drm/bridge: Add a drm_bridge_state object
drm/bridge: Patch atomic hooks to take a drm_bridge_state
drm/bridge: Add an ->atomic_check() hook
drm/bridge: Add the drm_bridge_chain_get_prev_bridge() helper
drm/bridge: Add the necessary bits to support bus format negotiation
drm/imx: pd: Use bus format/flags provided by the bridge when
available
drm/bridge: lvds-encoder: Add a way to support custom ->atomic_check()
implem
drm/bridge: lvds-encoder: Implement bus format negotiation for
sn75lvds83
drm/panel: simple: Add support for Toshiba LTA089AC29000 panel
ARM: dts: imx: imx51-zii-rdu1: Fix the display pipeline definition
.../display/panel/toshiba,lt089ac29000.txt | 5 +-
arch/arm/boot/dts/imx51-zii-rdu1.dts | 24 +-
drivers/gpu/drm/arc/arcpgu_hdmi.c | 1 +
drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 +
.../drm/bridge/analogix/analogix_dp_core.c | 13 +-
drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 +
drivers/gpu/drm/bridge/lvds-encoder.c | 75 ++
.../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 +
drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 +
drivers/gpu/drm/bridge/panel.c | 1 +
drivers/gpu/drm/bridge/parade-ps8622.c | 1 +
drivers/gpu/drm/bridge/sii902x.c | 1 +
drivers/gpu/drm/bridge/sii9234.c | 1 +
drivers/gpu/drm/bridge/sil-sii8620.c | 1 +
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 +
drivers/gpu/drm/bridge/tc358764.c | 1 +
drivers/gpu/drm/bridge/tc358767.c | 1 +
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 +
drivers/gpu/drm/bridge/ti-tfp410.c | 1 +
drivers/gpu/drm/drm_atomic.c | 40 +
drivers/gpu/drm/drm_atomic_helper.c | 46 +-
drivers/gpu/drm/drm_bridge.c | 794 ++++++++++++++----
drivers/gpu/drm/drm_crtc_helper.c | 46 +-
drivers/gpu/drm/drm_encoder.c | 16 +-
drivers/gpu/drm/drm_probe_helper.c | 3 +-
drivers/gpu/drm/drm_simple_kms_helper.c | 1 +
drivers/gpu/drm/exynos/exynos_dp.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 18 +-
drivers/gpu/drm/exynos/exynos_drm_mic.c | 1 +
drivers/gpu/drm/exynos/exynos_hdmi.c | 1 +
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 +
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 1 +
drivers/gpu/drm/i2c/tda998x_drv.c | 1 +
drivers/gpu/drm/imx/imx-ldb.c | 1 +
drivers/gpu/drm/imx/parallel-display.c | 29 +-
drivers/gpu/drm/ingenic/ingenic-drm.c | 1 +
drivers/gpu/drm/mediatek/mtk_dpi.c | 1 +
drivers/gpu/drm/mediatek/mtk_dsi.c | 1 +
drivers/gpu/drm/mediatek/mtk_hdmi.c | 7 +-
drivers/gpu/drm/msm/dsi/dsi.h | 1 +
drivers/gpu/drm/msm/edp/edp.c | 4 +-
drivers/gpu/drm/msm/edp/edp.h | 1 +
drivers/gpu/drm/msm/edp/edp_bridge.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi.c | 4 +-
drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +
drivers/gpu/drm/omapdrm/dss/output.c | 1 +
drivers/gpu/drm/omapdrm/omap_drv.c | 8 +-
drivers/gpu/drm/omapdrm/omap_encoder.c | 4 +-
drivers/gpu/drm/panel/panel-simple.c | 36 +
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 10 +-
drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 1 +
drivers/gpu/drm/rockchip/rockchip_lvds.c | 1 +
drivers/gpu/drm/rockchip/rockchip_rgb.c | 1 +
drivers/gpu/drm/sti/sti_dvo.c | 1 +
drivers/gpu/drm/sti/sti_hda.c | 1 +
drivers/gpu/drm/sti/sti_hdmi.c | 1 +
drivers/gpu/drm/sun4i/sun4i_lvds.c | 1 +
drivers/gpu/drm/sun4i/sun4i_rgb.c | 1 +
drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 +
drivers/gpu/drm/tilcdc/tilcdc_external.c | 1 +
drivers/gpu/drm/vc4/vc4_dsi.c | 38 +-
include/drm/drm_atomic.h | 3 +
include/drm/drm_bridge.h | 252 +++++-
include/drm/drm_crtc.h | 1 -
include/drm/drm_encoder.h | 19 +-
65 files changed, 1242 insertions(+), 297 deletions(-)
--
2.21.0
[View Less]
Hello,
This patch series (nearly, see [1]) completes the rework of the omapdrm
driver to move to drm_bridge and drm_panel.
What a journey. This work was started more than a year ago, and this
last piece is perhaps the one that will generate the most bikeshedding
as it touches the DRM core. I'm braced for the impact, but please be
gentle :-)
Let's start with some context to understand the problem. omapdrm
contains custom drivers for external encoders, panels and connectors
(collectively …
[View More]referred to as display drivers). It combines them to
create output pipelines abstracted by a drm_encoder and a drm_connector,
with the ability to delegate the encoder and connector operations to the
component in the pipeline that implements them. For instance, for an
HDMI output pipeline, the hot plug detection and the EDID read can be
implemented by two different components, when they are handled by two
different devices at the hardware level.
DRM/KMS uses drm_bridge and drm_panel to abstract external encoders and
panels. The model is however simpler than what omapdrm provides, as
bridges were designed to be simple add-ons at the output of a
drm_encoder. The ability to chain bridges exists, but a bridge driver
hardcodes in its design its position in the pipeline : bridges that
expect to terminate the pipeline create a drm_connector, while bridges
that expect to be an intermediate component in the pipeline do not
create a connector. In addition to not supporting bridges that can be
either internal or a termination point in the pipeline depending on the
hardware design, implementing the drm_connector inside a bridge driver
makes it impossible to support hardware where bridge operations are
handled by different hardware components, as explained above.
The omapdrm driver has received support for drm_bridge and drm_panel,
but these issues prevented completely moving away from the omapdrm
custom display drivers. This patch series thus first reworks the
drm_bridge infrastructure to support the omapdrm use cases, and then
transitions the omapdrm driver.
The series starts by 01/60 that adds a new flag to the drm_display_info
structure to identify HDMI sinks. This is a feature needed by the OMAP4
and OMAP5 HDMI encoders, and I believe it can be useful to other HDMI
encoders as well. 02/60 is then a small drive-by cleanup.
The first sizeable change follows with the rename of the dumb-vga-dac
driver to simple-bridge (03/60 and 04/60) and support for non-VGA
bridges (05/60). This doesn't change the spirit of the driver that still
focusses on transparent bridges, but prepares it to support an analog
video amplifier. Patches 06/60 then add support for an enable GPIO, and
07/60 support for the OPA362 video amplifier itself.
The next two patches address the drm_bridge issues explained above.
Patch 08/60 makes it possible to attach to a bridge without having the
bridge create a connector. The connector is expected to be created by
the display controller driver. Patch 09/60 adds connector-related
operations to drm_bridge to make this possible.
The approach taken here is slightly intrusive as path 08/60 adds a
parameter to tbe bridge .attach() operation, and thus touches all bridge
drivers, even if the changes are very simple (as a consequence I haven't
CC'ed all the individual bridge maintainers as the CC list was too
large). Other options may be possible, what matters most to me is the
feature, not so much its implementation. Please note that I envision the
parameter to be removed down the road once all bridge drivers will be
converted to the new model (but this will likely take time, and both
models can co-exist for as long as necessary).
The next six patches make use of these new features: patches 10/60 and
11/60 add new bridge drivers for display connectors and for the TI
TPD12S015 HDMI level shifter respectively, patch 12/60 supports the new
API in the panel bridge driver, and patches 13/60 to 15/60 do the same
in the ti-tfp410 driver.
The nine patches that follow add support for six new panels, with the
related DT bindings (16/60 to 18/60) and the drm_panel drivers (19/60 to
24/60). The code originates from the corresponding omapdrm-specific
panel drivers (which explains why only three DT patches are needed as
most of the bindings are already present).
Patch 25/60 is possibly the most remarkable one in the series, with the
drm_bridge operations extension, as it provides a helper for display
controller drivers to construct a drm_connector entirerly backed by a
chain of bridges. This offsets the complexity of the additional bridge
operations by handling it all in a single place. An example usage for
omapdrm can be found in patch 43/60. Don't let its diffstat mislead you,
usage of the helper would remove lots of code if it wasn't for the fact
that the legacy implementation still has to be kept for the DSI panel
(see [1]). Down the road this helper and the new operation paradigm
should remove code from both display controller and bridge drivers.
The rest of the series is omapdrm-focussed, slowly preparing the driver
for the switch to drm_bridge drivers using the new helper (43/60), the
removal of the omapdrm-specific display drivers (44/60 and 50/60), and
lots of simplification and code removal in the other patches.
[1] The only notable exception is the omapdrm-specific DSI panel driver
that implements a large number of custom operations. This should be
addressed separately.
Laurent Pinchart (60):
drm/edid: Add flag to drm_display_info to identify HDMI sinks
video: hdmi: Change return type of hdmi_avi_infoframe_init() to void
drm/bridge: dumb-vga-dac: Rename internal symbols to simple-bridge
drm/bridge: dumb-vga-dac: Rename driver to simple-bridge
drm/bridge: simple-bridge: Add support for non-VGA bridges
drm/bridge: simple-bridge: Add support for enable GPIO
drm/bridge: simple-bridge: Add support for the TI OP362
drm/bridge: Extend bridge API to disable connector creation
drm/bridge: Add connector-related bridge operations and data
drm/bridge: Add bridge driver for display connectors
drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter
drm/bridge: panel: Implement bridge connector operations
drm/bridge: tfp410: Don't include drmP.h
drm/bridge: tfp410: Replace manual connector handling with bridge
drm/bridge: tfp410: Allow operation without drm_connector
dt-bindings: Add vendor prefix for LG Display
dt-bindings: Add legacy 'toppoly' vendor prefix
dt-bindings: display: panel: Add bindings for NEC NL8048HL11 panel
drm/panel: Add driver for the LG Philips LB035Q02 panel
drm/panel: Add driver for the NEC NL8048HL11 panel
drm/panel: Add driver for the Sharp LS037V7DW01 panel
drm/panel: Add driver for the Sony ACX565AKM panel
drm/panel: Add driver for the Toppology TD028TTEC1 panel
drm/panel: Add driver for the Toppology TD043MTEA1 panel
drm: Add helper to create a connector for a chain of bridges
drm/omap: Detach from panels at remove time
drm/omap: Simplify HDMI mode and infoframe configuration
drm/omap: Factor out display type to connector type conversion
drm/omap: Use the drm_panel_bridge API
drm/omap: dss: Fix output next device lookup in DT
drm/omap: Add infrastructure to support drm_bridge local to DSS
outputs
drm/omap: dss: Make omap_dss_device_ops optional
drm/omap: hdmi: Allocate EDID in the .read_edid() operation
drm/omap: hdmi4: Rework EDID read to isolate data read
drm/omap: hdmi5: Rework EDID read to isolate data read
drm/omap: hdmi4: Register a drm_bridge for EDID read
drm/omap: hdmi5: Register a drm_bridge for EDID read
drm/omap: hdmi4: Move mode set, enable and disable operations to
bridge
drm/omap: hdmi5: Move mode set, enable and disable operations to
bridge
drm/omap: hdmi4: Implement drm_bridge .lost_hotplug() operation
drm/omap: dss: Remove .set_hdmi_mode() and .set_infoframe() operations
drm/omap: venc: Register a drm_bridge
drm/omap: Create connector for bridges
drm/omap: Switch the HDMI and VENC outputs to drm_bridge
drm/omap: Remove HPD, detect and EDID omapdss operations
drm/omap: hdmi: Remove omap_dss_device operations
drm/omap: venc: Remove omap_dss_device operations
drm/omap: hdmi4: Simplify EDID read
drm/omap: hdmi5: Simplify EDID read
drm/omap: displays: Remove unused panel drivers
drm/omap: dpi: Sort includes alphabetically
drm/omap: dpi: Reorder functions in sections
drm/omap: dpi: Simplify clock setting API
drm/omap: dpi: Register a drm_bridge
drm/omap: sdi: Sort includes alphabetically
drm/omap: sdi: Register a drm_bridge
drm/omap: Simplify connector implementation
drm/omap: dss: Remove unused omap_dss_device operations
drm/omap: dss: Inline the omapdss_display_get() function
drm/omap: dss: Remove unused omapdss_of_find_connected_device()
function
.../bindings/display/panel/nec,nl8048hl11.txt | 38 +
.../devicetree/bindings/vendor-prefixes.yaml | 4 +
arch/arm/configs/davinci_all_defconfig | 2 +-
arch/arm/configs/integrator_defconfig | 2 +-
arch/arm/configs/multi_v7_defconfig | 2 +-
arch/arm/configs/shmobile_defconfig | 2 +-
arch/arm/configs/sunxi_defconfig | 2 +-
arch/arm/configs/versatile_defconfig | 2 +-
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/arc/arcpgu_hdmi.c | 2 +-
.../gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 2 +-
drivers/gpu/drm/bridge/Kconfig | 29 +-
drivers/gpu/drm/bridge/Makefile | 4 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +-
drivers/gpu/drm/bridge/analogix-anx78xx.c | 6 +-
.../drm/bridge/analogix/analogix_dp_core.c | 8 +-
drivers/gpu/drm/bridge/cdns-dsi.c | 6 +-
drivers/gpu/drm/bridge/display-connector.c | 327 ++++++++
drivers/gpu/drm/bridge/dumb-vga-dac.c | 296 -------
drivers/gpu/drm/bridge/lvds-encoder.c | 4 +-
.../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 6 +-
drivers/gpu/drm/bridge/nxp-ptn3460.c | 6 +-
drivers/gpu/drm/bridge/panel.c | 21 +-
drivers/gpu/drm/bridge/parade-ps8622.c | 5 +-
drivers/gpu/drm/bridge/sii902x.c | 6 +-
drivers/gpu/drm/bridge/sil-sii8620.c | 2 +-
drivers/gpu/drm/bridge/simple-bridge.c | 337 ++++++++
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +-
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 +-
drivers/gpu/drm/bridge/tc358764.c | 5 +-
drivers/gpu/drm/bridge/tc358767.c | 5 +-
drivers/gpu/drm/bridge/thc63lvd1024.c | 5 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 +-
drivers/gpu/drm/bridge/ti-tfp410.c | 202 ++---
drivers/gpu/drm/bridge/ti-tpd12s015.c | 204 +++++
drivers/gpu/drm/drm_bridge.c | 97 ++-
drivers/gpu/drm/drm_bridge_connector.c | 385 +++++++++
drivers/gpu/drm/drm_edid.c | 8 +-
drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
drivers/gpu/drm/exynos/exynos_dp.c | 3 +-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +-
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 2 +-
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 2 +-
drivers/gpu/drm/i2c/tda998x_drv.c | 8 +-
drivers/gpu/drm/imx/imx-ldb.c | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 2 +-
drivers/gpu/drm/mcde/mcde_dsi.c | 6 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_hdmi.c | 8 +-
drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 +-
drivers/gpu/drm/msm/edp/edp_bridge.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +-
drivers/gpu/drm/omapdrm/displays/Kconfig | 60 --
drivers/gpu/drm/omapdrm/displays/Makefile | 10 -
.../omapdrm/displays/connector-analog-tv.c | 100 ---
.../gpu/drm/omapdrm/displays/connector-hdmi.c | 186 -----
.../gpu/drm/omapdrm/displays/encoder-opa362.c | 140 ----
.../drm/omapdrm/displays/encoder-tpd12s015.c | 220 -----
.../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +-
.../displays/panel-lgphilips-lb035q02.c | 254 ------
.../omapdrm/displays/panel-nec-nl8048hl11.c | 271 -------
.../displays/panel-sharp-ls037v7dw01.c | 265 ------
.../omapdrm/displays/panel-sony-acx565akm.c | 766 ------------------
.../omapdrm/displays/panel-tpo-td028ttec1.c | 401 ---------
.../omapdrm/displays/panel-tpo-td043mtea1.c | 513 ------------
drivers/gpu/drm/omapdrm/dss/Makefile | 2 +-
drivers/gpu/drm/omapdrm/dss/base.c | 72 +-
drivers/gpu/drm/omapdrm/dss/display.c | 9 -
drivers/gpu/drm/omapdrm/dss/dpi.c | 336 ++++----
drivers/gpu/drm/omapdrm/dss/dsi.c | 4 +-
drivers/gpu/drm/omapdrm/dss/dss-of.c | 28 -
drivers/gpu/drm/omapdrm/dss/dss.c | 3 +-
drivers/gpu/drm/omapdrm/dss/hdmi.h | 4 +-
drivers/gpu/drm/omapdrm/dss/hdmi4.c | 321 ++++----
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 59 +-
drivers/gpu/drm/omapdrm/dss/hdmi4_core.h | 4 +-
drivers/gpu/drm/omapdrm/dss/hdmi5.c | 303 +++----
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 48 +-
drivers/gpu/drm/omapdrm/dss/hdmi5_core.h | 5 +-
.../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 12 -
drivers/gpu/drm/omapdrm/dss/omapdss.h | 47 +-
drivers/gpu/drm/omapdrm/dss/output.c | 55 +-
drivers/gpu/drm/omapdrm/dss/sdi.c | 187 +++--
drivers/gpu/drm/omapdrm/dss/venc.c | 269 +++---
drivers/gpu/drm/omapdrm/omap_connector.c | 246 +-----
drivers/gpu/drm/omapdrm/omap_connector.h | 3 -
drivers/gpu/drm/omapdrm/omap_drv.c | 98 ++-
drivers/gpu/drm/omapdrm/omap_encoder.c | 83 +-
drivers/gpu/drm/panel/Kconfig | 44 +
drivers/gpu/drm/panel/Makefile | 6 +
drivers/gpu/drm/panel/panel-lg-lb035q02.c | 235 ++++++
drivers/gpu/drm/panel/panel-nec-nl8048hl11.c | 249 ++++++
.../gpu/drm/panel/panel-sharp-ls037v7dw01.c | 231 ++++++
drivers/gpu/drm/panel/panel-sony-acx565akm.c | 691 ++++++++++++++++
drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 382 +++++++++
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 510 ++++++++++++
drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_lvds.c | 7 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +-
drivers/gpu/drm/sti/sti_dvo.c | 2 +-
drivers/gpu/drm/sti/sti_hda.c | 2 +-
drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
drivers/gpu/drm/stm/ltdc.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_external.c | 2 +-
drivers/gpu/drm/vc4/vc4_dpi.c | 2 +-
drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
drivers/video/hdmi.c | 9 +-
include/drm/drm_bridge.h | 174 +++-
include/drm/drm_bridge_connector.h | 18 +
include/drm/drm_connector.h | 5 +
include/linux/hdmi.h | 2 +-
116 files changed, 5188 insertions(+), 4900 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.txt
create mode 100644 drivers/gpu/drm/bridge/display-connector.c
delete mode 100644 drivers/gpu/drm/bridge/dumb-vga-dac.c
create mode 100644 drivers/gpu/drm/bridge/simple-bridge.c
create mode 100644 drivers/gpu/drm/bridge/ti-tpd12s015.c
create mode 100644 drivers/gpu/drm/drm_bridge_connector.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
delete mode 100644 drivers/gpu/drm/omapdrm/dss/dss-of.c
create mode 100644 drivers/gpu/drm/panel/panel-lg-lb035q02.c
create mode 100644 drivers/gpu/drm/panel/panel-nec-nl8048hl11.c
create mode 100644 drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c
create mode 100644 drivers/gpu/drm/panel/panel-sony-acx565akm.c
create mode 100644 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
create mode 100644 drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
create mode 100644 include/drm/drm_bridge_connector.h
--
Regards,
Laurent Pinchart
[View Less]
https://bugzilla.kernel.org/show_bug.cgi?id=64721
Bug ID: 64721
Summary: Radeon HD6450 fails on all distro's out of box.
Product: Drivers
Version: 2.5
Kernel Version: Linux 3.2.04-amd64
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri(a)kernel-bugs.osdl.org
…
[View More] Reporter: ichapman(a)videotron.ca
Regression: No
I think I'm at the right place to report video card frustrations.
Radeon HD450 fails to work out of the box with any Linux.
With Debian Wheezy I need to edit the grub line starting with linux and add
vga=791 to do anything. vga=771 fails
With Knoppix 7.0 I need vga=771 and that's okay, but vga=791 the left half of
screen is on right and right on left. The cursor moves to right falls off the
screen and re-appears on left side. Very strange.
With DebianMint I need vga=771 or 791 to get it to work.
On my Acer Aspire laptop with a Radeon HD6310 I do not need any of this vga=
stuff.
I am sure that this is not a driver problem. All the vga=xxx does is kick it
somewhere so that I loads the driver.
My Motherboard is M2V-Mx from Asus and once the /etc/default/grub is fixed with
GRUB_CMDLINE_LINUX="vga=791" or 771 it's okay. (sudo update-grub of course)
I recently junked my Nvidia 8500GT video because the driver for that became
sick, the worst feature was not being able to display the layout of the pcb
tool unless I disabled the driver and used cpu sw rendering on the video but
that's an other story. Ian.
--
You are receiving this mail because:
You are watching the assignee of the bug.
[View Less]
Hello,
This patch series (nearly, see [1]) completes the rework of the omapdrm
driver to move to drm_bridge and drm_panel.
Let's start with some context (copied from v1) to understand the
problem. omapdrm contains custom drivers for external encoders, panels
and connectors (collectively referred to as display drivers). It
combines them to create output pipelines abstracted by a drm_encoder and
a drm_connector, with the ability to delegate the encoder and connector
operations to the component …
[View More]in the pipeline that implements them. For
instance, for an HDMI output pipeline, the hot plug detection and the
EDID read can be implemented by two different components, when they are
handled by two different devices at the hardware level.
DRM/KMS uses drm_bridge and drm_panel to abstract external encoders and
panels. The model is however simpler than what omapdrm provides, as
bridges were designed to be simple add-ons at the output of a
drm_encoder. The ability to chain bridges exists, but a bridge driver
hardcodes in its design its position in the pipeline : bridges that
expect to terminate the pipeline create a drm_connector, while bridges
that expect to be an intermediate component in the pipeline do not
create a connector. In addition to not supporting bridges that can be
either internal or a termination point in the pipeline depending on the
hardware design, implementing the drm_connector inside a bridge driver
makes it impossible to support hardware where bridge operations are
handled by different hardware components, as explained above.
The omapdrm driver has received support for drm_bridge and drm_panel,
but these issues prevented completely moving away from the omapdrm
custom display drivers. This patch series thus first reworks the
drm_bridge infrastructure to support the omapdrm use cases, and then
transitions the omapdrm driver.
The series starts with a small drive-by cleanup (01/50), followed by a
new helper (02/50) that leverages data from drm_connector.c to convert a
connector type to a string. Patch 03/50 then adds a new flag to the
drm_display_info structure to identify HDMI sinks. This is a feature
needed by the OMAP4 and OMAP5 HDMI encoders, and I believe it can be
useful to other HDMI encoders as well.
The next two patches address the drm_bridge issues explained above.
Patch 04/50 adds connector-related operations to drm_bridge, and patch
05/50 makes it possible to attach to a bridge without having the bridge
create a connector. The connector is expected to be created by the
display controller driver.
The approach taken here is slightly intrusive as path 05/50 adds a
parameter to the bridge .attach() operation, and thus touches all bridge
drivers, even if the changes are very simple (as a consequence I haven't
CC'ed all the individual bridge maintainers as the CC list was too
large). Other options may be possible, what matters most to me is the
feature, not so much its implementation. Please note that compared to v1
this version uses a flag bitmask instead of a boolean on Andrzej's
request, as he expects the parameter to be useful for other purposes.
The first sizeable change follows with the rename of the dumb-vga-dac
driver to simple-bridge (06/50 and 07/50) and support for non-VGA
bridges (08/50). This doesn't change the spirit of the driver that still
focusses on transparent bridges, but prepares it to support an analog
video amplifier. Patches 09/50 then add support for an enable GPIO, and
10/50 support for the OPA362 video amplifier itself.
The next six patches make use of these new features: patches 11/50 and
12/50 add new bridge drivers for display connectors and for the TI
TPD12S015 HDMI level shifter respectively, patch 13/50 supports the new
API in the panel bridge driver, and patches 15/50 to 16/50 do the same
in the ti-tfp410 driver.
Patch 17/50 is possibly the most remarkable one in the series, with the
drm_bridge operations extension, as it provides a helper for display
controller drivers to construct a drm_connector entirerly backed by a
chain of bridges. This offsets the complexity of the additional bridge
operations by handling it all in a single place. An example usage for
omapdrm can be found in patch 34/50. Don't let its diffstat mislead you,
usage of the helper would remove lots of code if it wasn't for the fact
that the legacy implementation still has to be kept for the DSI panel
(see [1]). Down the road this helper and the new operation paradigm
should remove code from both display controller and bridge drivers.
The rest of the series is omapdrm-focussed, slowly preparing the driver
for the switch to drm_bridge drivers using the new helper (34/50), the
removal of the omapdrm-specific display drivers (35/50), and lots of
simplification and code removal in the other patches.
Compared to v1, many review comments have been taken into account, please
see individual patches for details. Please note that some issues are
still being discussed and have thus not been addressed yet. This
includes HPD handling and removal of the drm_connector argument from the
drm_bridge .get_edid() operation.
The patches can be found at
git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
[1] The only notable exception is the omapdrm-specific DSI panel driver
that implements a large number of custom operations. This should be
addressed separately.
Laurent Pinchart (50):
video: hdmi: Change return type of hdmi_avi_infoframe_init() to void
drm/connector: Add helper to get a connector type name
drm/edid: Add flag to drm_display_info to identify HDMI sinks
drm/bridge: Add connector-related bridge operations and data
drm/bridge: Extend bridge API to disable connector creation
drm/bridge: dumb-vga-dac: Rename internal symbols to simple-bridge
drm/bridge: dumb-vga-dac: Rename driver to simple-bridge
drm/bridge: simple-bridge: Add support for non-VGA bridges
drm/bridge: simple-bridge: Add support for enable GPIO
drm/bridge: simple-bridge: Add support for the TI OP362
drm/bridge: Add bridge driver for display connectors
drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter
drm/bridge: panel: Implement bridge connector operations
drm/bridge: tfp410: Don't include drmP.h
drm/bridge: tfp410: Replace manual connector handling with bridge
drm/bridge: tfp410: Allow operation without drm_connector
drm: Add helper to create a connector for a chain of bridges
drm/omap: Simplify HDMI mode and infoframe configuration
drm/omap: Factor out display type to connector type conversion
drm/omap: Use the drm_panel_bridge API
drm/omap: dss: Fix output next device lookup in DT
drm/omap: Add infrastructure to support drm_bridge local to DSS
outputs
drm/omap: dss: Make omap_dss_device_ops optional
drm/omap: hdmi: Allocate EDID in the .read_edid() operation
drm/omap: hdmi4: Rework EDID read to isolate data read
drm/omap: hdmi5: Rework EDID read to isolate data read
drm/omap: hdmi4: Register a drm_bridge for EDID read
drm/omap: hdmi5: Register a drm_bridge for EDID read
drm/omap: hdmi4: Move mode set, enable and disable operations to
bridge
drm/omap: hdmi5: Move mode set, enable and disable operations to
bridge
drm/omap: hdmi4: Implement drm_bridge .hpd_notify() operation
drm/omap: dss: Remove .set_hdmi_mode() and .set_infoframe() operations
drm/omap: venc: Register a drm_bridge
drm/omap: Create connector for bridges
drm/omap: Switch the HDMI and VENC outputs to drm_bridge
drm/omap: Remove HPD, detect and EDID omapdss operations
drm/omap: hdmi: Remove omap_dss_device operations
drm/omap: venc: Remove omap_dss_device operations
drm/omap: hdmi4: Simplify EDID read
drm/omap: hdmi5: Simplify EDID read
drm/omap: dpi: Sort includes alphabetically
drm/omap: dpi: Reorder functions in sections
drm/omap: dpi: Simplify clock setting API
drm/omap: dpi: Register a drm_bridge
drm/omap: sdi: Sort includes alphabetically
drm/omap: sdi: Register a drm_bridge
drm/omap: Simplify connector implementation
drm/omap: dss: Remove unused omap_dss_device operations
drm/omap: dss: Inline the omapdss_display_get() function
drm/omap: dss: Remove unused omapdss_of_find_connected_device()
function
Documentation/gpu/todo.rst | 12 +
arch/arm/configs/davinci_all_defconfig | 2 +-
arch/arm/configs/integrator_defconfig | 2 +-
arch/arm/configs/multi_v7_defconfig | 2 +-
arch/arm/configs/shmobile_defconfig | 2 +-
arch/arm/configs/sunxi_defconfig | 2 +-
arch/arm/configs/versatile_defconfig | 2 +-
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/arc/arcpgu_hdmi.c | 2 +-
.../gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 2 +-
drivers/gpu/drm/bridge/Kconfig | 29 +-
drivers/gpu/drm/bridge/Makefile | 4 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +-
drivers/gpu/drm/bridge/analogix-anx78xx.c | 6 +-
.../drm/bridge/analogix/analogix_dp_core.c | 8 +-
drivers/gpu/drm/bridge/cdns-dsi.c | 6 +-
drivers/gpu/drm/bridge/display-connector.c | 292 ++++++++++++++
drivers/gpu/drm/bridge/dumb-vga-dac.c | 299 --------------
drivers/gpu/drm/bridge/lvds-encoder.c | 5 +-
.../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 6 +-
drivers/gpu/drm/bridge/nxp-ptn3460.c | 6 +-
drivers/gpu/drm/bridge/panel.c | 22 +-
drivers/gpu/drm/bridge/parade-ps8622.c | 6 +-
drivers/gpu/drm/bridge/sii902x.c | 6 +-
drivers/gpu/drm/bridge/sil-sii8620.c | 3 +-
drivers/gpu/drm/bridge/simple-bridge.c | 339 ++++++++++++++++
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +-
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 +-
drivers/gpu/drm/bridge/tc358764.c | 6 +-
drivers/gpu/drm/bridge/tc358767.c | 6 +-
drivers/gpu/drm/bridge/thc63lvd1024.c | 5 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 6 +-
drivers/gpu/drm/bridge/ti-tfp410.c | 205 ++++------
drivers/gpu/drm/bridge/ti-tpd12s015.c | 195 +++++++++
drivers/gpu/drm/drm_bridge.c | 100 ++++-
drivers/gpu/drm/drm_bridge_connector.c | 372 ++++++++++++++++++
drivers/gpu/drm/drm_connector.c | 15 +
drivers/gpu/drm/drm_edid.c | 11 +-
drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
drivers/gpu/drm/exynos/exynos_dp.c | 3 +-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +-
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 2 +-
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 2 +-
drivers/gpu/drm/i2c/tda998x_drv.c | 8 +-
drivers/gpu/drm/imx/imx-ldb.c | 2 +-
drivers/gpu/drm/imx/parallel-display.c | 2 +-
drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
drivers/gpu/drm/mcde/mcde_dsi.c | 8 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
drivers/gpu/drm/mediatek/mtk_hdmi.c | 8 +-
drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 +-
drivers/gpu/drm/msm/edp/edp_bridge.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +-
drivers/gpu/drm/omapdrm/displays/Kconfig | 22 --
drivers/gpu/drm/omapdrm/displays/Makefile | 4 -
.../omapdrm/displays/connector-analog-tv.c | 97 -----
.../gpu/drm/omapdrm/displays/connector-hdmi.c | 183 ---------
.../gpu/drm/omapdrm/displays/encoder-opa362.c | 137 -------
.../drm/omapdrm/displays/encoder-tpd12s015.c | 217 ----------
.../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +-
drivers/gpu/drm/omapdrm/dss/Makefile | 2 +-
drivers/gpu/drm/omapdrm/dss/base.c | 71 ++--
drivers/gpu/drm/omapdrm/dss/display.c | 9 -
drivers/gpu/drm/omapdrm/dss/dpi.c | 337 +++++++++-------
drivers/gpu/drm/omapdrm/dss/dsi.c | 4 +-
drivers/gpu/drm/omapdrm/dss/dss-of.c | 28 --
drivers/gpu/drm/omapdrm/dss/dss.c | 3 +-
drivers/gpu/drm/omapdrm/dss/hdmi.h | 4 +-
drivers/gpu/drm/omapdrm/dss/hdmi4.c | 324 ++++++++-------
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 59 +--
drivers/gpu/drm/omapdrm/dss/hdmi4_core.h | 4 +-
drivers/gpu/drm/omapdrm/dss/hdmi5.c | 304 +++++++-------
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 48 +--
drivers/gpu/drm/omapdrm/dss/hdmi5_core.h | 5 +-
.../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 5 -
drivers/gpu/drm/omapdrm/dss/omapdss.h | 47 +--
drivers/gpu/drm/omapdrm/dss/output.c | 55 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 188 +++++----
drivers/gpu/drm/omapdrm/dss/venc.c | 270 +++++++------
drivers/gpu/drm/omapdrm/omap_connector.c | 246 +-----------
drivers/gpu/drm/omapdrm/omap_connector.h | 3 -
drivers/gpu/drm/omapdrm/omap_drv.c | 96 +++--
drivers/gpu/drm/omapdrm/omap_encoder.c | 83 +---
drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_lvds.c | 8 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +-
drivers/gpu/drm/sti/sti_dvo.c | 2 +-
drivers/gpu/drm/sti/sti_hda.c | 2 +-
drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
drivers/gpu/drm/stm/ltdc.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_external.c | 2 +-
drivers/gpu/drm/vc4/vc4_dpi.c | 2 +-
drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
drivers/video/hdmi.c | 11 +-
include/drm/drm_bridge.h | 197 +++++++++-
include/drm/drm_bridge_connector.h | 18 +
include/drm/drm_connector.h | 9 +
include/linux/hdmi.h | 2 +-
103 files changed, 2819 insertions(+), 2375 deletions(-)
create mode 100644 drivers/gpu/drm/bridge/display-connector.c
delete mode 100644 drivers/gpu/drm/bridge/dumb-vga-dac.c
create mode 100644 drivers/gpu/drm/bridge/simple-bridge.c
create mode 100644 drivers/gpu/drm/bridge/ti-tpd12s015.c
create mode 100644 drivers/gpu/drm/drm_bridge_connector.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
delete mode 100644 drivers/gpu/drm/omapdrm/dss/dss-of.c
create mode 100644 include/drm/drm_bridge_connector.h
--
Regards,
Laurent Pinchart
[View Less]
The first 9 patches replaces direct use of the drm_panel
function pointers with their drm_panel_* counterparts.
The function pointers are only supposed to be used by
the drm_panel infrastructure and direct use are discouraged.
ili9322 is updated to handle bus_flags in get_modes like everyone else.
This is in preparation for a later patch series where controller
becomes an arugument to get_modes() and not like today where drm_panel
is attached to a controller.
The remaining patches move …
[View More]functionality to the drm_panel core that
today are repeated in many drivers.
As preparation for this the inline functions are moved to drm_panel.c
and kernel-doc is made inline.
panel-simple is updated to benefit from the additional infrastructure
and is an example for the simplifications that can be done.
The patchset has been tested on my embedded target,
and build tested.
Feedback welcome!
The "fix opencoded" patches are all independent and can be applied
out of order. They were kept here to keep panel related patches in one series.
Sam
Cc: Alexios Zavras <alexios.zavras(a)intel.com>
Cc: Alison Wang <alison.wang(a)nxp.com>
Cc: Allison Randal <allison(a)lohutok.net>
Cc: Andrzej Hajda <a.hajda(a)samsung.com>
Cc: Benjamin Gaignard <benjamin.gaignard(a)linaro.org>
Cc: Daniel Vetter <daniel(a)ffwll.ch>
Cc: David Airlie <airlied(a)linux.ie>
Cc: Enrico Weigelt <info(a)metux.net>
Cc: Fabio Estevam <festevam(a)gmail.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun(a)intel.com>
Cc: Inki Dae <inki.dae(a)samsung.com>
Cc: Jernej Skrabec <jernej.skrabec(a)siol.net>
Cc: Jonas Karlman <jonas(a)kwiboo.se>
Cc: Jonathan Hunter <jonathanh(a)nvidia.com>
Cc: Joonyoung Shim <jy0922.shim(a)samsung.com>
Cc: Krzysztof Kozlowski <krzk(a)kernel.org>
Cc: Kukjin Kim <kgene(a)kernel.org>
Cc: Kyungmin Park <kyungmin.park(a)samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart(a)ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas(a)ideasonboard.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: linux-arm-kernel(a)lists.infradead.org
Cc: linux-samsung-soc(a)vger.kernel.org
Cc: linux-tegra(a)vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
Cc: Marek Vasut <marex(a)denx.de>
Cc: Maxime Ripard <maxime.ripard(a)bootlin.com>
Cc: Neil Armstrong <narmstrong(a)baylibre.com>
Cc: NXP Linux Team <linux-imx(a)nxp.com>
Cc: Pengutronix Kernel Team <kernel(a)pengutronix.de>
Cc: Philipp Zabel <p.zabel(a)pengutronix.de>
Cc: Sam Ravnborg <sam(a)ravnborg.org>
Cc: Sascha Hauer <s.hauer(a)pengutronix.de>
Cc: Sean Paul <sean(a)poorly.run>
Cc: Seung-Woo Kim <sw0312.kim(a)samsung.com>
Cc: Shawn Guo <shawnguo(a)kernel.org>
Cc: Stefan Agner <stefan(a)agner.ch>
Cc: Thierry Reding <thierry.reding(a)gmail.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Vincent Abriou <vincent.abriou(a)st.com>
Sam Ravnborg (16):
drm/bridge: tc358767: fix opencoded use of drm_panel_*
drm/exynos: fix opencoded use of drm_panel_*
drm/exynos: fix opencoded use of drm_panel_*
drm/imx: fix opencoded use of drm_panel_*
drm/fsl-dcu: fix opencoded use of drm_panel_*
drm/msm: fix opencoded use of drm_panel_*
drm/mxsfb: fix opencoded use of drm_panel_*
drm/sti: fix opencoded use of drm_panel_*
drm/tegra: fix opencoded use of drm_panel_*
drm/panel: ili9322: move bus_flags to get_modes()
drm/panel: move drm_panel functions to .c file
drm/panel: use inline comments in drm_panel.h
drm/panel: drop return code from drm_panel_detach()
drm/panel: call prepare/enable only once
drm/panel: add backlight support
drm/panel: simple: use drm_panel infrastructure
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 3 +-
drivers/gpu/drm/bridge/tc358767.c | 10 +-
drivers/gpu/drm/drm_panel.c | 185 ++++++++++++++++-
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 4 +-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 10 +-
drivers/gpu/drm/imx/imx-ldb.c | 11 +-
drivers/gpu/drm/imx/parallel-display.c | 11 +-
.../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 +-
drivers/gpu/drm/mxsfb/mxsfb_out.c | 2 +-
drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 34 ++-
drivers/gpu/drm/panel/panel-simple.c | 73 +------
drivers/gpu/drm/sti/sti_dvo.c | 8 +-
drivers/gpu/drm/tegra/output.c | 2 +-
include/drm/drm_panel.h | 227 +++++++++++----------
15 files changed, 349 insertions(+), 235 deletions(-)
[View Less]
drm_dp_link_rate_to_bw_code and ...bw_code_to_link_rate simply divide by
and multiply with 27000, respectively. Avoid an overflow in the u8 dpcd[0]
and the multiply+divide alltogether.
fixes: ff1e8fb68ea06027 ("analogix-anx78xx: Avoid drm_dp_link helpers")
Signed-off-by: Torsten Duwe <duwe(a)suse.de>
---
Has anybody actually tested ff1e8fb68ea06027 ? I copied that code in good
faith for the anx6345 and changed a few other things simultaneously, and
spent some time wondering why the panel …
[View More]stayed dark.
---
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 41867be03751..864423f59d66 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -722,10 +722,9 @@ static int anx78xx_dp_link_training(struct anx78xx *anx78xx)
if (err)
return err;
- dpcd[0] = drm_dp_max_link_rate(anx78xx->dpcd);
- dpcd[0] = drm_dp_link_rate_to_bw_code(dpcd[0]);
err = regmap_write(anx78xx->map[I2C_IDX_TX_P0],
- SP_DP_MAIN_LINK_BW_SET_REG, dpcd[0]);
+ SP_DP_MAIN_LINK_BW_SET_REG,
+ anx78xx->dpcd[DP_MAX_LINK_RATE]);
if (err)
return err;
[View Less]
The constant N value (0x8000) is used by multiple DP
drivers. Define this value in header file and use this
in the existing i915 display driver.
Signed-off-by: Chandan Uddaraju <chandanu(a)codeaurora.org>
---
drivers/gpu/drm/i915/display/intel_display.c | 2 +-
include/drm/drm_dp_helper.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index ce05e80..1a4ccfd …
[View More]100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7496,7 +7496,7 @@ static void compute_m_n(unsigned int m, unsigned int n,
* which the devices expect also in synchronous clock mode.
*/
if (constant_n)
- *ret_n = 0x8000;
+ *ret_n = DP_LINK_CONSTANT_N_VALUE;
else
*ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 8364502..69b8251 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1357,6 +1357,7 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
* DisplayPort link
*/
#define DP_LINK_CAP_ENHANCED_FRAMING (1 << 0)
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
struct drm_dp_link {
unsigned char revision;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
[View Less]
Add bindings for Snapdragon 845 DisplayPort and
display-port PLL driver.
Changes in V2:
Provide details about sel-gpio
Signed-off-by: Chandan Uddaraju <chandanu(a)codeaurora.org>
---
.../devicetree/bindings/display/msm/dp.txt | 249 +++++++++++++++++++++
.../devicetree/bindings/display/msm/dpu.txt | 16 +-
2 files changed, 261 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/msm/dp.txt
diff --git a/Documentation/devicetree/…
[View More]bindings/display/msm/dp.txt b/Documentation/devicetree/bindings/display/msm/dp.txt
new file mode 100644
index 0000000..38be36d
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/msm/dp.txt
@@ -0,0 +1,249 @@
+Qualcomm Technologies, Inc.
+DP is the master Display Port device which supports DP host controllers that are compatible with VESA Display Port interface specification.
+DP Controller: Required properties:
+- compatible: Should be "qcom,dp-display".
+- reg: Base address and length of DP hardware's memory mapped regions.
+- cell-index: Specifies the controller instance.
+- reg-names: A list of strings that name the list of regs.
+ "dp_ahb" - DP controller memory region.
+ "dp_aux" - DP AUX memory region.
+ "dp_link" - DP link layer memory region.
+ "dp_p0" - DP pixel clock domain memory region.
+ "dp_phy" - DP PHY memory region.
+ "dp_ln_tx0" - USB3 DP PHY combo TX-0 lane memory region.
+ "dp_ln_tx1" - USB3 DP PHY combo TX-1 lane memory region.
+ "dp_mmss_cc" - Display Clock Control memory region.
+ "qfprom_physical" - QFPROM Phys memory region.
+ "dp_pll" - USB3 DP combo PLL memory region.
+ "usb3_dp_com" - USB3 DP PHY combo memory region.
+ "hdcp_physical" - DP HDCP memory region.
+- interrupt-parent phandle to the interrupt parent device node.
+- interrupts: The interrupt signal from the DP block.
+- clocks: Clocks required for Display Port operation. See [1] for details on clock bindings.
+- clock-names: Names of the clocks corresponding to handles. Following clocks are required:
+ "core_aux_clk", "core_usb_ref_clk_src","core_usb_ref_clk", "core_usb_cfg_ahb_clk",
+ "core_usb_pipe_clk", "ctrl_link_clk", "ctrl_link_iface_clk", "ctrl_crypto_clk",
+ "ctrl_pixel_clk", "pixel_clk_rcg", "pixel_parent".
+- pll-node: phandle to DP PLL node.
+- vdda-1p2-supply: phandle to vdda 1.2V regulator node.
+- vdda-0p9-supply: phandle to vdda 0.9V regulator node.
+- qcom,aux-cfg0-settings: Specifies the DP AUX configuration 0 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg1-settings: Specifies the DP AUX configuration 1 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg2-settings: Specifies the DP AUX configuration 2 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg3-settings: Specifies the DP AUX configuration 3 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg4-settings: Specifies the DP AUX configuration 4 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg5-settings: Specifies the DP AUX configuration 5 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg6-settings: Specifies the DP AUX configuration 6 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg7-settings: Specifies the DP AUX configuration 7 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg8-settings: Specifies the DP AUX configuration 8 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,aux-cfg9-settings: Specifies the DP AUX configuration 9 settings. The first
+ entry in this array corresponds to the register offset
+ within DP AUX, while the remaining entries indicate the
+ programmable values.
+- qcom,max-pclk-frequency-khz: An integer specifying the maximum. pixel clock in KHz supported by Display Port.
+- extcon: Phandle for the external connector class interface.
+- qcom,<type>-supply-entries: A node that lists the elements of the supply used by the a particular "type" of DP module. The module "types"
+ can be "core", "ctrl", and "phy". Within the same type,
+ there can be more than one instance of this binding,
+ in which case the entry would be appended with the
+ supply entry index.
+ e.g. qcom,ctrl-supply-entry@0
+ -- qcom,supply-name: name of the supply (vdd/vdda/vddio)
+ -- qcom,supply-min-voltage: minimum voltage level (uV)
+ -- qcom,supply-max-voltage: maximum voltage level (uV)
+ -- qcom,supply-enable-load: load drawn (uA) from enabled supply
+ -- qcom,supply-disable-load: load drawn (uA) from disabled supply
+ -- qcom,supply-pre-on-sleep: time to sleep (ms) before turning on
+ -- qcom,supply-post-on-sleep: time to sleep (ms) after turning on
+ -- qcom,supply-pre-off-sleep: time to sleep (ms) before turning off
+ -- qcom,supply-post-off-sleep: time to sleep (ms) after turning off
+- pinctrl-names: List of names to assign mdss pin states defined in pinctrl device node
+ Refer to pinctrl-bindings.txt
+- pinctrl-<0..n>: Lists phandles each pointing to the pin configuration node within a pin
+ controller. These pin configurations are installed in the pinctrl
+ device node. Refer to pinctrl-bindings.txt
+DP Endpoint properties:
+ - remote-endpoint: For port@0, set to phandle of the connected panel/bridge's
+ input endpoint. For port@1, set to the DPU interface output. See [2] for
+ device graph info.
+
+Optional properties:
+- qcom,aux-en-gpio: Specifies the aux-channel enable gpio.
+- qcom,aux-sel-gpio: Specifies the mux-selection that might be needed for aux interface.
+
+
+DP PLL: Required properties:
+- compatible: Should be "qcom,dp-pll-10nm".
+- reg: Base address and length of DP hardware's memory mapped regions.
+- cell-index: Specifies the PLL instance.
+- reg-names: A list of strings that name the list of regs.
+ "pll_base" - DP PLL memory region.
+ "phy_base" - DP PHY memory region.
+ "ln_tx0_base" - USB3 DP PHY combo TX-0 lane memory region.
+ "ln_tx1_base" - USB3 DP PHY combo TX-1 lane memory region.
+ "gdsc_base" - gdsc memory region.
+- interrupt-parent phandle to the interrupt parent device node.
+- interrupts: The interrupt signal from the DP block.
+- clocks: Clocks required for Display Port operation. See [1] for details on clock bindings.
+- clock-names: Names of the clocks corresponding to handles. Following clocks are required:
+ "iface_clk", "ref_clk", cfg_ahb_clk", "pipe_clk".
+- clock-rate: Initial clock rate to be configured. For the shared clocks, the default value is set to zero so that minimum clock value is configured. Non-zero clock
+ value can be used to configure DP pixel clock.
+
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+[2] Documentation/devicetree/bindings/graph.txt
+
+Example:
+ msm_dp: dp_display@ae90000{
+ cell-index = <0>;
+ compatible = "qcom,dp-display";
+
+ reg = <0 0x90000 0x0dc>,
+ <0 0x90200 0x0c0>,
+ <0 0x90400 0x508>,
+ <0 0x90a00 0x094>,
+ <1 0xeaa00 0x200>,
+ <1 0xea200 0x200>,
+ <1 0xea600 0x200>,
+ <2 0x02000 0x1a0>,
+ <3 0x00000 0x621c>,
+ <1 0xea000 0x180>,
+ <1 0xe8000 0x20>,
+ <4 0xe1000 0x034>;
+ reg-names = "dp_ahb", "dp_aux", "dp_link",
+ "dp_p0", "dp_phy", "dp_ln_tx0", "dp_ln_tx1",
+ "dp_mmss_cc", "qfprom_physical", "dp_pll",
+ "usb3_dp_com", "hdcp_physical";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <12 0>;
+
+ extcon = <&usb_1_ssphy>;
+ clocks = <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_CRYPTO_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
+ clock-names = "core_aux_clk", "core_ref_clk_src",
+ "core_usb_ref_clk", "core_usb_cfg_ahb_clk",
+ "core_usb_pipe_clk", "ctrl_link_clk",
+ "ctrl_link_iface_clk", "ctrl_pixel_clk",
+ "crypto_clk", "pixel_clk_rcg";
+
+ pll-node = <&dp_pll>;
+ qcom,aux-cfg0-settings = [20 00];
+ qcom,aux-cfg1-settings = [24 13 23 1d];
+ qcom,aux-cfg2-settings = [28 24];
+ qcom,aux-cfg3-settings = [2c 00];
+ qcom,aux-cfg4-settings = [30 0a];
+ qcom,aux-cfg5-settings = [34 26];
+ qcom,aux-cfg6-settings = [38 0a];
+ qcom,aux-cfg7-settings = [3c 03];
+ qcom,aux-cfg8-settings = [40 bb];
+ qcom,aux-cfg9-settings = [44 03];
+
+ qcom,max-pclk-frequency-khz = <675000>;
+
+ qcom,ctrl-supply-entries {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ qcom,ctrl-supply-entry@0 {
+ reg = <0>;
+ qcom,supply-name = "vdda-1p2";
+ qcom,supply-min-voltage = <1200000>;
+ qcom,supply-max-voltage = <1200000>;
+ qcom,supply-enable-load = <21800>;
+ qcom,supply-disable-load = <4>;
+ };
+ };
+
+ qcom,phy-supply-entries {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ qcom,phy-supply-entry@0 {
+ reg = <0>;
+ qcom,supply-name = "vdda-0p9";
+ qcom,supply-min-voltage = <880000>;
+ qcom,supply-max-voltage = <880000>;
+ qcom,supply-enable-load = <36000>;
+ qcom,supply-disable-load = <32>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dp_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dp_out: endpoint {
+ };
+ };
+ };
+ };
+
+ dp_pll: dp-pll@c011000 {
+ compatible = "qcom,dp-pll-10nm";
+ label = "DP PLL";
+ cell-index = <0>;
+ #clock-cells = <1>;
+
+ reg = <1 0xea000 0x200>,
+ <1 0xeaa00 0x200>,
+ <1 0xea200 0x200>,
+ <1 0xea600 0x200>,
+ <2 0x03000 0x8>;
+ reg-names = "pll_base", "phy_base", "ln_tx0_base",
+ "ln_tx1_base", "gdsc_base";
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "iface_clk", "ref_clk",
+ "cfg_ahb_clk", "pipe_clk";
+ clock-rate = <0>;
+
+ };
diff --git a/Documentation/devicetree/bindings/display/msm/dpu.txt b/Documentation/devicetree/bindings/display/msm/dpu.txt
index a61dd40..eac6e1c 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu.txt
+++ b/Documentation/devicetree/bindings/display/msm/dpu.txt
@@ -63,8 +63,9 @@ Required properties:
Documentation/devicetree/bindings/graph.txt
Documentation/devicetree/bindings/media/video-interfaces.txt
- Port 0 -> DPU_INTF1 (DSI1)
- Port 1 -> DPU_INTF2 (DSI2)
+ Port 0 -> DPU_INTF0 (DP)
+ Port 1 -> DPU_INTF1 (DSI1)
+ Port 2 -> DPU_INTF2 (DSI2)
Optional properties:
- assigned-clocks: list of clock specifiers for clocks needing rate assignment
@@ -125,13 +126,20 @@ Example:
port@0 {
reg = <0>;
- dpu_intf1_out: endpoint {
- remote-endpoint = <&dsi0_in>;
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&dp_in>;
};
};
port@1 {
reg = <1>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&dsi0_in>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
dpu_intf2_out: endpoint {
remote-endpoint = <&dsi1_in>;
};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
[View Less]