summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-10drm/virtio: resource teardown tweaksGerd Hoffmann
Add new virtio_gpu_cleanup_object() helper function for object cleanup. Wire up callback function for resource unref, do cleanup from callback when we know the host stopped using the resource. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200207074638.26386-3-kraxel@redhat.com Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2020-02-10drm/virtio: simplify virtio_gpu_alloc_cmdGerd Hoffmann
Just call virtio_gpu_alloc_cmd_resp with some fixed args instead of duplicating most of the function body. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200207074638.26386-2-kraxel@redhat.com Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2020-02-10drm/bochs: deinit bugfixGerd Hoffmann
Check whenever mode_config was actually properly initialized before trying to clean it up. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20200207124348.21641-1-kraxel@redhat.com
2020-02-10drm/bridge: panel: Fix typo in drm_panel_bridge_add docsEnric Balletbo i Serra
Fix the 'manged' typo with 'managed' in the drm_panel_bridge_add kernel-doc documentation. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191218121223.30181-1-enric.balletbo@collabora.com
2020-02-10drm/bridge/synopsys: dsi: missing post disableYannick Fertré
Sometime the post_disable function is missing (not registered). Signed-off-by: Yannick Fertré <yannick.fertre@st.com> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/1579602296-7683-1-git-send-email-yannick.fertre@st.com
2020-02-10drm/bridge: sii902x: Select SND_SOC_HDMI_CODEC if SND_SOC is configuredJyri Sarha
To enable HDMI audio the SND_SOC_HDMI_CODEC needs to be configured. Enable HDMI audio by selecting SND_SOC_HDMI_CODEC if SND_SOC is configured. SND_SOC_HDMI_CODEC has no config menu entry and should be selected automatically by the drivers using it. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> [narmstrong: atomatically -> automatically] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191129152342.29145-1-jsarha@ti.com
2020-02-10drm/bridge: Add tc358768 driverPeter Ujfalusi
Add basic support for the Toshiba TC358768 RGB to DSI bridge. Not all the features of the TC358768 is implemented by the initial driver: MIPI_DSI_MODE_VIDEO and MIPI_DSI_FMT_RGB888 is only supported and tested. Only write is implemented for mipi_dsi_host_ops.transfer. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200131111553.472-3-peter.ujfalusi@ti.com
2020-02-10dt-bindings: display: bridge: Add documentation for Toshiba tc358768Peter Ujfalusi
TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200131111553.472-2-peter.ujfalusi@ti.com
2020-02-10dt-bindings: drm: bridge: adv7511: Add ADV7535 supportBogdan Togorean
ADV7535 is a part compatible with ADV7533 but it supports 1080p@60hz and v1p2 supply is fixed to 1.8V Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200121082719.27972-4-bogdan.togorean@analog.com
2020-02-10drm: bridge: adv7511: Add support for ADV7535Bogdan Togorean
ADV7535 is a DSI to HDMI bridge chip like ADV7533 but it allows 1080p@60Hz. v1p2 is fixed to 1.8V on ADV7535. Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200121082719.27972-3-bogdan.togorean@analog.com
2020-02-10drm: bridge: adv7511: Remove DRM_I2C_ADV7533 KconfigBogdan Togorean
This commit remove DRM_I2C_ADV7533 resulting a simpler driver and less choices in Kconfig. Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200121082719.27972-2-bogdan.togorean@analog.com
2020-02-10drm/udl: Clear struct drm_connector_funcs.dpmsThomas Zimmermann
Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200207141602.4760-2-tzimmermann@suse.de
2020-02-10drm/bochs: Clear struct drm_connector_funcs.dpmsThomas Zimmermann
Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200207141602.4760-1-tzimmermann@suse.de
2020-02-10drm/tiny/st7735r: No need to set ->owner for spi_register_driver()Andy Shevchenko
The spi_register_driver() will set the ->owner member to THIS_MODULE. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200131204923.48928-4-andriy.shevchenko@linux.intel.com
2020-02-10drm/tiny/st7735r: Make driver OF-independentAndy Shevchenko
There is one OF call in the driver that limits its area of use. Replace it to generic device_get_match_data() and get rid of OF dependency. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: David Lechner <david@lechnology.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200131204923.48928-3-andriy.shevchenko@linux.intel.com
2020-02-10drm/tiny/repaper: No need to set ->owner for spi_register_driver()Andy Shevchenko
The spi_register_driver() will set the ->owner member to THIS_MODULE. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Lechner <david@lechnology.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200131204923.48928-2-andriy.shevchenko@linux.intel.com
2020-02-10drm/tiny/repaper: Make driver OF-independentAndy Shevchenko
There is one OF call in the driver that limits its area of use. Replace it to generic device_get_match_data() and get rid of OF dependency. While here, cast SPI driver data to certain enumerator type. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Lechner <david@lechnology.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200131204923.48928-1-andriy.shevchenko@linux.intel.com
2020-02-09drm/tiny: add support for tft displays based on ilitek,ili9486Kamlesh Gurudasani
This adds support fot ilitek,ili9486 based displays with shift register in front of controller. Ozzmaker,Piscreen and Waveshare,rpi-lcd-35 are such displays. Acked-by: Sam Ravnborg <sam@ravnborg.org> (v4) Reviewed-by: Noralf Tronnes <noralf@tronnes.org> (v4) Signed-off-by: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> [fixed checkpatch warnings] Link: https://patchwork.freedesktop.org/patch/msgid/a9c8065c3ef7707650630b3b21a0c01d725fc5a0.1581270802.git.kamlesh.gurudasani@gmail.com
2020-02-09dt-bindings: add binding for tft displays based on ilitek,ili9486Kamlesh Gurudasani
This binding is for the tft displays based on ilitek,ili9486. ozzmaker,piscreen and waveshare,rpi-lcd-35 are such displays Signed-off-by: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/8938c7a53598db793bbcddf205dcf35bcc19a18e.1581270802.git.kamlesh.gurudasani@gmail.com
2020-02-09dt-bindings: panel: Convert orisetech,otm8009a to json-schemaBenjamin Gaignard
Convert orisetech,otm8009a to json-schema. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200206133344.724-4-benjamin.gaignard@st.com
2020-02-09dt-bindings: panel: Convert raydium,rm68200 to json-schemaBenjamin Gaignard
Convert raydium,rm68200 to json-schema. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200206133344.724-3-benjamin.gaignard@st.com
2020-02-09dt-bindings: one file of all simple DSI panelsSam Ravnborg
To complement panel-simple.yaml, create panel-simple-dsi.yaml. panel-simple-dsi-yaml are for all simple DSP panels with a single power-supply and optional backlight / enable GPIO. Migrate panasonic,vvx10f034n00 over to the new file. The objectives with one file for all the simple DSI panels are: - Make it simpler to add bindings for simple DSI panels - Keep the number of bindings file lower - Keep the binding documentation for simple DSI panels more consistent Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Rob Herring <robh@kernel.org> Cc: Maxime Ripard <mripard@kernel.org> Cc: Yannick Fertre <yannick.fertre@st.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200206133344.724-2-benjamin.gaignard@st.com
2020-02-07drm/virtio: fix ring free checkGerd Hoffmann
If the virtio device supports indirect ring descriptors we need only one ring entry for the whole command. Take that into account when checking whenever the virtqueue has enough free entries for our command. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200207064653.14403-1-kraxel@redhat.com
2020-02-06drm/virtio: move virtqueue_notify into virtio_gpu_queue_ctrl_sgsChia-I Wu
It becomes clear that virtio_gpu_queue_fenced_ctrl_buffer should be responsible for setting up sgs and virtio_gpu_queue_ctrl_sgs should be responsible for queuing sgs. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-11-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: move the check for vqs_ready earlierChia-I Wu
When vqs_ready is false, vq should be considered invalid and we should not check vq->num_free. After this change, a fenced command queued before the vqs are ready will have fence id 0 and will be considered done. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-9-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: move locking into virtio_gpu_queue_ctrl_sgsChia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-8-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: set up virtqueue sgs before lockingChia-I Wu
sgs setup does not need to be in the critical section. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-7-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: unlock object array on errorsChia-I Wu
We don't propagate erros to the callers. We have to unlock object arrays on errors. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-6-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: no need to pass virtio_gpu_ctrl_hdrChia-I Wu
We can get it from vbuf. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-5-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: add virtio_gpu_vbuf_ctrl_hdrChia-I Wu
It is a helper to return the virtio_gpu_ctrl_hdr in a vbuf. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-4-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: remove incorrect ENOSPC checkChia-I Wu
The handling of virtqueue_add_sgs ENOSPC error is incorrect because it can result in out-of-order virtqueue_add_sgs and break fences. We never get ENOSPC anyway because the caller waits until there is enough space (the other caller that did not wait was removed in commit 32d6c2c5b522 ("drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.")). Remove the incorrect and unnecessary error path. This also adds a WARN_ON(ret) until we properly handle errors. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Cc: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-3-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: fix a wait_event conditionChia-I Wu
outcnt may be greater than 1 since commit e1218b8c0cc1 ("drm/virtio: Use vmalloc for command buffer allocations."). Fixes: e1218b8c0cc1 ("drm/virtio: Use vmalloc for command buffer allocations.") Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Cc: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-2-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-06drm/virtio: ratelimit error loggingGerd Hoffmann
Avoid flooding the log in case we screw up badly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200205102552.21409-1-kraxel@redhat.com
2020-02-06drm/vboxvideo: Implement struct drm_mode_config_funcs.mode_validThomas Zimmermann
The implementation of struct drm_mode_config_funcs.mode_valid verifies that enough video memory is available for a given display mode. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200203155258.9346-5-tzimmermann@suse.de
2020-02-06drm/hibmc: Implement struct drm_mode_config_funcs.mode_validThomas Zimmermann
The implementation of struct drm_mode_config_funcs.mode_valid verifies that enough video memory is available for a given display mode. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200203155258.9346-4-tzimmermann@suse.de
2020-02-06drm/bochs: Implement struct drm_mode_config_funcs.mode_validThomas Zimmermann
The implementation of struct drm_mode_config_funcs.mode_valid verifies that enough video memory is available for a given display mode. This replaces similar functionality in bochs_connector_mode_valid(). v2: * remove bochs_connector_mode_valid(), which now serves no purpose Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200203155258.9346-3-tzimmermann@suse.de
2020-02-06drm/vram: Add helpers to validate a display mode's memory requirementsThomas Zimmermann
Devices with low amount of dedicated video memory may not be able to use all possible display modes, as the framebuffers may not fit into VRAM. The new helper function drm_vram_helper_mode_valid() implements a simple test to sort out all display modes that can not be used in any case. Drivers should call this function from struct drm_mode_config_funcs.mode_valid. The functionality was originally implemented by the ast driver, which is being converted as well. v2: * WARN_ON if VRAM memory manager has not been initialized * documentation fixes * unexported drm_vram_helper_mode_valid_internal() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200203155258.9346-2-tzimmermann@suse.de
2020-02-05drm/virtio: fix vblank handlingGerd Hoffmann
virtio has its own commit fail function. Add the drm_atomic_helper_fake_vblank() call there. Fixes: 2a735ad3d211 ("drm/virtio: Remove sending of vblank event") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/20200205065312.15790-1-kraxel@redhat.com
2020-02-04drm: Remove the dma_alloc_coherent wrapper for internal usageChris Wilson
Internally for "consistent" maps, we create a temporary struct drm_dma_handle in order to use our own dma_alloc_coherent wrapper then destroy the temporary wrap. Simplify our logic by removing the temporary wrapper! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-2-chris@chris-wilson.co.uk
2020-02-04drm: Remove PageReserved manipulation from drm_pci_allocChris Wilson
drm_pci_alloc/drm_pci_free are very thin wrappers around the core dma facilities, and we have no special reason within the drm layer to behave differently. In particular, since commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. it has been illegal to combine GFP_COMP with SetPageReserved, so lets stop doing both and leave the dma layer to its own devices. Reported-by: Taketo Kabe Bug: https://gitlab.freedesktop.org/drm/intel/issues/1027 Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: <stable@vger.kernel.org> # v4.5+ Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-1-chris@chris-wilson.co.uk
2020-02-04drm/stm: dsi: stm mipi dsi doesn't print error on probe deferralEtienne Carriere
Change DSI driver to not print an error trace when probe is deferred for a clock resource. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/1579602245-7577-1-git-send-email-yannick.fertre@st.com
2020-02-04drm/stm: ltdc: check crtc state before enabling LIEYannick Fertre
Following investigations of a hardware bug, the LIE interrupt can occur while the display controller is not activated. LIE interrupt (vblank) don't have to be set if the CRTC is not enabled. Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Acked-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/1579601650-7055-1-git-send-email-yannick.fertre@st.com
2020-02-04drm/stm: ltdc: add number of interruptsYannick Fertre
The number of interrupts depends on the ltdc version. Don't try to get interrupt which not exist, avoiding kernel warning messages. Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Acked-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/1579601632-7001-1-git-send-email-yannick.fertre@st.com
2020-02-04MAINTAINERS: Add Thomas as drm-misc co-maintainerThomas Zimmermann
Daniel asked me to serve as co-maintainer of the drm-misc tree. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200130120643.5759-1-tzimmermann@suse.de
2020-01-31drm/panel: simple: Fix the lt089ac29000 bus_formatBoris Brezillon
The lt089ac29000 panel is an LVDS panel, not a DPI one. Fix the definition to reflect this fact. v10: * Add changelog to the commit message v8 -> v9: * No changes v7: * New patch Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-12-boris.brezillon@collabora.com
2020-01-31drm/imx: pd: Use bus format/flags provided by the bridge when availableBoris Brezillon
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
2020-01-31drm/bridge: Add the necessary bits to support bus format negotiationBoris Brezillon
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through the drm_bus_cfg struct which encodes the configuration of a physical bus between two components in an output pipeline, usually between two bridges, an encoder and a bridge, or a bridge and a connector. The bus configuration is stored in drm_bridge_state separately for the input and output buses, as seen from the point of view of each bridge. The bus configuration of a bridge output is usually identical to the configuration of the next bridge's input, but may differ if the signals are modified between the two bridges, for instance by an inverter on the board. The input and output configurations of a bridge may differ if the bridge modifies the signals internally, for instance by performing format conversion, or*modifying signals polarities. Bus format negotiation is automated by the core, drivers just have to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they want to take part to this negotiation. Negotiation happens in reverse order, starting from the last element of the chain (the one directly connected to the display) up to the first element of the chain (the one connected to the encoder). During this negotiation all supported formats are tested until we find one that works, meaning that the formats array should be in decreasing preference order (assuming the driver has a preference order). Note that the bus format negotiation works even if some elements in the chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks. In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets the previous bridge element decide what to do (most of the time, bridge drivers will pick a default bus format or extract this piece of information from somewhere else, like a FW property). v10: * Add changelog to the commit message v9: * No changes v8: * Fix a test in drm_atomic_bridge_chain_select_bus_fmts() (Reported by Jonas) v7: * Adapt the code to deal with the fact that not all bridges in the chain have a bridge state v5 -> v6: * No changes v4: * Enhance the doc * Fix typos * Rename some parameters/fields * Reword the commit message v3: * Fix the commit message (Reported by Laurent) * Document the fact that bus formats should not be directly modified by drivers (Suggested by Laurent) * Document the fact that format order matters (Suggested by Laurent) * Propagate bus flags by default * Document the fact that drivers can tweak bus flags if needed * Let ->atomic_get_{output,input}_bus_fmts() allocate the bus format array (Suggested by Laurent) * Add a drm_atomic_helper_bridge_propagate_bus_fmt() * Mandate that bridge drivers return accurate input_fmts even if they are known to be the first element in the bridge chain v2: * Rework things to support more complex use cases Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format] Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-7-boris.brezillon@collabora.com
2020-01-31drm/bridge: Add an ->atomic_check() hookBoris Brezillon
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check() hook) is called in place of drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented, the core falls back on ->mode_fixup(), so the behavior should stay the same for existing bridge drivers). v10: * Add changelog to the commit message v8 -> v9: * No changes v7: * Fix a NULL pointer dereference v5 -> v6: * No changes v4: * Add R-bs v3: * No changes v2: * Clarify the fact that ->atomic_check() is replacing ->mode_fixup() Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-6-boris.brezillon@collabora.com
2020-01-31drm/bridge: Patch atomic hooks to take a drm_bridge_stateBoris Brezillon
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem. The drivers implementing those hooks are patched too. v10: * Add changelog to the commit message v8 -> v9: * No changes v7: * Adjust things to the bridge_state changes v6: * Also fixed rcar-du/rcar_lvds.c same as analogix/analogix_dp_core.c v5: * No changes v4: * Rename func params into old_bridge_state * Add Laurent's Rb v3: * Old state clarification moved to a separate patch v2: * Pass the old bridge state Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable] Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-5-boris.brezillon@collabora.com
2020-01-31drm/bridge: analogix: Plug atomic state hooks to the default implementationBoris Brezillon
This is needed to pass a bridge state to all atomic hooks, if we don't do that, the core can't duplicate/create bridge states. v10: * Add changelog to the commit message v9: * Add Neil's R-b * Move earlier in the series v8: * No changes v7: * New patch Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-4-boris.brezillon@collabora.com