]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/imx: pd: Use bus format/flags provided by the bridge when available
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 28 Jan 2020 13:55:09 +0000 (14:55 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 31 Jan 2020 15:40:12 +0000 (16:40 +0100)
commitfe141cedc4333e3b76307f096e02b2c1e60f65d5
tree31cd8f263a8dc6d6a978cefa7911ecdb881c2473
parentf32df58acc68b4fae118e00e7fc272b4fb8d5fda
drm/imx: pd: Use bus format/flags provided by the bridge when available

Now that bridges can expose the bus format/flags they expect, we can
use those instead of the relying on the display_info provided by the
connector (which is only valid if the encoder is directly connected
to bridge element driving the panel/display).

We also explicitly expose the bus formats supported by our encoder by
filling encoder->output_bus_caps with proper info.

v10:
* Add changelog to the commit message
* Use kmalloc() instead of kcalloc()
* Add a dev_warn() when unsupported flags are requested

v8 -> v9:
* No changes

v7:
* Add an imx_pd_format_supported() helper (suggested by Philipp)
* Simplify imx_pd_bridge_atomic_get_output_bus_fmts() (suggested by Philipp)
* Simplify imx_pd_bridge_atomic_get_input_bus_fmts()
* Explicitly set the duplicate/destro_state() and reset() hooks

v4 -> v6:
* Patch was not part of the series

v3 (all suggested by Philipp):
* Adjust to match core changes
* Propagate output format to input format
* Pick a default value when output_fmt = _FIXED
* Add missing BGR888 and GBR888 fmts to imx_pd_bus_fmts[]

v2:
* Adjust things to match the new bus-format negotiation infra

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-8-boris.brezillon@collabora.com
drivers/gpu/drm/imx/parallel-display.c