1
0
Fork 0
Commit Graph

664304 Commits (2021d5b7d9f404bcb91301ececdf09a68b856ad7)

Author SHA1 Message Date
Neil Armstrong 2021d5b7d9 drm/meson: Convert existing documentation to actual kerneldoc
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong 8cceda5349 dt-bindings: Add bindings for the Amlogic Meson dw-hdmi extension
This binding describes the Amlogic Meson specific extension to the
Synopsys Designware HDMI Controller.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong 3f68be7d8e drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY
The Amlogic Meson GXBB/GXL/GXM SoCs embeds a Synopsys DesignWare HDMI TX
Controller with a custom Bridge + PHY around the Controller.

This driver makes uses of all the custom PHY plat data callbacks and enables
the compatible HDMI modes to be configured as a drm_encoder instance.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong 335e3713af drm/meson: Add support for HDMI venc modes and settings
This patch adds support for the supported HDMI Venc modes and add the VPP mux
value to switch to ENCP encoder.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong 2f4c95dc3d drm/meson: add support for HDMI clock support
This patchs adds support for the supported HDMI modes clocks frequencies.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong cb110b665e drm/meson: venc_cvbs: no more return -ENODEV if CVBS is not available
Since this is managed now by the components code, if CVBS is not available
and HDMI neither, the drm driver won't bind anyway.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:31 +02:00
Neil Armstrong a41e82e6c4 drm/meson: Add support for components
This patch adds support for optional components connected through the
Device Tree endpoints scheme.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:30 +02:00
Neil Armstrong 8437d59ab3 drm/meson: Add missing HDMI register
Add missing VPU HDMI register.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:30 +02:00
Neil Armstrong cc0c43a045 drm/meson: Use crtc_state for hdisplay and fix atomic flush/enable sync for vsync commit
Clean the crtc_enable by using the proper crtc_state instead of the state
of the primary plane state data.

Also fix the dependency to commit the plane changes even if enable is called
after the flush.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:49:30 +02:00
Neil Armstrong 386d3299ef drm: bridge: dw-hdmi: Move HPD handling to PHY operations
The HDMI TX controller support HPD and RXSENSE signaling from the PHY
via it's STAT0 PHY interface, but some vendor PHYs can manage these
signals independently from the controller, thus these STAT0 handling
should be moved to PHY specific operations and become optional.

The existing STAT0 HPD and RXSENSE handling code is refactored into
a supplementaty set of default PHY operations that are used automatically
when the platform glue doesn't provide its own operations.

Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1491309119-24220-2-git-send-email-narmstrong@baylibre.com
2017-04-04 17:48:21 +02:00
Neil Armstrong e624f516d9 drm: bridge: dw-hdmi: Add Documentation on supported input formats
This patch adds a new DRM documentation entry and links to the input
format table added in the dw_hdmi header.

Reviewed-by: Archit Taneja <architt@codeaurora.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:48:21 +02:00
Neil Armstrong def23aa7e9 drm: bridge: dw-hdmi: Switch to V4L bus format and encodings
Switch code to use the newly introduced V4L bus formats IDs instead of custom
defines. Also use the V4L encoding defines.

Some display pipelines can only provide non-RBG input pixels to the HDMI TX
Controller, this patch takes the pixel format from the plat_data if provided.

Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:48:21 +02:00
Laurent Pinchart a23d6265f0 drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function
In preparation for adding PHY operations to handle RX SENSE and HPD,
group all the PHY interrupt setup code in a single location and extract
it to a separate function.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
[narmstrong: renamed dw_hdmi_fb_registered to dw_hdmi_setup_i2c]
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04 17:48:21 +02:00
Sean Paul 9eb8902e27 Merge tag 'topic/synopsys-media-formats-2017-04-03' of git://anongit.freedesktop.org/git/drm-misc into drm-misc-next
Media formats for synopsys HDMI  TX Controller

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay
2017-04-04 11:34:31 -04:00
Sean Paul c829a33253 Merge airlied/drm-next into drm-misc-next
Backmerging in order to pull vmwgfx [1] and the new synopsys media
format [2] reqs.

[1]- http://patchwork.freedesktop.org/patch/msgid/20170331233255.GA38850@syeh-m02
[2]- http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay

Signed-off-by: Sean Paul <seanpaul@chromium.org>
2017-04-04 11:26:14 -04:00
Gerd Hoffmann 9c4ad466d1 drm: virtio: fix virtio_gpu_mode_dumb_create
Lookup format using virtio_gpu_translate_format()
instead of hardcoding it.  Fixes xorg display on
bigendian guests (i.e. ppc64).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403070845.10793-3-kraxel@redhat.com
2017-04-04 10:10:20 +02:00
Gerd Hoffmann d519cb7618 drm: virtio: add virtio_gpu_translate_format
Factors out code, no functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403070845.10793-2-kraxel@redhat.com
2017-04-04 10:10:19 +02:00
Neil Armstrong 5d5f7c5715 MAINTAINERS: meson-drm: remove useless git repository
Meson DRM is switching to drm-misc, so remove the freedesktop drm/meson-drm
git repository from MAINTAINERS entry.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1491292894-9190-1-git-send-email-narmstrong@baylibre.com
2017-04-04 10:05:17 +02:00
Dave Airlie e1b489d207 omapdrm changes for 4.12
Main changes include:
 
 * Add support for render nodes.
 * Refactor omapdss code to allow multiple DISPC implementations. This is pre-work for DSS6 support.
 * Fix replication logic bug, which caused RGB565 fb to be shown too dark on a 24bit display.
 * Improve detection of display stack readiness, which should remove the probe order issues.
 * Link panel-dpi with its backlight, so that they are turned on/off in sync.
 * Fix possibly incorrect setup of sync and data-enable signals.
 * Get rid of DRM_OMAP_NUM_CRTCS config option.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY4h+/AAoJEPo9qoy8lh71PW4P/RtFifJ0TiykSQlIRiW2Uv/k
 n1qyT0lw4Xl5tjTIILD5B7P235R4uwx6VvzKLYDmeWVPV+CyViNn3moEVm6ZlRXA
 uLT/XmsseyrFWBqRXtv1w9kkmdaYMtz2u59rCzV6btqFaYiFLbzxmPlnxgYVOWjW
 v1RT2FuAXg0tNRpSgLrg4/QMwxItij+Xf/lkgRJoGnZPANfnW8wXrXlf9hiETsIK
 5Tu1iZuXiu+llxFdMeLxuAy7Z1dhRc9sdvnytoWrKd/L5GLo7S+l2OaTqM/MhMMi
 Kt0f2NOdWbXx+UYZjaquOW0t3MIl9pivk/N+xlM6e4m0LF/4ik3lJTUR9+MwjOcG
 tjvVEmw3k7awB0MjQIUJkRxxjjwZQ5Cn8SGKY8fA7XwAPhRVKooK1YiQwdGsJsAl
 ldr2yOD11W9no86AK13N+vT51R8rN/jUsWgsQyAb+JN7ArwCAD7bL9bm+0NFKIL6
 el/MD7BqnnL9gEAqt2hSFmdQhZY44CTN8s6sm8B6o0Tx74OsAy4AgLE/vLFwatVX
 3TeLIsbqILlyuhyIme3CMeA7vlFWTzTxWdIXoChdpkWWm7Y8tPuGwTcsm2wOxT0r
 8Y5qYER6sLdctMyoJQwfh1N2sPaDqC+EQcn48+gzl7SQXKSnd3PozwrQy0AbZdtY
 VG6gXTV0lAcurgcJs/yR
 =iaf8
 -----END PGP SIGNATURE-----

Merge tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next

omapdrm changes for 4.12

Main changes include:

* Add support for render nodes.
* Refactor omapdss code to allow multiple DISPC implementations. This is pre-work for DSS6 support.
* Fix replication logic bug, which caused RGB565 fb to be shown too dark on a 24bit display.
* Improve detection of display stack readiness, which should remove the probe order issues.
* Link panel-dpi with its backlight, so that they are turned on/off in sync.
* Fix possibly incorrect setup of sync and data-enable signals.
* Get rid of DRM_OMAP_NUM_CRTCS config option.

* tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (34 commits)
  drm/omap: Major omap_modeset_init() cleanup
  drm/omap: Remove the obsolete #define omap_plane _omap_plane hack
  drm/omap: Fix one ugly indentation style break left by coccinelle
  drm/omap: Rename enum omap_plane to enum omap_plane_id
  drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option
  drm/omap: fix crash on module unload
  drm/omap: use drm_atomic_helper_shutdown()
  drm/omap: fix display SYNC/DE flags
  drm/omap: dispc: improve debug print of display flags
  drm/omap: displays: panel-dpi: Support for handling backlight devices
  drm/omap: poll only connectors where the connect/disconnect can be checked
  drm/omap: display: Add displays in sorted order to the panel_list
  drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up
  drm/omap: dss: Support for detecting display stack readiness
  drm/omap: dss: Functions to check components in the display/output list
  drm/omap: fix replication logic
  drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled
  drm/omap: remove all EXPORT_SYMBOLs from dispc.c
  drm/omap: use dispc_ops
  drm/omap: fill dispc_ops
  ...
2017-04-04 05:45:49 +10:00
Russell King da6c8f5e2a dma-buf: align debugfs output
Align the heading with the values output from debugfs.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/E1cttOq-0006GX-U7@rmk-PC.armlinux.org.uk
2017-04-03 21:57:20 +05:30
Neil Armstrong 3c2507d308 documentation: media: Add documentation for new RGB and YUV bus formats
Add documentation for added Bus Formats to describe RGB and YUV formats used
as input to the Synopsys DesignWare HDMI TX Controller.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491230558-10804-4-git-send-email-narmstrong@baylibre.com
2017-04-03 11:51:40 -04:00
Neil Armstrong d0353118fd media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller
In order to describe the RGB and YUV bus formats used to feed the
Synopsys DesignWare HDMI TX Controller, add missing formats to the
list of Bus Formats.

Documentation for these formats is added in a separate patch.

Reviewed-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491230558-10804-3-git-send-email-narmstrong@baylibre.com
2017-04-03 11:45:08 -04:00
Jyri Sarha e8e13b1521 drm/omap: Major omap_modeset_init() cleanup
Cleanup overly complex omap_modeset_init(). The function is trying to
support many unusual configuration, that have never been tested and
are not supported by other parts of the dirver.

After cleanup the init function creates exactly one connector,
encoder, crtc, and primary plane per each connected dss-device. Each
connector->encoder->crtc chain is expected to be separate and each
crtc is connect to a single dss-channel. If the configuration does not
match the expectations or exceeds the available resources, the
configuration is rejected.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Jyri Sarha 694c99cf6f drm/omap: Remove the obsolete #define omap_plane _omap_plane hack
Remove the obsolete "#define omap_plane _omap_plane" hack and other
related hacks to get around the enum omap_plane colliding with struct
omap_plane.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Jyri Sarha 273ffeaf8c drm/omap: Fix one ugly indentation style break left by coccinelle
Fix one ugly indentation style break left by the previous coccilnelle
patch.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Jyri Sarha 864050c78e drm/omap: Rename enum omap_plane to enum omap_plane_id
The enum omap_plane conflicted with the same struct name for omapdrm
plane private data. This rename should solve the conflict.

The rename was implement with this very simple coccinelle patch:
------------------------
@@
@@
enum
-omap_plane
+omap_plane_id
------------------------
The patch was applied like this:
spatch --sp-file <cocci_file> --all-includes --in-place --dir drivers/gpu/drm/omapdrm

The above patch did not rename the actual enum definition. That was
added manually on top of the spatch changes.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Jyri Sarha f1118b893e drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option
Allocate one CRTC for each connected output and get rid of
DRM_OMAP_NUM_CRTCS config option. We still can not create more CRTCs
than we have DSS display managers. We also reserve one overlay per
CRTC for primary plane so we can not have more CRTCs than we have
overlays either.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen c9af3ed731 drm/omap: fix crash on module unload
When unloading omapdrm we get a NULL pointer deref in
omap_drm_irq_uninstall(). This is caused by:

967dd48417 ("drm: remove
drm_vblank_no_hw_counter assignment from driver code")

We shut down all the crtcs at unload time before calling
omap_drm_irq_uninstall, so the code in omap_drm_irq_uninstall() is
unnecessary and can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 8a54aa9285 drm/omap: use drm_atomic_helper_shutdown()
Use drm_atomic_helper_shutdown() to ensure that all crtcs are disabled
when unloading the driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 50fa9f0bb8 drm/omap: fix display SYNC/DE flags
At the moment VSYNC/HSYNC/DE high/low flags set by the panel/encoder
drivers get lost when the videotimings are translated to DRM's
videomode, as DRM's mode does not have corresponding flags.

DRM has bus-flags for this purpose, and while it lacks a few flags at
the moment, it should be used here. However, until we rewrite omapdrm's
device model, using bus-flags is rather difficult.

As a short term fix, this patch makes sure that every time the videomode
is set in omap_crtc_mode_set_nofb(), the driver asks for the SYNC/DE
flags from the panel/encoder drivers, and thus we get the correct flags
into use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 956d4f9308 drm/omap: dispc: improve debug print of display flags
Instead of printing 0/1 for display flags like vsync high/low, use a
tri-state print (-1/0/1) to indicate the "undefined" state.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi 39135a305a drm/omap: displays: panel-dpi: Support for handling backlight devices
The associated backlight device can be configured via DT by providing the
phandle to the device.

If the backlight device is configured, the driver can manage the backligt
along with the panel's power state, iow it can turn on the backlight when
the panel is enabled and turn it off when the panel is disabled.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi 4573ebe5ec drm/omap: poll only connectors where the connect/disconnect can be checked
When the connector associated detect callback is not provided, we can not
detect if the display is connected or disconnected. These displays do not
support hot plug, they are always connected. Let DRM know that connectors
w/o detect callback should not be polled.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi 389c5763be drm/omap: display: Add displays in sorted order to the panel_list
Keep the panel_list ordered according to aliases. The DRM connectors will
be created following the panel_list. By keeping the list ordered the DRM
connectors will be created in the same order regardless of the driver
probe order.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi a09d2bc150 drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up
Instead of 'guessing' based on aliases of the status of the DSS drivers,
use the new interface to check that all needed drivers are loaded.
In this way we can be sure that all needed drivers are loaded so it is
safe to continue the probing of omapdrm.
This method will allow the omapdrm to be probed 'headless', without
outputs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi 1e08c82268 drm/omap: dss: Support for detecting display stack readiness
When omapdss is loaded (all core components are in place) create a list of
devices used in the display graph. This list later can be used by omapdrm
via the omapdss_stack_is_ready() function to check that these components
are loaded. Based on this information, omapdrm can defer probe in case when
the omapdss stack is not ready yet.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Peter Ujfalusi 7c79e8d67f drm/omap: dss: Functions to check components in the display/output list
The functions can be used to check a component (by it's of_node) if it is
part of the omapdss display or output list. If the component is found, it
means that the driver is loaded.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen be2d68c69e drm/omap: fix replication logic
DSS uses "replication logic" to convert color components from smaller
bit widths to bigger bit widths. Without replication logic, the color
component would be shifted and the least significant bits would be left
at 0, whereas with replication logic, the least significat bits will be
filled with the most significant bit.

For some reason omapdrm leaves replication logic always to off, which,
in the most common case, means that showing 16-bit RGB colors on 24-bit
display gives a bit darker colors than expected.

The reset value of the replication logic bit is enabled, and it should
always be set, as there's no practical reason to disable it. This patch
removes the option to disable it from omapdrm, and always sets it to
enabled in dispc.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen b8480cab36 drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled
Remove two unused WB functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 5034b1fa05 drm/omap: remove all EXPORT_SYMBOLs from dispc.c
omapdrm now uses dispc_ops instead of direct function calls so we can
remove all EXPORT_SYMBOLs from dispc. Most of the functions can also be
made static, but a few are used outside dispc.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 9f759225e4 drm/omap: use dispc_ops
Change omapdrm to get dispc_ops and use that to call the dispc functions
instead or direct function calls.

The change is very straightforward.

The only problem was in omap_crtc_init() which calls pipe2vbl(crtc), and
at that point of time the crtc->dev link, which is used to get the
dispc_ops, has not been set up yet. This patch makes omap_crtc_init()
skip the call to pipe2vbl() and instead calls
dispc_ops->mgr_get_vsync_irq() directly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen a1a37647d2 drm/omap: fill dispc_ops
This patch changes the current omapdss driver to fill a dispc_ops struct
and set it to omapdss-base.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 8a13398c3f drm/omap: add dispc_ops
We want to change the dispc API from plain functions to a struct with
functions pointers, so that omapdrm can call either omapdss or omapdss6
depending on the platform.

This patch adds 'struct dispc_ops' and adds functions to omapdss-base
to set and get the ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen c283400aa5 drm/omap: move dispc related dss-feat funcs to dispc
omapdrm still uses a few non-dispc functions: dss_feat_get_num_mgrs(),
dss_feat_get_num_ovls() and  dss_feat_get_supported_color_modes(). We
want to provide omapdrm a single dispc_ops function pointer struct so
that omapdrm will use either the current omapdss or the new omapdss6
driver depending on the platform.

Those three functions are really dispc functions, but are located in the
dss_features.c for legacy reasons.

This patch adds similar functionss to the dispc, and changes omapdrm to
use those new functions. Underneath the functions still call the
functions from dss_feature.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 82e83f67a9 drm/omap: move display, dss-of, output to omapdss-base
This patch moves the common parts of omapdss to omapdss-base so that
both the current omapdss driver and the new omapdss6 driver can use
them.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 892fdcb05e drm/omap: display: don't use dsi_get_pixel_size()
display.c uses dsi_get_pixel_size() which is implemented in the DSI
driver, and we won't have that in the omapdss-base module, to which we
want to move display.c

This patch changes display.c not to use dsi_get_pixel_size(). The call
can be replaced with a simple check for OMAP_DSS_DSI_FMT_RGB565.

We can also make dsi_get_pixel_size() static as it's no longer used
outside dsi.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 39637e1003 drm/omap: output: use dev_err instead of DSSERR
We don't have omapdss's custom error printing functions in the common
omapdss-base module, to which we want to move output.c.

This patch changes output.c to use dev_err instead of DSSERR so that it
doesn't depend on DSSERR.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen 7c29971629 drm/omap: move dss_initialized to omapdss-base
omapdss_is_initialized() is used to find out if omapdss has been probed
successfully. This patch moves the related code to the common
omapdss-base module, so that the same support will be there for both
omapdss and omapdss6.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen a99ac0d9f6 drm/omap: add omapdss-base.ko
We are working towards enabling omapdss6, which will consists of a new
dss, dispc and dpi drivers. omapdss6 will be a new module. The panel,
encoder and omapdrm will need to use either the current omapdss driver
or the new omapdss6 driver, depending on the platform.

This will be implemented with a common base module and function
pointers.

This patch adds a skeleton omapdss-base.ko module, to which we'll be
moving common dss functionality like registration of the panels.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-03 12:36:40 +03:00
Tomi Valkeinen d5e7efad7b drm/omap: fix HDMI sync polarities
While implementing writeback support, odd behavior of WBDELAYCOUNT was
observed with the combination of WB capture and HDMI. The result of the
debugging was that the HDMI sync polarities are not set correctly.

The current code sets the sync polarities going from HDMI WP to DISPC
according to the video mode used, which seems to work normally fine, but
causes problems with WB as WB expects the syncs to be active-high.

This patch changes the HDMI sync polarities so that the DISPC always
gets active-high syncs from HDMI WP, and the HDMI core gets sync
polarities according to the used video mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-04-03 12:36:40 +03:00