summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_dpi.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-07drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge.Eric Anholt1-3/+22
In the cleanup, I didn't notice that we needed to dereference the connector for the bus_format. Fix the regression by looking up the first (and only) connector attached to us, and assume that its bus_format is what we want. Some day it would be good to have that part of display_info attached to the bridge, instead. v2: Fix stray whitespace change Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 7b1298e05310 ("drm/vc4: Switch DPI to using the panel-bridge helper.") Link: https://patchwork.freedesktop.org/patch/msgid/20180309233256.1667-1-eric@anholt.net Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2017-10-10drm/vc4: remove bridge from driver internal structurebenjamin.gaignard@linaro.org1-11/+6
With a call to drm_of_panel_bridge_remove() we could remove the bridge without store it in vc4_dpi internal driver structure. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-5-git-send-email-benjamin.gaignard@linaro.org
2017-06-20drm: vc4: Use crtc->mode_valid() and encoder->mode_valid() callbacksJose Abreu1-7/+6
Now that we have a callback to check if crtc and encoder supports a given mode we can use it in vc4 so that we restrict the number of probed modes to the ones we can actually display. Also, remove the mode_fixup() calls as these are no longer needed because mode_valid() will be called before. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Eric Anholt <eric@anholt.net> Cc: David Airlie <airlied@linux.ie> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Compile-tested and Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/5bea792f91074688c88a2dab8b0a90eec6e98fdf.1495720737.git.joabreu@synopsys.com
2017-06-05drm/vc4: Switch DPI to using the panel-bridge helper.Eric Anholt1-134/+30
Another 100 lines of boilerplate gone, while allowing for bridges to be connected in the display chain. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-3-eric@anholt.net
2017-05-22drm/vc4: fix include notation and remove -Iinclude/drm flagMasahiro Yamada1-8/+8
Include <drm/*.h> instead of relative path from include/drm, then remove the -Iinclude/drm compiler flag. While we are here, use <...> instead of "..." for include/linux/*.h and include/sound/*.h headers too. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1495081793-9707-2-git-send-email-yamada.masahiro@socionext.com
2017-04-06drm: convert drivers to use of_graph_get_remote_nodeRob Herring1-12/+3
Convert drivers to use the new of_graph_get_remote_node() helper instead of parsing the endpoint node and then getting the remote device node. Now drivers can just specify the device node and which port/endpoint and get back the connected remote device node. The details of the graph binding are nicely abstracted into the core OF graph code. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Liviu Dudau <liviu.dudau@arm.com> Tested-by: Eric Anholt <eric@anholt.net> Tested-by: Jyri Sarha <jsarha@ti.com> Tested by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2017-02-28drm/vc4: Extend and edit documentation for output from the RSTEric Anholt1-1/+2
I had written most of my comments as if I was describing the individual code files the way I used to for doxygen, while for RST we want to describe things in a more chapter/section way where there's no obvious relation to .c files. Additionally, several of the files had stub descriptions that I've taken this opportunity to extend. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-4-eric@anholt.net
2017-02-15drm/vc4: Drop debug print at boot with DPI enabled.Eric Anholt1-13/+0
Unlike the other encoders in the driver, I've also dropped the debug dump function. There's only really one register to this device, and we have the debugfs reg entry still. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170208204701.29013-1-eric@anholt.net
2016-08-19drm/vc4: Disallow interlaced modes on DPI.Mario Kleiner1-0/+11
We already don't expose such modes to userspace, but make sure userspace can't sneak some interlaced mode in. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-07-15Merge tag 'drm-vc4-next-2016-07-12' of https://github.com/anholt/linux into ↵Dave Airlie1-11/+3
drm-next This pull request brings in new vc4 plane formats for Android, precise vblank timestamping, and a couple of small cleanups. * tag 'drm-vc4-next-2016-07-12' of https://github.com/anholt/linux: drm/vc4: remove redundant ret status check drm/vc4: Implement precise vblank timestamping. drm/vc4: Bind the HVS before we bind the individual CRTCs. gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle drm: vc4: enable XBGR8888 and ABGR8888 pixel formats drm/vc4: clean up error exit path on failed dpi_connector allocation
2016-06-10drm: vc4: Rely on the default ->best_encoder() behaviorBoris Brezillon1-9/+0
All outputs have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementations and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-15-git-send-email-boris.brezillon@free-electrons.com
2016-06-06drm/vc4: clean up error exit path on failed dpi_connector allocationColin Ian King1-11/+3
There is redundant code in the clean up exit path when dpi_connector fails to be allocated. The current code checks if connector is NULL before destroying it, in fact, connector is NULL at this point so the check is redundant and can be removed. The final clean up is that we can remove the goto fail with a simple return and the unused variable ret. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-04-14drm/vc4: Add DPI driverEric Anholt1-0/+520
The DPI interface involves taking a ton of our GPIOs to be used as outputs, and routing display signals over them in parallel. v2: Use display_info.bus_formats[] to replace our custom DT properties. v3: Rebase on V3D documentation changes. v4: Fix rebase detritus from V3D documentation changes. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Rob Herring <robh@kernel.org>