platform/kernel/linux-starfive.git
19 months agogpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by...
Liang He [Wed, 20 Jul 2022 15:22:27 +0000 (23:22 +0800)]
gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id()

In ipu_add_client_devices(), we need to call of_node_put() for
reference returned by of_graph_get_port_by_id() in fail path.

Fixes: 17e052175039 ("gpu: ipu-v3: Do not bail out on missing optional port nodes")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220720152227.1288413-1-windhl@126.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220720152227.1288413-1-windhl@126.com
19 months agodrm/omap: dsi: Fix excessive stack usage
Tomi Valkeinen [Fri, 16 Sep 2022 08:22:05 +0000 (11:22 +0300)]
drm/omap: dsi: Fix excessive stack usage

dsi_dump_dsi_irqs(), a function used for debugfs prints, has a large
struct in its frame, which can result in:

drivers/gpu/drm/omapdrm/dss/dsi.c:1126:1: warning: the frame size of 1060 bytes is larger than 1024 bytes [-Wframe-larger-than=]

As the performance of the function is of no concern, let's allocate the
struct with kmalloc instead.

Compile-tested only.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220916082206.167427-1-tomi.valkeinen@ideasonboard.com
19 months agodrm/omapdrm: Remove unused struct csc_coef_rgb2yuv
Yuan Can [Fri, 14 Oct 2022 02:48:10 +0000 (02:48 +0000)]
drm/omapdrm: Remove unused struct csc_coef_rgb2yuv

After commit 64ff18911878, struct csc_coef_rgb2yuv is not used any more
and can be removed as well.

Fixes: 64ff18911878 ("drm/omap: Enable COLOR_ENCODING and COLOR_RANGE properties for planes")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221014024810.21675-1-yuancan@huawei.com
19 months agodrm: tidss: Fix pixel format definition
Randolph Sapp [Fri, 2 Dec 2022 00:18:03 +0000 (18:18 -0600)]
drm: tidss: Fix pixel format definition

There was a long-standing bug from a typo that created 2 ARGB1555 and
ABGR1555 pixel format entries. Weston 10 has a sanity check that alerted
me to this issue.

According to the Supported Pixel Data formats table we have the later
entries should have been for Alpha-X instead.

Signed-off-by: Randolph Sapp <rs@ti.com>
Fixes: 32a1795f57eecc ("drm/tidss: New driver for TI Keystone platform Display SubSystem")
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221202001803.1765805-1-rs@ti.com
19 months agodrm/tidss: Set max DMA segment size
Andrew Davis [Tue, 23 Aug 2022 00:16:34 +0000 (19:16 -0500)]
drm/tidss: Set max DMA segment size

We have no segment size limitations. Set to unlimited.

Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220823001634.11461-1-afd@ti.com
19 months agodrm/display/dp_mst: Fix payload addition on a disconnected sink
Imre Deak [Wed, 14 Dec 2022 18:42:58 +0000 (20:42 +0200)]
drm/display/dp_mst: Fix payload addition on a disconnected sink

If an MST stream is enabled on a disconnected sink, the payload for the
stream is not created and the MST manager's payload count/next start VC
slot is not updated. Since the payload's start VC slot may still contain
a valid value (!= -1) the subsequent disabling of such a stream could
cause an incorrect decrease of the payload count/next start VC slot in
drm_dp_remove_payload() and hence later payload additions will fail.

Fix the above by marking the payload as invalid in the above case, so
that it's skipped during payload removal. While at it add a debug print
for this case.

Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v6.1+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-3-imre.deak@intel.com
19 months agodrm/display/dp_mst: Fix down message handling after a packet reception error
Imre Deak [Wed, 14 Dec 2022 18:42:57 +0000 (20:42 +0200)]
drm/display/dp_mst: Fix down message handling after a packet reception error

After an error during receiving a packet for a multi-packet DP MST
sideband message, the state tracking which packets have been received
already is not reset. This prevents the reception of subsequent down
messages (due to the pending message not yet completed with an
end-of-message-transfer packet).

Fix the above by resetting the reception state after a packet error.

Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-2-imre.deak@intel.com
19 months agodrm/display/dp_mst: Fix down/up message handling after sink disconnect
Imre Deak [Wed, 14 Dec 2022 18:42:56 +0000 (20:42 +0200)]
drm/display/dp_mst: Fix down/up message handling after sink disconnect

If the sink gets disconnected during receiving a multi-packet DP MST AUX
down-reply/up-request sideband message, the state keeping track of which
packets have been received already is not reset. This results in a failed
sanity check for the subsequent message packet received after a sink is
reconnected (due to the pending message not yet completed with an
end-of-message-transfer packet), indicated by the

"sideband msg set header failed"

error.

Fix the above by resetting the up/down message reception state after a
disconnect event.

Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-1-imre.deak@intel.com
19 months agodrm: bridge: it66121: Add support for the IT6610
Paul Cercueil [Wed, 14 Dec 2022 13:01:31 +0000 (14:01 +0100)]
drm: bridge: it66121: Add support for the IT6610

Add support for the IT6610 HDMI encoder.

The hardware is very similar, and therefore the driver did not require
too many changes. Some bits are only available on the IT66121, and
vice-versa. Also, the IT6610 requires specific polarities on the DE and
pixel lines.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214130131.12962-1-paul@crapouillou.net
19 months agodrm: bridge: it66121: Move VID/PID to new it66121_chip_info structure
Paul Cercueil [Wed, 14 Dec 2022 13:01:22 +0000 (14:01 +0100)]
drm: bridge: it66121: Move VID/PID to new it66121_chip_info structure

This will make it easier later to introduce support for new chips in
this driver.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214130122.12911-1-paul@crapouillou.net
19 months agodrm: bridge: it66121: Set DDC preamble only once before reading EDID
Paul Cercueil [Wed, 14 Dec 2022 12:58:19 +0000 (13:58 +0100)]
drm: bridge: it66121: Set DDC preamble only once before reading EDID

The DDC preamble and target address only need to be set once before
reading the EDID, even if multiple segments have to be read.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-9-paul@crapouillou.net
19 months agodrm: bridge: it66121: Don't clear DDC FIFO twice
Paul Cercueil [Wed, 14 Dec 2022 12:58:18 +0000 (13:58 +0100)]
drm: bridge: it66121: Don't clear DDC FIFO twice

The DDC FIFO was cleared before the loop in it66121_get_edid_block(),
and at the beginning of each iteration; which means that it did not have
to be cleared before the loop.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-8-paul@crapouillou.net
19 months agodrm: bridge: it66121: Don't use DDC error IRQs
Paul Cercueil [Wed, 14 Dec 2022 12:58:17 +0000 (13:58 +0100)]
drm: bridge: it66121: Don't use DDC error IRQs

The DDC error IRQs will fire on the IT6610 every time the FIFO is empty,
which is not very helpful. To resolve this, we can simply disable them,
and handle DDC errors in it66121_wait_ddc_ready().

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-7-paul@crapouillou.net
19 months agodrm: bridge: it66121: Fix wait for DDC ready
Paul Cercueil [Wed, 14 Dec 2022 12:58:16 +0000 (13:58 +0100)]
drm: bridge: it66121: Fix wait for DDC ready

The function it66121_wait_ddc_ready() would previously read the status
register until "true", which means it never actually polled anything and
would just read the register once.

Now, it will properly wait until the DDC hardware is ready or until it
reported an error.

The 'busy' variable was also renamed to 'error' since these bits are set
on error and not when the DDC hardware is busy.

Since the DDC ready function is now working properly, the msleep(20) can
be removed.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-6-paul@crapouillou.net
19 months agodrm: bridge: it66121: Write AVI infoframe with regmap_bulk_write()
Paul Cercueil [Wed, 14 Dec 2022 12:58:15 +0000 (13:58 +0100)]
drm: bridge: it66121: Write AVI infoframe with regmap_bulk_write()

Since all AVI infoframe registers are contiguous in the address space,
the AVI infoframe can be written in one go with regmap_bulk_write().

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-5-paul@crapouillou.net
19 months agodrm: bridge: it66121: Use regmap_noinc_read()
Paul Cercueil [Wed, 14 Dec 2022 12:58:14 +0000 (13:58 +0100)]
drm: bridge: it66121: Use regmap_noinc_read()

Use regmap_noinc_read() instead of reading the data from the DDC FIFO one
byte at a time.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-4-paul@crapouillou.net
19 months agodrm: bridge: it66121: Use devm_regulator_bulk_get_enable()
Paul Cercueil [Wed, 14 Dec 2022 12:58:13 +0000 (13:58 +0100)]
drm: bridge: it66121: Use devm_regulator_bulk_get_enable()

Simplify the code of the driver by using
devm_regulator_bulk_get_enable(), which will handle powering up the
regulators, and disabling them on probe error or module removal.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-3-paul@crapouillou.net
19 months agodt-bindings: display: bridge: it66121: Add compatible string for IT6610
Paul Cercueil [Wed, 14 Dec 2022 12:58:12 +0000 (13:58 +0100)]
dt-bindings: display: bridge: it66121: Add compatible string for IT6610

Add a new ite,it6610 compatible string to the IT66121 binding
documentation, since the two chips are very similar.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-2-paul@crapouillou.net
19 months agodrm/bridge: add it6505 driver to read data-lanes and link-frequencies from dt
allen chen [Thu, 3 Nov 2022 09:12:43 +0000 (17:12 +0800)]
drm/bridge: add it6505 driver to read data-lanes and link-frequencies from dt

Add driver to read data-lanes and link-frequencies from dt property to
restrict output bandwidth.

Signed-off-by: allen chen <allen.chen@ite.com.tw>
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-3-allen.chen@ite.com.tw
Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-2-allen.chen@ite.com.tw
Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-3-allen.chen@ite.com.tw
19 months agodt-bindings: it6505: add properties to restrict output bandwidth
allen chen [Thu, 3 Nov 2022 09:12:42 +0000 (17:12 +0800)]
dt-bindings: it6505: add properties to restrict output bandwidth

Currently there are no "upstream" users. So, no existing users to break.
Add properties to restrict dp output data-lanes and clock.

Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
Signed-off-by: allen Chen <allen.chen@ite.com.tw>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-2-allen.chen@ite.com.tw
19 months agodrm/bridge: it6505: Add caching for EDID
Pin-yen Lin [Tue, 15 Nov 2022 11:27:20 +0000 (19:27 +0800)]
drm/bridge: it6505: Add caching for EDID

Add caching when EDID is read, and invalidate the cache until the
bridge detects HPD low or sink count changes on HPD_IRQ.

It takes 1.2s for IT6505 bridge to read a 3-block EDID, and skipping
one EDID read would be a notable difference on user experience.

Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221115112720.911158-1-treapking@chromium.org
19 months agodrm/bridge: lt9611: Fix PLL being unable to lock
Robert Foss [Tue, 13 Dec 2022 15:03:04 +0000 (16:03 +0100)]
drm/bridge: lt9611: Fix PLL being unable to lock

This fixes PLL being unable to lock, and is derived from an equivalent
downstream commit.

Available LT9611 documentation does not list this register, neither does
LT9611UXC (which is a different chip).

This commit has been confirmed to fix HDMI output on DragonBoard 845c.

Suggested-by: Amit Pundir <amit.pundir@linaro.org>
Reviewed-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221213150304.4189760-1-robert.foss@linaro.org
19 months agodrm/vc4: dsi: Remove entry to ULPS from vc4_dsi post_disable
Dave Stevenson [Wed, 7 Dec 2022 10:22:49 +0000 (11:22 +0100)]
drm/vc4: dsi: Remove entry to ULPS from vc4_dsi post_disable

Post_disable was sending the D-PHY sequence to put any device
into ULPS suspend mode, and then cutting power to the DSI block.
The power-on reset state of the DSI block is for DSI to be in
an operational state, not ULPS, so it then never sent the sequence
for exiting ULPS. Any attached device that didn't have an external
reset therefore remained in ULPS / standby, and didn't function.

Use of ULPS isn't well specified in DRM, therefore remove entering
it to avoid the above situation.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-6-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: dsi: Convert to using a bridge instead of encoder
Dave Stevenson [Wed, 7 Dec 2022 10:22:48 +0000 (11:22 +0100)]
drm/vc4: dsi: Convert to using a bridge instead of encoder

Remove the encoder functions, and create a bridge attached to
this dumb encoder which implements the same functionality.

As a bridge has state which an encoder doesn't, we need to
add the state management functions as well.

As there is no bridge atomic_mode_set, move the initialisation
code that was in mode_set into _pre_enable.
The code to actually enable and disable sending video are split
from the general control into _enable and _disable.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-5-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: dsi: Convert to use atomic operations
Dave Stevenson [Wed, 7 Dec 2022 10:22:47 +0000 (11:22 +0100)]
drm/vc4: dsi: Convert to use atomic operations

The atomic calls are preferred as the non-atomic ones
are deprecated. In preparation for conversion to a bridge,
switch to the atomic calls.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-4-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: dsi: Remove splitting the bridge chain from the driver
Dave Stevenson [Wed, 7 Dec 2022 10:22:46 +0000 (11:22 +0100)]
drm/vc4: dsi: Remove splitting the bridge chain from the driver

Splitting the bridge chain fails for atomic bridges as the
framework can't add the relevant state in
drm_atomic_add_encoder_bridges.
The chain was split because we needed to power up before
calling pre_enable, but that is now done in mode_set, and will
move into the framework.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-3-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: dsi: Move initialisation to encoder_mode_set
Dave Stevenson [Wed, 7 Dec 2022 10:22:45 +0000 (11:22 +0100)]
drm/vc4: dsi: Move initialisation to encoder_mode_set

Breaking the bridge chain does not work for atomic bridges/panels
and generally causes issues.
We need to initialise the DSI host before the bridge pre_enables
are called, so move that to encoder_mode_set in the same way that
dw-mipi-dsi does.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-2-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: dsi: Rename bridge to out_bridge
Dave Stevenson [Wed, 7 Dec 2022 10:22:44 +0000 (11:22 +0100)]
drm/vc4: dsi: Rename bridge to out_bridge

In preparation for converting the encoder to being a bridge,
rename the variable holding the next bridge in the chain to
out_bridge, so that our bridge can be called bridge.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-1-8f68ee0b0adb@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: Improve the KUnit documentation
Maxime Ripard [Thu, 8 Dec 2022 09:47:27 +0000 (10:47 +0100)]
drm/vc4: Improve the KUnit documentation

The command-line can be expressed using a code-block, and we were
missing which architectures were available.

Suggested-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20221208094727.2848310-1-maxime@cerno.tech
19 months agodrm/bridge: it6505: Guard bridge power in IRQ handler
Pin-yen Lin [Wed, 9 Nov 2022 09:52:27 +0000 (17:52 +0800)]
drm/bridge: it6505: Guard bridge power in IRQ handler

Add a pair of pm_runtime_get_if_in_use and pm_runtime_put_sync in the
interrupt handler to make sure the bridge won't be powered off during
the interrupt handlings. Also remove the irq_lock mutex because it's not
guarding anything now.

Fixes: ab28896f1a83 ("drm/bridge: it6505: Improve synchronization between extcon subsystem")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221109095227.3320919-1-treapking@chromium.org
19 months agodt-bindings: display: panel: mipi-dbi-spi: Add io-supply
Otto Pflüger [Thu, 1 Dec 2022 16:02:45 +0000 (17:02 +0100)]
dt-bindings: display: panel: mipi-dbi-spi: Add io-supply

Add documentation for the new io-supply property, which specifies the
regulator for the I/O voltage supply on platforms where the panel
panel power and I/O supplies are separate.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-4-otto.pflueger@abscue.de
19 months agodrm/tiny: panel-mipi-dbi: Read I/O supply from DT
Otto Pflüger [Thu, 1 Dec 2022 16:02:44 +0000 (17:02 +0100)]
drm/tiny: panel-mipi-dbi: Read I/O supply from DT

To support platforms with a separate I/O voltage supply, set the new
io_regulator property along with the regulator property of the DBI
device. Read the I/O supply from a new "io-supply" device tree
property.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-3-otto.pflueger@abscue.de
19 months agodrm/mipi-dbi: Support separate I/O regulator
Otto Pflüger [Thu, 1 Dec 2022 16:02:43 +0000 (17:02 +0100)]
drm/mipi-dbi: Support separate I/O regulator

The MIPI DBI specification defines separate vdd (panel power) and
vddi (I/O voltage) supplies. Displays that require different voltages
for the different supplies do exist, so the supplies cannot be
combined into one as they are now. Add a new io_regulator property to
the mipi_dbi_dev struct which can be set by the panel driver along
with the regulator property.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-2-otto.pflueger@abscue.de
19 months agodrm/i915: stop using ttm_bo_wait
Christian König [Thu, 24 Nov 2022 12:30:18 +0000 (13:30 +0100)]
drm/i915: stop using ttm_bo_wait

TTM is just wrapping core DMA functionality here, remove the mid-layer.
No functional change.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-7-christian.koenig@amd.com
19 months agodrm/bridge: anx7625: keep last configure timing
Xin Ji [Fri, 9 Dec 2022 03:04:18 +0000 (11:04 +0800)]
drm/bridge: anx7625: keep last configure timing

Sometimes kernel may resume back quickly after suspend,
and DRM not call .mode_set() to re-config
display timing before calling .atomic_enable(), bridge
driver with this patch to keep last configure timing.

Signed-off-by: Xin Ji <xji@analogixsemi.com>
Acked-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221209030418.713935-1-xji@analogixsemi.com
19 months agodrm/bridge: ti-sn65dsi83: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:09 +0000 (23:36 +0100)]
drm/bridge: ti-sn65dsi83: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-36-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: parade-ps8622: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:02 +0000 (23:36 +0100)]
drm/bridge: parade-ps8622: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-29-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: adv7511: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:48 +0000 (23:35 +0100)]
drm/bridge: adv7511: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-15-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agoMerge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub...
Robert Foss [Mon, 12 Dec 2022 16:08:42 +0000 (17:08 +0100)]
Merge branch 'i2c/client_device_id_helper-immutable' of https://git./linux/kernel/git/wsa/linux into drm-misc-next

This branch has been applied to the I2C tree and others, and
is a dependency of a large series of changes switching many
drivers to use i2c_client_get_device_id.

19 months agodrm: exynos: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:17:16 +0000 (19:17 +0000)]
drm: exynos: Remove #ifdef guards for PM related functions

Use the DEFINE_RUNTIME_DEV_PM_OPS(), SYSTEM_SLEEP_PM_OPS(),
RUNTIME_PM_OPS() and pm_ptr() macros to handle the runtime and suspend
PM callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_PM is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-10-paul@crapouillou.net
19 months agodrm/i915/gt: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:42 +0000 (19:19 +0000)]
drm/i915/gt: Remove #ifdef guards for PM related functions

Instead of defining two versions of intel_sysfs_rc6_init(), one for each
value of CONFIG_PM, add a check on !IS_ENABLED(CONFIG_PM) early in the
function. This will allow the compiler to automatically drop the dead
code when CONFIG_PM is disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-13-paul@crapouillou.net
19 months agodrm: gm12u320: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:40 +0000 (19:19 +0000)]
drm: gm12u320: Remove #ifdef guards for PM related functions

Use the pm_ptr() macro to handle the .suspend / .resume / .reset_resume
callbacks.

This macro allows the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_PM is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch. It also allows to drop the
__maybe_unused tags.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-11-paul@crapouillou.net
19 months agodrm: vboxvideo: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:38 +0000 (19:19 +0000)]
drm: vboxvideo: Remove #ifdef guards for PM related functions

Use the pm_sleep_ptr() macro to handle the .suspend / .resume callbacks.

This macro allows the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-9-paul@crapouillou.net
19 months agodrm: tilcdc: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:37 +0000 (19:19 +0000)]
drm: tilcdc: Remove #ifdef guards for PM related functions

Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle
the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Jyri Sarha <jyri.sarhaı@iki.fi>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-8-paul@crapouillou.net
19 months agodrm: shmobile: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:35 +0000 (19:19 +0000)]
drm: shmobile: Remove #ifdef guards for PM related functions

Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle
the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-6-paul@crapouillou.net
19 months agodrm: rcar-du: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:33 +0000 (19:19 +0000)]
drm: rcar-du: Remove #ifdef guards for PM related functions

Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle
the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-4-paul@crapouillou.net
19 months agodrm: panfrost: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:19:32 +0000 (19:19 +0000)]
drm: panfrost: Remove #ifdef guards for PM related functions

Use the EXPORT_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr() macros to handle
the PM callbacks.

These macros allow the PM functions to be automatically dropped by the
compiler when CONFIG_PM is disabled, without having to use #ifdef
guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-3-paul@crapouillou.net
19 months agodrm: imx/dcss: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:17:17 +0000 (19:17 +0000)]
drm: imx/dcss: Remove #ifdef guards for PM related functions

Use the EXPORT_GPL_DEV_PM_OPS() and pm_ptr() macros to handle the PM
callbacks.

These macros allow the PM functions to be automatically dropped by the
compiler when CONFIG_PM is disabled, without having to use #ifdef
guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Tested-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-11-paul@crapouillou.net
19 months agodrm: atmel-hlcdc: Remove #ifdef guards for PM related functions
Paul Cercueil [Tue, 29 Nov 2022 19:17:15 +0000 (19:17 +0000)]
drm: atmel-hlcdc: Remove #ifdef guards for PM related functions

Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle
the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-9-paul@crapouillou.net
19 months agodrm/bridge: tfp410: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:11 +0000 (23:36 +0100)]
drm/bridge: tfp410: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-38-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge/tc358775: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:08 +0000 (23:36 +0100)]
drm/bridge/tc358775: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-35-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: tc358768: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:07 +0000 (23:36 +0100)]
drm/bridge: tc358768: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-34-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: tc358767: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:06 +0000 (23:36 +0100)]
drm/bridge: tc358767: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-33-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: sii8620: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:05 +0000 (23:36 +0100)]
drm/bridge: sii8620: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-32-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: sii9234: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:04 +0000 (23:36 +0100)]
drm/bridge: sii9234: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-31-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: sii902x: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:03 +0000 (23:36 +0100)]
drm/bridge: sii902x: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-30-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: nxp-ptn3460: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:01 +0000 (23:36 +0100)]
drm/bridge: nxp-ptn3460: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-28-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: megachips: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:36:00 +0000 (23:36 +0100)]
drm/bridge: megachips: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-27-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: lt9611uxc: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:59 +0000 (23:35 +0100)]
drm/bridge: lt9611uxc: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-26-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: lt9611: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:58 +0000 (23:35 +0100)]
drm/bridge: lt9611: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-25-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: lt9211: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:57 +0000 (23:35 +0100)]
drm/bridge: lt9211: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-24-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: lt8912b: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:56 +0000 (23:35 +0100)]
drm/bridge: lt8912b: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-23-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: it66121: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:55 +0000 (23:35 +0100)]
drm/bridge: it66121: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-22-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: it6505: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:54 +0000 (23:35 +0100)]
drm/bridge: it6505: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-21-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: icn6211: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:52 +0000 (23:35 +0100)]
drm/bridge: icn6211: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-19-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: anx7625: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:51 +0000 (23:35 +0100)]
drm/bridge: anx7625: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-18-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge/analogix/anx78xx: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:50 +0000 (23:35 +0100)]
drm/bridge/analogix/anx78xx: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-17-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge/analogix/anx6345: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:49 +0000 (23:35 +0100)]
drm/bridge/analogix/anx6345: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118224540.619276-16-uwe@kleine-koenig.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
19 months agodrm/bridge: lt8912b: Add hot plug detection
Stefan Eichenberger [Mon, 28 Nov 2022 11:23:20 +0000 (12:23 +0100)]
drm/bridge: lt8912b: Add hot plug detection

Enable hot plug detection when it is available on the HDMI port.
Without this connecting to a different monitor with incompatible timing
before the 10 seconds poll period will lead to a broken display output.

Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Adrien Grassein <adrien.grassein@gmail.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221128112320.25708-1-francesco@dolcini.it
19 months agodrm/bridge: chrontel-ch7033: Convert to i2c's .probe_new()
Uwe Kleine-König [Fri, 18 Nov 2022 22:35:53 +0000 (23:35 +0100)]
drm/bridge: chrontel-ch7033: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://lore.kernel.org/all/20221118224540.619276-20-uwe@kleine-koenig.org/
19 months agodrm/gud: Fix missing include
Noralf Trønnes [Wed, 7 Dec 2022 19:51:25 +0000 (20:51 +0100)]
drm/gud: Fix missing include

Add missing vmalloc.h include.

Fixes: c17d048609bf ("drm/gud: Use the shadow plane helper")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221207-gud-missing-include-v1-0-c5b32c9c59da@tronnes.org
19 months agodrm/bridge: Document the expected behaviour of DSI host controllers
Dave Stevenson [Mon, 5 Dec 2022 17:33:28 +0000 (17:33 +0000)]
drm/bridge: Document the expected behaviour of DSI host controllers

The exact behaviour of DSI host controllers is not specified,
therefore define it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20221205173328.1395350-7-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/panel: Add prepare_prev_first flag to drm_panel
Dave Stevenson [Mon, 5 Dec 2022 17:33:27 +0000 (17:33 +0000)]
drm/panel: Add prepare_prev_first flag to drm_panel

Mapping to the drm_bridge flag pre_enable_prev_first,
add a new flag prepare_prev_first to drm_panel to allow
the panel driver to request that the upstream bridge should
be pre_enabled before the panel prepare.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20221205173328.1395350-6-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/bridge: Introduce pre_enable_prev_first to alter bridge init order
Dave Stevenson [Mon, 5 Dec 2022 17:33:26 +0000 (17:33 +0000)]
drm/bridge: Introduce pre_enable_prev_first to alter bridge init order

DSI sink devices typically want the DSI host powered up and configured
before they are powered up. pre_enable is the place this would normally
happen, but they are called in reverse order from panel/connector towards
the encoder, which is the "wrong" order.

Add a new flag pre_enable_prev_first that any bridge can set
to swap the order of pre_enable (and post_disable) for that and the
immediately previous bridge.
Should the immediately previous bridge also set the
pre_enable_prev_first flag, the previous bridge to that will be called
before either of those which requested pre_enable_prev_first.

eg:
- Panel
- Bridge 1
- Bridge 2 pre_enable_prev_first
- Bridge 3
- Bridge 4 pre_enable_prev_first
- Bridge 5 pre_enable_prev_first
- Bridge 6
- Encoder
Would result in pre_enable's being called as Panel, Bridge 1, Bridge 3,
Bridge 2, Bridge 6, Bridge 5, Bridge 4, Encoder.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://lore.kernel.org/r/20221205173328.1395350-5-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/bridge: Drop unused drm_bridge_chain functions
Sam Ravnborg [Mon, 5 Dec 2022 17:33:25 +0000 (17:33 +0000)]
drm/bridge: Drop unused drm_bridge_chain functions

The drm_bridge_chain_{pre_enable,enable,disable,post_disable} has no
users left and we have atomic variants that should be used.
Drop them so they do not gain new users.

Adjust a few comments to avoid references to the dropped functions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221205173328.1395350-4-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/mediatek: dp: Replace usage of drm_bridge_chain_ functions
Dave Stevenson [Mon, 5 Dec 2022 17:33:24 +0000 (17:33 +0000)]
drm/mediatek: dp: Replace usage of drm_bridge_chain_ functions

Commit f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort
driver") added usage of the drm_bridge_chain_ functions which are
to be deprecated.

Replace with the drm_atomic_bridge_chain_ variants using the
current state.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221205173328.1395350-3-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/bridge: ps8640: Use atomic variants of drm_bridge_funcs
Sam Ravnborg [Mon, 5 Dec 2022 17:33:23 +0000 (17:33 +0000)]
drm/bridge: ps8640: Use atomic variants of drm_bridge_funcs

The atomic variants of enable/disable in drm_bridge_funcs are the
preferred operations - introduce these.

The ps8640 driver used the non-atomic variants of the drm_bridge_chain_pre_enable/
drm_bridge_chain_post_disable - convert these to the atomic variants.

v2:
  - Init state operations in drm_bridge_funcs (Laurent)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Cc: Jitao Shi <jitao.shi@mediatek.com>
Cc: Philip Chen <philipchen@chromium.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221205173328.1395350-2-dave.stevenson@raspberrypi.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agoDocumentation: gpu: vc4: Add KUnit Tests Section
Maxime Ripard [Thu, 1 Dec 2022 15:11:51 +0000 (16:11 +0100)]
Documentation: gpu: vc4: Add KUnit Tests Section

Now that we have VC4-specific tests in place, let's document them
properly.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-20-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: tests: Add unit test suite for the PV muxing
Maxime Ripard [Thu, 1 Dec 2022 15:11:50 +0000 (16:11 +0100)]
drm/vc4: tests: Add unit test suite for the PV muxing

The HVS to PixelValve muxing code is fairly error prone and has a bunch
of arbitrary constraints due to the hardware setup.

Let's create a test suite that makes sure that the possible combinations
work and the invalid ones don't.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-19-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: tests: Fail the current test if we access a register
Maxime Ripard [Thu, 1 Dec 2022 15:11:49 +0000 (16:11 +0100)]
drm/vc4: tests: Fail the current test if we access a register

Accessing a register when running under kunit is a bad idea since our
device is completely mocked.

Fail the current test if we ever access any of our hardware registers.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-18-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: tests: Introduce a mocking infrastructure
Maxime Ripard [Thu, 1 Dec 2022 15:11:48 +0000 (16:11 +0100)]
drm/vc4: tests: Introduce a mocking infrastructure

In order to test the current atomic_check hooks we need to have a DRM
device that has roughly the same capabilities and layout that the actual
hardware. We'll also need a bunch of functions to create arbitrary
atomic states.

Let's create some helpers to create a device that behaves like the real
one, and some helpers to maintain the atomic state we want to check.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-17-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: hvs: Provide a function to initialize the HVS structure
Maxime Ripard [Thu, 1 Dec 2022 15:11:47 +0000 (16:11 +0100)]
drm/vc4: hvs: Provide a function to initialize the HVS structure

We'll need to initialize the HVS structure without a backing device to
create a mock we'll use for testing.

Split the structure initialization part into a separate function.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-16-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: crtc: Make encoder lookup helper public
Maxime Ripard [Thu, 1 Dec 2022 15:11:46 +0000 (16:11 +0100)]
drm/vc4: crtc: Make encoder lookup helper public

We'll need a function that looks up an encoder by its vc4_encoder_type.
Such a function is already present in the CRTC code, so let's make it
public so that we can reuse it in the unit tests.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-15-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: crtc: Introduce a lower-level crtc init helper
Maxime Ripard [Thu, 1 Dec 2022 15:11:45 +0000 (16:11 +0100)]
drm/vc4: crtc: Introduce a lower-level crtc init helper

The current vc4_crtc_init() helper assumes that we will be using
hardware planes and calls vc4_plane_init().

While it's a reasonable assumption, we'll want to mock the plane and
thus provide our own. Let's create a helper that will take the plane as
an argument.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-14-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/vc4: Move HVS state to main header
Maxime Ripard [Thu, 1 Dec 2022 15:11:44 +0000 (16:11 +0100)]
drm/vc4: Move HVS state to main header

In order to introduce unit tests for the HVS state computation, we'll
need access to the vc4_hvs_state struct definition and its associated
helpers.

Let's move them in our driver header.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-13-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: Add a test for DRM managed actions
Maxime Ripard [Thu, 1 Dec 2022 15:11:43 +0000 (16:11 +0100)]
drm/tests: Add a test for DRM managed actions

DRM-managed actions are supposed to be ran whenever the device is
released. Let's introduce a basic unit test to make sure it happens.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-12-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Allow to pass a custom drm_driver
Maxime Ripard [Thu, 1 Dec 2022 15:11:42 +0000 (16:11 +0100)]
drm/tests: helpers: Allow to pass a custom drm_driver

Some tests will need to provide their own drm_driver instead of relying
on the dumb one in the helpers, so let's create a helper that allows to
do so.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-11-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Allow for a custom device struct to be allocated
Maxime Ripard [Thu, 1 Dec 2022 15:11:41 +0000 (16:11 +0100)]
drm/tests: helpers: Allow for a custom device struct to be allocated

The current helper to allocate a DRM device doesn't allow for any
subclassing by drivers, which is going to be troublesome as we work on
getting some kunit testing on atomic modesetting code.

Let's use a similar pattern to the other allocation helpers by providing
the structure size and offset as arguments.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-10-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Make sure the device is bound
Maxime Ripard [Thu, 1 Dec 2022 15:11:40 +0000 (16:11 +0100)]
drm/tests: helpers: Make sure the device is bound

The device managed resources are freed when the device is detached, so
it has to be bound in the first place.

Let's create a fake driver that we will bind to our fake device to
benefit from the device managed cleanups in our tests.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-9-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Switch to a platform_device
Maxime Ripard [Thu, 1 Dec 2022 15:11:39 +0000 (16:11 +0100)]
drm/tests: helpers: Switch to a platform_device

The device managed resources are ran if the device has bus, which is not
the case of a root_device.

Let's use a platform_device instead.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-8-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Create the device in another function
Maxime Ripard [Thu, 1 Dec 2022 15:11:38 +0000 (16:11 +0100)]
drm/tests: helpers: Create the device in another function

We'll need in some tests to control when the device needs to be added
and removed, so let's split the device creation from the DRM device
creation function.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-7-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Remove the name parameter
Maxime Ripard [Thu, 1 Dec 2022 15:11:37 +0000 (16:11 +0100)]
drm/tests: helpers: Remove the name parameter

The device name isn't really useful, we can just define it instead of
exposing it in the API.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-6-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Rename the device init helper
Maxime Ripard [Thu, 1 Dec 2022 15:11:36 +0000 (16:11 +0100)]
drm/tests: helpers: Rename the device init helper

The name doesn't really fit the conventions for the other helpers in
DRM/KMS, so let's rename it to make it obvious that we allocate a new
DRM device.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-5-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Switch to EXPORT_SYMBOL_GPL
Maxime Ripard [Thu, 1 Dec 2022 15:11:35 +0000 (16:11 +0100)]
drm/tests: helpers: Switch to EXPORT_SYMBOL_GPL

drm_kunit_device_init() among other things will allocate a device and
wrap around root_device_register. This function is exported with
EXPORT_SYMBOL_GPL, so we can't really change the license.

Fixes: a77a3ffa151b ("drm/tests: helpers: Add missing export")
Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-4-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Document drm_kunit_device_init()
Maxime Ripard [Thu, 1 Dec 2022 15:11:34 +0000 (16:11 +0100)]
drm/tests: helpers: Document drm_kunit_device_init()

Commit 44a3928324e9 ("drm/tests: Add Kunit Helpers") introduced the
drm_kunit_device_init() function but didn't document it properly. Add
that documentation.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-3-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: Introduce a config option for the KUnit helpers
Maxime Ripard [Thu, 1 Dec 2022 15:11:33 +0000 (16:11 +0100)]
drm/tests: Introduce a config option for the KUnit helpers

Driver-specific tests will need access to the helpers without pulling
every DRM framework test. Let's create an intermediate Kconfig options
for the helpers.

Suggested-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-2-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm/tests: helpers: Move the helper header to include/drm
Maxime Ripard [Thu, 1 Dec 2022 15:11:32 +0000 (16:11 +0100)]
drm/tests: helpers: Move the helper header to include/drm

We'll need to use those helpers from drivers too, so let's move it to a
more visible location.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-1-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
19 months agodrm: panel-orientation-quirks: Add quirk for DynaBook K50
Allen Ballway [Wed, 30 Nov 2022 17:08:22 +0000 (17:08 +0000)]
drm: panel-orientation-quirks: Add quirk for DynaBook K50

Like the ASUS T100HAN for which there is already a quirk,
the DynaBook K50 has a 800x1280 portrait screen mounted
in the tablet part of a landscape oriented 2-in-1.
Update the quirk to be more generic and apply to this device.

Signed-off-by: Allen Ballway <ballway@chromium.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221130170811.1.Iee9a494547541dade9eeee9521cc8b811e76a8a0@changeid
19 months agodrm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F
Hans de Goede [Sun, 27 Nov 2022 18:15:39 +0000 (19:15 +0100)]
drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F

The Lenovo Yoga Tab 3 X90F has a portrait 1600x2560 LCD used in
landscape mode, add a quirk for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221127181539.104223-1-hdegoede@redhat.com
19 months agodrm/gud: Enable synchronous flushing by default
Noralf Trønnes [Wed, 30 Nov 2022 19:26:54 +0000 (20:26 +0100)]
drm/gud: Enable synchronous flushing by default

gud has a module parameter that controls whether framebuffer flushing
happens synchronously during the commit or asynchronously in a worker.

GNOME before version 3.38 handled all displays in the same rendering loop.
This lead to gud slowing down the refresh rate for a faster monitor. This
has now been fixed so lets change the default.

The plan is to remove async flushing in the future. The code is now
structured in a way that makes it easy to do this.

Link: https://blogs.gnome.org/shell-dev/2020/07/02/splitting-up-the-frame-clock/
Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-6-435037990a83@tronnes.org