aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drm/sprd: remove redundant error loggingDeepak R Varma2022-12-201-3/+1
| | | | | | | | | | | | | | A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma <drv@mailo.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/Y5XhPJ39ipMCcctq@qemulion
* drm/drv: Make use of local variable driver in drm_dev_register()Uwe Kleine-König2022-12-201-2/+2
| | | | | | | | | | There is a local variable that contains dev->driver. Make use of it instead of "open coding" it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221219183147.1639399-1-u.kleine-koenig@pengutronix.de
* drm/qxl: stop using ttm_bo_waitChristian König2022-12-191-2/+14
| | | | | | | | | 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> Acked-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-6-christian.koenig@amd.com
* drm/v3d: replace obj lookup steps with drm_gem_objects_lookupMelissa Wen2022-12-181-46/+3
| | | | | | | | | | As v3d_lookup_bos() performs the same steps as drm_gem_objects_lookup(), replace the explicit code in v3d to simply use the DRM function. Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221205135538.3545051-3-mwen@igalia.com
* drm/v3d: cleanup BOs properly when lookup_bos failsMelissa Wen2022-12-181-3/+3
| | | | | | | | | | | | | | When v3d_lookup_bos fails to `allocate validated BO pointers`, job->bo_count was already set to args->bo_count, but job->bo points to NULL. In this scenario, we must verify that job->bo is not NULL before iterating on it to proper clean up a job. Also, drm_gem_object_put already checks that the object passed is not NULL, doing the job->bo[i] checker redundant. Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221205135538.3545051-2-mwen@igalia.com
* drm/imx: move IPUv3 driver into separate subdirectoryLucas Stach2022-12-1613-49/+54
| | | | | | | | | | | | | The IPUv3 and DCSS driver are two totally separate DRM drivers. Having one of them live in the drivers/gpu/drm/imx toplevel directory and the other one in the dcss/ subdirectory is confusing. Move the IPUv3 driver into its own subdirectory to make the separation more clear. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/20221125112519.3849636-1-l.stach@pengutronix.de Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221125112519.3849636-1-l.stach@pengutronix.de
* drm/imx: ipuv3-plane: Fix overlay plane widthPhilipp Zabel2022-12-161-6/+8
| | | | | | | | | | | | | | | | | | ipu_src_rect_width() was introduced to support odd screen resolutions such as 1366x768 by internally rounding up primary plane width to a multiple of 8 and compensating with reduced horizontal blanking. This also caused overlay plane width to be rounded up, which was not intended. Fix overlay plane width by limiting the rounding up to the primary plane. drm_rect_width(&new_state->src) >> 16 is the same value as drm_rect_width(dst) because there is no plane scaling support. Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix") Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20221108141420.176696-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221108141420.176696-1-p.zabel@pengutronix.de
* gpu: ipu-v3: common: Add of_node_put() for reference returned by ↵Liang He2022-12-161-0/+1
| | | | | | | | | | | | | | 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
* drm/omap: dsi: Fix excessive stack usageTomi Valkeinen2022-12-161-10/+16
| | | | | | | | | | | | | | | | | 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
* drm/omapdrm: Remove unused struct csc_coef_rgb2yuvYuan Can2022-12-161-5/+0
| | | | | | | | | | | 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
* drm: tidss: Fix pixel format definitionRandolph Sapp2022-12-161-2/+2
| | | | | | | | | | | | | | | | 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
* drm/tidss: Set max DMA segment sizeAndrew Davis2022-12-161-0/+2
| | | | | | | | 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
* drm/display/dp_mst: Fix payload addition on a disconnected sinkImre Deak2022-12-161-1/+6
| | | | | | | | | | | | | | | | | | | 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
* drm/display/dp_mst: Fix down message handling after a packet reception errorImre Deak2022-12-161-1/+1
| | | | | | | | | | | | | | | | 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
* drm/display/dp_mst: Fix down/up message handling after sink disconnectImre Deak2022-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* drm: bridge: it66121: Add support for the IT6610Paul Cercueil2022-12-161-22/+86
| | | | | | | | | | | | | 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
* drm: bridge: it66121: Move VID/PID to new it66121_chip_info structurePaul Cercueil2022-12-161-12/+15
| | | | | | | | | 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
* drm: bridge: it66121: Set DDC preamble only once before reading EDIDPaul Cercueil2022-12-161-12/+16
| | | | | | | | | 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
* drm: bridge: it66121: Don't clear DDC FIFO twicePaul Cercueil2022-12-161-16/+0
| | | | | | | | | | 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
* drm: bridge: it66121: Don't use DDC error IRQsPaul Cercueil2022-12-161-39/+10
| | | | | | | | | | 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
* drm: bridge: it66121: Fix wait for DDC readyPaul Cercueil2022-12-161-8/+7
| | | | | | | | | | | | | | | | | | | 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
* drm: bridge: it66121: Write AVI infoframe with regmap_bulk_write()Paul Cercueil2022-12-161-20/+7
| | | | | | | | | 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
* drm: bridge: it66121: Use regmap_noinc_read()Paul Cercueil2022-12-161-7/+6
| | | | | | | | | 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
* drm: bridge: it66121: Use devm_regulator_bulk_get_enable()Paul Cercueil2022-12-161-26/+8
| | | | | | | | | | 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
* drm/bridge: add it6505 driver to read data-lanes and link-frequencies from dtallen chen2022-12-151-3/+77
| | | | | | | | | | | | 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
* drm/bridge: it6505: Add caching for EDIDPin-yen Lin2022-12-151-6/+19
| | | | | | | | | | | | | 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
* drm/bridge: lt9611: Fix PLL being unable to lockRobert Foss2022-12-151-0/+1
| | | | | | | | | | | | | | | 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
* drm/vc4: dsi: Remove entry to ULPS from vc4_dsi post_disableDave Stevenson2022-12-151-2/+0
| | | | | | | | | | | | | | | | 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>
* drm/vc4: dsi: Convert to using a bridge instead of encoderDave Stevenson2022-12-151-31/+90
| | | | | | | | | | | | | | | | | 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>
* drm/vc4: dsi: Convert to use atomic operationsDave Stevenson2022-12-151-8/+15
| | | | | | | | | | 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>
* drm/vc4: dsi: Remove splitting the bridge chain from the driverDave Stevenson2022-12-151-47/+0
| | | | | | | | | | | | | 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>
* drm/vc4: dsi: Move initialisation to encoder_mode_setDave Stevenson2022-12-151-4/+12
| | | | | | | | | | | | 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>
* drm/vc4: dsi: Rename bridge to out_bridgeDave Stevenson2022-12-151-6/+6
| | | | | | | | | | 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>
* drm/bridge: it6505: Guard bridge power in IRQ handlerPin-yen Lin2022-12-141-14/+8
| | | | | | | | | | | | | 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
* drm/tiny: panel-mipi-dbi: Read I/O supply from DTOtto Pflüger2022-12-141-0/+5
| | | | | | | | | | | | 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
* drm/mipi-dbi: Support separate I/O regulatorOtto Pflüger2022-12-141-0/+14
| | | | | | | | | | | | | | 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
* drm/i915: stop using ttm_bo_waitChristian König2022-12-131-3/+6
| | | | | | | | | 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
* drm/bridge: anx7625: keep last configure timingXin Ji2022-12-121-1/+0
| | | | | | | | | | | | 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
* drm/bridge: ti-sn65dsi83: Convert to i2c's .probe_new()Uwe Kleine-König2022-12-121-3/+3
| | | | | | | | | | .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>
* drm/bridge: parade-ps8622: Convert to i2c's .probe_new()Uwe Kleine-König2022-12-121-3/+3
| | | | | | | | | | .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>
* drm/bridge: adv7511: Convert to i2c's .probe_new()Uwe Kleine-König2022-12-121-2/+3
| | | | | | | | | | .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>
* Merge branch 'i2c/client_device_id_helper-immutable' of ↵Robert Foss2022-12-121-0/+14
|\ | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/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.
| * i2c: core: Introduce i2c_client_get_device_id helper functionAngel Iglesias2022-11-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces new helper function to aid in .probe_new() refactors. In order to use existing i2c_get_device_id() on the probe callback, the device match table needs to be accessible in that function, which would require bigger refactors in some drivers using the deprecated .probe callback. This issue was discussed in more detail in the IIO mailing list. Link: https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ Suggested-by: Nuno Sá <noname.nuno@gmail.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* | drm: exynos: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-129-75/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm/i915/gt: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm: gm12u320: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm: vboxvideo: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm: tilcdc: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm: shmobile: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | drm: rcar-du: Remove #ifdef guards for PM related functionsPaul Cercueil2022-12-121-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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