linux-block.git
5 months agodt-bindings: display: sony, td4353-jdi: allow width-mm and height-mm
Krzysztof Kozlowski [Mon, 25 Mar 2024 10:32:27 +0000 (11:32 +0100)]
dt-bindings: display: sony, td4353-jdi: allow width-mm and height-mm

Allow width and height properties from panel-common.yaml, already used
on some boards:

  sdm845-sony-xperia-tama-apollo.dtb: panel@0: 'height-mm', 'width-mm' do not match any of the regexes: 'pinctrl-[0-9]+'

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240325103227.27474-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325103227.27474-1-krzysztof.kozlowski@linaro.org
5 months agodt-bindings: display: novatek, nt36523: define ports
Krzysztof Kozlowski [Mon, 25 Mar 2024 10:36:11 +0000 (11:36 +0100)]
dt-bindings: display: novatek, nt36523: define ports

The panel-common schema does not define what "ports" property is, so
bring the definition by referencing the panel-common-dual.yaml. Panels
can be single- or dual-link, depending on the compatible, thus add
if:then:else: block narrowing ports per variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240325103611.28240-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325103611.28240-3-krzysztof.kozlowski@linaro.org
5 months agodt-bindings: display: novatek, nt35950: define ports
Krzysztof Kozlowski [Mon, 25 Mar 2024 10:36:10 +0000 (11:36 +0100)]
dt-bindings: display: novatek, nt35950: define ports

The panel-common schema does not define what "ports" property is, so
bring the definition by referencing the panel-common-dual.yaml. Panels
can be single- or dual-link, thus require only one port@0.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240325103611.28240-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325103611.28240-2-krzysztof.kozlowski@linaro.org
5 months agodt-bindings: display: panel: add common dual-link schema
Krzysztof Kozlowski [Mon, 25 Mar 2024 10:36:09 +0000 (11:36 +0100)]
dt-bindings: display: panel: add common dual-link schema

Add schema with common properties shared among dual-link panel ICs.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240325103611.28240-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325103611.28240-1-krzysztof.kozlowski@linaro.org
5 months agodrm/imagination: avoid -Woverflow warning
Arnd Bergmann [Fri, 22 Mar 2024 13:01:09 +0000 (14:01 +0100)]
drm/imagination: avoid -Woverflow warning

The array size calculation in pvr_vm_mips_fini() appears to be incorrect based on
taking the size of the pointer rather than the size of the array, which manifests
as a warning about signed integer overflow:

In file included from include/linux/kernel.h:16,
                 from drivers/gpu/drm/imagination/pvr_rogue_fwif.h:10,
                 from drivers/gpu/drm/imagination/pvr_ccb.h:7,
                 from drivers/gpu/drm/imagination/pvr_device.h:7,
                 from drivers/gpu/drm/imagination/pvr_vm_mips.c:4:
drivers/gpu/drm/imagination/pvr_vm_mips.c: In function 'pvr_vm_mips_fini':
include/linux/array_size.h:11:25: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Werror=overflow]
   11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
      |                         ^
drivers/gpu/drm/imagination/pvr_vm_mips.c:106:24: note: in expansion of macro 'ARRAY_SIZE'
  106 |         for (page_nr = ARRAY_SIZE(mips_data->pt_pages) - 1; page_nr >= 0; page_nr--) {
      |                        ^~~~~~~~~~

Just use the number of array elements directly here, and in the corresponding
init function for consistency.

Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and MMU support")
Reviewed-by: Donald Robson <donald.robson@imgtec.com>
Link: https://lore.kernel.org/lkml/9df9e4f87727399928c068dbbf614c9895ae15f9.camel@imgtec.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
5 months agodrm/panthor: Don't use virt_to_pfn()
Steven Price [Mon, 18 Mar 2024 14:51:19 +0000 (14:51 +0000)]
drm/panthor: Don't use virt_to_pfn()

virt_to_pfn() isn't available on x86 (except to xen) so breaks
COMPILE_TEST builds. Avoid its use completely by instead storing the
struct page pointer allocated in panthor_device_init() and using
page_to_pfn() instead.

Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318145119.368582-1-steven.price@arm.com
5 months agodrm/panthor: Fix the CONFIG_PM=n case
Boris Brezillon [Mon, 18 Mar 2024 15:31:17 +0000 (16:31 +0100)]
drm/panthor: Fix the CONFIG_PM=n case

Putting a hard dependency on CONFIG_PM is not possible because of a
circular dependency issue, and it's actually not desirable either. In
order to support this use case, we forcibly resume at init time, and
suspend at unplug time.

v2:
- Drop the #ifdef CONFIG_PM section around panthor_pm_ops's definition

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.EOimQ8WK-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318153117.1321544-1-boris.brezillon@collabora.com
6 months agodrm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert
Douglas Anderson [Wed, 13 Mar 2024 21:12:14 +0000 (14:12 -0700)]
drm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert

When the atna33xc20 driver was first written the resume code never
returned an error. If there was a problem waiting for HPD it just
printed a warning and moved on. This changed in response to review
feedback [1] on a future patch but I accidentally didn't account for
rolling back the regulator enable in the error cases. Do so now.

[1] https://lore.kernel.org/all/5f3cf3a6-1cc2-63e4-f76b-4ee686764705@linaro.org/

Fixes: 3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313-homestarpanel-regulator-v1-1-b8e3a336da12@chromium.org
6 months agodrm/ttm: warn when resv objs are mixed in a bulk_move
Christian König [Tue, 12 Mar 2024 10:37:58 +0000 (11:37 +0100)]
drm/ttm: warn when resv objs are mixed in a bulk_move

The BOs in a bulk move must share all the same reservation object
to make sure that we lock the whole bulk during eviction.

Actually document and enforce that with a warning.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240312105555.3065-1-christian.koenig@amd.com
6 months agodrm/lcdif: Do not disable clocks on already suspended hardware
Marek Vasut [Mon, 26 Feb 2024 08:26:27 +0000 (09:26 +0100)]
drm/lcdif: Do not disable clocks on already suspended hardware

In case the LCDIF is enabled in DT but unused, the clocks used by the
LCDIF are not enabled. Those clocks may even have a use count of 0 in
case there are no other users of those clocks. This can happen e.g. in
case the LCDIF drives HDMI bridge which has no panel plugged into the
HDMI connector.

Do not attempt to disable clocks in the suspend callback and re-enable
clocks in the resume callback unless the LCDIF is enabled and was in
use before the system entered suspend, otherwise the driver might end
up trying to disable clocks which are already disabled with use count
0, and would trigger a warning from clock core about this condition.

Note that the lcdif_rpm_suspend() and lcdif_rpm_resume() functions
internally perform the clocks disable and enable operations and act
as runtime PM hooks too.

Reviewed-by: Liu Ying <victor.liu@nxp.com>
Fixes: 9db35bb349a0 ("drm: lcdif: Add support for i.MX8MP LCDIF variant")
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240226082644.32603-1-marex@denx.de
6 months agodrm/panel: simple: Add POWERTIP PH128800T006-ZHC01 panel entry
Nathan Morrisson [Mon, 18 Mar 2024 16:17:08 +0000 (09:17 -0700)]
drm/panel: simple: Add POWERTIP PH128800T006-ZHC01 panel entry

Add support for the POWERTIP PH128800T006-ZHC01 10.1" (1280x800)
LCD-TFT panel.

Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/20240318161708.1415484-3-nmorrisson@phytec.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318161708.1415484-3-nmorrisson@phytec.com
6 months agodt-bindings: display: simple: Add POWERTIP PH128800T-006-ZHC01 panel
Nathan Morrisson [Mon, 18 Mar 2024 16:17:07 +0000 (09:17 -0700)]
dt-bindings: display: simple: Add POWERTIP PH128800T-006-ZHC01 panel

Add POWERTIP PH128800T-006-ZHC01 10.1" LCD-TFT LVDS panel compatible
string.

Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240318161708.1415484-2-nmorrisson@phytec.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318161708.1415484-2-nmorrisson@phytec.com
6 months agodrm: bridge: thc63lvd1024: Print error message when DT parsing fails
Laurent Pinchart [Mon, 18 Mar 2024 16:06:01 +0000 (18:06 +0200)]
drm: bridge: thc63lvd1024: Print error message when DT parsing fails

Commit 00084f0c01bf ("drm: bridge: thc63lvd1024: Switch to use
of_graph_get_remote_node()") simplified the thc63lvd1024 driver by
replacing hand-rolled code with a helper function. While doing so, it
created an error code path at probe time without any error message,
potentially causing probe issues that get annoying to debug. Fix it by
adding an error message.

Fixes: 00084f0c01bf ("drm: bridge: thc63lvd1024: Switch to use of_graph_get_remote_node()")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240318160601.2813-1-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318160601.2813-1-laurent.pinchart+renesas@ideasonboard.com
6 months agodrm: bridge: thc63lvd1024: Switch to use of_graph_get_remote_node()
Sui Jingfeng [Sat, 16 Mar 2024 17:28:00 +0000 (01:28 +0800)]
drm: bridge: thc63lvd1024: Switch to use of_graph_get_remote_node()

To reduce boilerplate, use of_graph_get_remote_node() helper instead of
the hand-rolling code.

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240316172800.1168390-1-sui.jingfeng@linux.dev
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240316172800.1168390-1-sui.jingfeng@linux.dev
6 months agodrm/bridge: it66121: Remove a duplicated invoke of of_device_is_available()
Sui Jingfeng [Sat, 16 Mar 2024 17:44:19 +0000 (01:44 +0800)]
drm/bridge: it66121: Remove a duplicated invoke of of_device_is_available()

The calling of of_device_is_available() in it66121_probe() is duplicated,
as the of_graph_get_remote_node() has already do the check for us. There
is no need to call it again, thus delete the later one.

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240316174419.1170460-1-sui.jingfeng@linux.dev
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240316174419.1170460-1-sui.jingfeng@linux.dev
6 months agodrm: bridge: dw_hdmi: Switch to of_graph_get_remote_node()
Sui Jingfeng [Sat, 16 Mar 2024 17:05:13 +0000 (01:05 +0800)]
drm: bridge: dw_hdmi: Switch to of_graph_get_remote_node()

To reduce boilerplate, use of_graph_get_remote_node() helper instead of
the hand-rolling code.

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240316170513.1159724-1-sui.jingfeng@linux.dev
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240316170513.1159724-1-sui.jingfeng@linux.dev
6 months agodrm/bridge: ite66121: Register HPD interrupt handler only when 'client->irq > 0'
Sui Jingfeng [Sat, 16 Mar 2024 16:05:36 +0000 (00:05 +0800)]
drm/bridge: ite66121: Register HPD interrupt handler only when 'client->irq > 0'

If a specific design doesn't wire IT66121's interrupt signal output pin up
to the display controller side, then we should not register the interrupt
handler. Such a decision is valid usage, as we can fall back to polling
mode. So, don't make the assumption that a specific board always supports
HPD. Carry out a sanity check on 'client->irq' before using it, fall back
to polling mode if client->irq < 0 is true. Such a design increases the
overall flexibility.

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240316160536.1051513-1-sui.jingfeng@linux.dev
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240316160536.1051513-1-sui.jingfeng@linux.dev
6 months agodrm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep
Laurent Pinchart [Sun, 17 Mar 2024 15:48:39 +0000 (17:48 +0200)]
drm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep

The ilitek-ili9881c controls the reset GPIO using the non-sleeping
gpiod_set_value() function. This complains loudly when the GPIO
controller needs to sleep. As the caller can sleep, use
gpiod_set_value_cansleep() to fix the issue.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240317154839.21260-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240317154839.21260-1-laurent.pinchart@ideasonboard.com
6 months agodrm/panel: ilitek-ili9881c: Add Startek KD050HDFIA020-C020A support
Laurent Pinchart [Sun, 17 Mar 2024 15:57:46 +0000 (17:57 +0200)]
drm/panel: ilitek-ili9881c: Add Startek KD050HDFIA020-C020A support

Add support for the Startek KD050HDFIA020-C020A panel.

The init table comes from the Compulab BSP ([1]).

[1] https://github.com/compulab-yokneam/meta-bsp-imx8mp/blob/ucm-imx8m-plus-r1.1/recipes-kernel/linux/compulab/imx8mp/0000-compulab-imx8m-plus-Add-boards-support.patch

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240317155746.23034-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240317155746.23034-3-laurent.pinchart@ideasonboard.com
6 months agodt-bindings: ili9881c: Add Startek KD050HDFIA020-C020A support
Laurent Pinchart [Sun, 17 Mar 2024 15:57:45 +0000 (17:57 +0200)]
dt-bindings: ili9881c: Add Startek KD050HDFIA020-C020A support

Document the compatible value for Startek KD050HDFIA020-C020A panels.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240317155746.23034-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240317155746.23034-2-laurent.pinchart@ideasonboard.com
6 months agodrm/omapdrm: Fix console with deferred ops
Tony Lindgren [Wed, 28 Feb 2024 06:35:32 +0000 (08:35 +0200)]
drm/omapdrm: Fix console with deferred ops

Commit 95da53d63dcf ("drm/omapdrm: Use regular fbdev I/O helpers")
stopped console from updating for command mode displays because there is
no damage handling in fb_sys_write() unlike we had earlier in
drm_fb_helper_sys_write().

Let's fix the issue by adding FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS and
FB_DMAMEM_HELPERS_DEFERRED as suggested by Thomas. We cannot use the
FB_DEFAULT_DEFERRED_OPS as fb_deferred_io_mmap() won't work properly
for write-combine.

Fixes: 95da53d63dcf ("drm/omapdrm: Use regular fbdev I/O helpers")
Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240228063540.4444-3-tony@atomide.com
6 months agodrm/omapdrm: Fix console by implementing fb_dirty
Tony Lindgren [Wed, 28 Feb 2024 06:35:31 +0000 (08:35 +0200)]
drm/omapdrm: Fix console by implementing fb_dirty

The framebuffer console stopped updating with commit f231af498c29
("drm/fb-helper: Disconnect damage worker from update logic").

Let's fix the issue by implementing fb_dirty similar to what was done
with commit 039a72ce7e57 ("drm/i915/fbdev: Implement fb_dirty for intel
custom fb helper").

Fixes: f231af498c29 ("drm/fb-helper: Disconnect damage worker from update logic")
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240228063540.4444-2-tony@atomide.com
6 months agodrm/nouveau/dp: Fix incorrect return code in r535_dp_aux_xfer()
Lyude Paul [Fri, 15 Mar 2024 21:20:56 +0000 (17:20 -0400)]
drm/nouveau/dp: Fix incorrect return code in r535_dp_aux_xfer()

I've recently been seeing some unexplained GSP errors on my RTX 6000 from
failed aux transactions:

  [  132.915867] nouveau 0000:1f:00.0: gsp: cli:0xc1d00002 obj:0x00730000
  ctrl cmd:0x00731341 failed: 0x0000ffff

While the cause of these is not yet clear, these messages made me notice
that the aux transactions causing these transactions were succeeding - not
failing. As it turns out, this is because we're currently not returning the
correct variable when r535_dp_aux_xfer() hits an error - causing us to
never propagate GSP errors for failed aux transactions to userspace.

So, let's fix that.

Fixes: 4ae3a20102b2 ("nouveau/gsp: don't free ctrl messages on errors")
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240315212104.776936-1-lyude@redhat.com
6 months agodrm/panel-edp: Fix AUO 0x405c panel naming and add a variant
Hsin-Yi Wang [Thu, 7 Mar 2024 22:57:45 +0000 (14:57 -0800)]
drm/panel-edp: Fix AUO 0x405c panel naming and add a variant

There are 2 different AUO panels using the same panel id. One of the
variants requires using overridden modes to resolve glitching issue as
described in commit 70e0d5550f5c ("drm/panel-edp: Add auo_b116xa3_mode").
Other variants should use the modes parsed from EDID.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-6-hsinyi@chromium.org
6 months agodrm/panel-edp: Match edp_panels with panel identity
Hsin-Yi Wang [Thu, 7 Mar 2024 22:57:44 +0000 (14:57 -0800)]
drm/panel-edp: Match edp_panels with panel identity

It's found that some panels have variants that they share the same panel id
although their EDID and names are different. When matching generic edp
panels, we should first match with both panel identity, which contains both
panel id and panel name. If not found, match with panel id only.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-5-hsinyi@chromium.org
6 months agodrm/edid: Match edid quirks with identity
Hsin-Yi Wang [Thu, 7 Mar 2024 22:57:43 +0000 (14:57 -0800)]
drm/edid: Match edid quirks with identity

Currently edid quirks are matched by panel id only.

Modify it to match with identity so it's easier to be extended
for more complex matching if required.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-4-hsinyi@chromium.org
6 months agodrm/edid: Add a function to match EDID with identity
Hsin-Yi Wang [Thu, 7 Mar 2024 22:57:42 +0000 (14:57 -0800)]
drm/edid: Add a function to match EDID with identity

Create a type drm_edid_ident as the identity of an EDID. Currently it
contains panel id and monitor name.

Create a function that can match a given EDID and an identity:
1. Reject if the panel id doesn't match.
2. If name is not null in identity, try to match it in the detailed timing
   blocks. Note that some panel vendors put the monitor name after
   EDID_DETAIL_MONITOR_STRING.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-3-hsinyi@chromium.org
6 months agodrm_edid: Add a function to get EDID base block
Hsin-Yi Wang [Thu, 7 Mar 2024 22:57:41 +0000 (14:57 -0800)]
drm_edid: Add a function to get EDID base block

It's found that some panels have variants that they share the same panel id
although their EDID and names are different. Besides panel id, now we need
more information from the EDID base block to distinguish these panel
variants.

Add drm_edid_read_base_block() to return the EDID base block, which is
wrapped in struct drm_edid.

Caller can further use it to get panel id or check if the block contains
certain strings, such as panel name.

Merge drm_edid_get_panel_id() and edid_extract_panel_id() into one
function.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307230653.1807557-2-hsinyi@chromium.org
6 months agodrm/panel: simple: add CMT430B19N00 LCD panel support
Jérémie Dautheribes [Wed, 13 Mar 2024 17:20:16 +0000 (18:20 +0100)]
drm/panel: simple: add CMT430B19N00 LCD panel support

Add support for Crystal Clear Technology CMT430B19N00 4.3" 480x272
TFT-LCD panel.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240313172016.387277-4-jeremie.dautheribes@bootlin.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313172016.387277-4-jeremie.dautheribes@bootlin.com
6 months agodt-bindings: display: simple: add support for Crystal Clear CMT430B19N00
Jérémie Dautheribes [Wed, 13 Mar 2024 17:20:15 +0000 (18:20 +0100)]
dt-bindings: display: simple: add support for Crystal Clear CMT430B19N00

Add Crystal Clear Technology CMT430B19N00 4.3" 480x272 TFT-LCD panel
compatible string.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
Link: https://lore.kernel.org/r/20240313172016.387277-3-jeremie.dautheribes@bootlin.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313172016.387277-3-jeremie.dautheribes@bootlin.com
6 months agodt-bindings: Add Crystal Clear Technology vendor prefix
Jérémie Dautheribes [Wed, 13 Mar 2024 17:20:14 +0000 (18:20 +0100)]
dt-bindings: Add Crystal Clear Technology vendor prefix

Update Documentation/devicetree/bindings/vendor-prefixes.yaml to
include "cct" as a vendor prefix for "Crystal Clear Technology". CCT is
the vendor of the CMT430B19N00 TFT-LCD panel.

Link: http://www.cct.com.my/
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
Link: https://lore.kernel.org/r/20240313172016.387277-2-jeremie.dautheribes@bootlin.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313172016.387277-2-jeremie.dautheribes@bootlin.com
6 months agodrm/shmem-helper: Remove duplicate include
Jiapeng Chong [Mon, 20 Mar 2023 01:58:29 +0000 (09:58 +0800)]
drm/shmem-helper: Remove duplicate include

./drivers/gpu/drm/drm_gem_shmem_helper.c: linux/module.h is included more than once.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4567
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320015829.52988-1-jiapeng.chong@linux.alibaba.com
6 months agoMAINTAINERS: Update drm-misc web page
Maxime Ripard [Wed, 6 Mar 2024 15:38:39 +0000 (16:38 +0100)]
MAINTAINERS: Update drm-misc web page

This URL gets redirected to the Intel landing page now. Let's switch the
webpage to freedesktop.

Link: https://lore.kernel.org/r/20240306153841.698693-2-mripard@kernel.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 months agoMAINTAINERS: Update drm-misc.git URL
Maxime Ripard [Wed, 6 Mar 2024 15:38:38 +0000 (16:38 +0100)]
MAINTAINERS: Update drm-misc.git URL

Now that the drm-misc tree has moved to Gitlab, adjust the MAINTAINERS
git trees to reflect the location change.

Link: https://lore.kernel.org/r/20240306153841.698693-1-mripard@kernel.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 months agodrm/qxl: Do not pin buffer objects for vmap
Thomas Zimmermann [Tue, 27 Feb 2024 10:15:00 +0000 (11:15 +0100)]
drm/qxl: Do not pin buffer objects for vmap

Pin and vmap are distinct operations. Do not perform a pin as part
of the vmap call. This used to be necessary to keep the fbdev buffer
in place while it is being updated. Fbdev emulation has meanwhile
been fixed to lock the buffer correctly. Same for vunmap.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-14-tzimmermann@suse.de
6 months agodrm/gem-vram: Do not pin buffer objects for vmap
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:59 +0000 (11:14 +0100)]
drm/gem-vram: Do not pin buffer objects for vmap

Pin and vmap are distinct operations. Do not perform a pin as part
of the vmap call. This used to be necessary to keep the fbdev buffer
in place while it is being updated. Fbdev emulation has meanwhile
been fixed to lock the buffer correctly. Same for vunmap.

For refactoring the code, remove the pin calls from the helper's
vmap implementation in drm_gem_vram_vmap() and inline the call to
drm_gem_vram_kmap_locked(). This gives a vmap helper that only
maps the buffer object's memory pages without pinning or locking.
Do a similar refactoring for vunmap.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-13-tzimmermann@suse.de
6 months agodrm/client: Pin vmap'ed GEM buffers
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:58 +0000 (11:14 +0100)]
drm/client: Pin vmap'ed GEM buffers

The function drm_client_buffer_vmap() establishes a long-term mapping
of the client's buffer object into the kernel address space. Make sure
that buffer does not move by pinning it to its current location. Same
for vunmap with unpin.

The only caller of drm_client_buffer_vmap() is fbdev-dma, which uses
gem-dma. As DMA-backed GEM buffers do not move, this change is for
correctness with little impact in practice.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-12-tzimmermann@suse.de
6 months agodrm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:57 +0000 (11:14 +0100)]
drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()

Temporarily lock the fbdev buffer object during updates to prevent
memory managers from evicting/moving the buffer. Moving a buffer
object while update its content results in undefined behaviour.

Fbdev-generic updates its buffer object from a shadow buffer. Gem-shmem
and gem-dma helpers do not move buffer objects, so they are safe to be
used with fbdev-generic. Gem-vram and qxl are based on TTM, but pin
buffer objects are part of the vmap operation. So both are also safe
to be used with fbdev-generic.

Amdgpu and nouveau do not pin or lock the buffer object during an
update. Their TTM-based memory management could move the buffer object
while the update is ongoing.

The new vmap_local and vunmap_local helpers hold the buffer object's
reservation lock during the buffer update. This prevents moving the
buffer object on all memory managers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-11-tzimmermann@suse.de
6 months agodrm/gem: Acquire reservation lock in drm_gem_{pin/unpin}()
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:56 +0000 (11:14 +0100)]
drm/gem: Acquire reservation lock in drm_gem_{pin/unpin}()

Acquire the buffer object's reservation lock in drm_gem_pin() and
remove locking the drivers' GEM callbacks where necessary. Same for
unpin().

DRM drivers and memory managers modified by this patch will now have
correct dma-buf locking semantics: the caller is responsible for
holding the reservation lock when calling the pin or unpin callback.

DRM drivers and memory managers that are not modified will now be
protected against concurent invocation of their pin and unpin callbacks.

PRIME does not implement struct dma_buf_ops.pin, which requires
the caller to hold the reservation lock. It does implement struct
dma_buf_ops.attach, which requires to callee to acquire the
reservation lock. The PRIME code uses drm_gem_pin(), so locks
are now taken as specified. Same for unpin and detach.

The patch harmonizes GEM pin and unpin to have non-interruptible
reservation locking across all drivers, as is already the case for
vmap and vunmap. This affects gem-shmem, gem-vram, loongson, qxl and
radeon.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-10-tzimmermann@suse.de
6 months agodrm/qxl: Acquire reservation lock in GEM pin/unpin callbacks
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:55 +0000 (11:14 +0100)]
drm/qxl: Acquire reservation lock in GEM pin/unpin callbacks

Acquire the reservation lock directly in GEM pin callback. Same for
unpin. Prepares for further changes.

Dma-buf locking semantics require callers to hold the buffer's
reservation lock when invoking the pin and unpin callbacks. Prepare
qxl accordingly by pushing locking out of the implementation. A
follow-up patch will fix locking for all GEM code at once.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-9-tzimmermann@suse.de
6 months agodrm/qxl: Provide qxl_bo_{pin,unpin}_locked()
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:54 +0000 (11:14 +0100)]
drm/qxl: Provide qxl_bo_{pin,unpin}_locked()

Rename __qxl_bo_pin() to qxl_bo_pin_locked() and update all callers.
The function will be helpful for implementing the GEM pin callback
with correct semantics. Same for __qxl_bo_unpin().

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-8-tzimmermann@suse.de
6 months agodrm/nouveau: Acquire reservation lock in GEM pin/unpin callbacks
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:53 +0000 (11:14 +0100)]
drm/nouveau: Acquire reservation lock in GEM pin/unpin callbacks

Acquire the reservation lock directly in GEM pin callback. Same for
unpin. Prepares for further changes.

Dma-buf locking semantics require callers to hold the buffer's
reservation lock when invoking the pin and unpin callbacks. Prepare
nouveau accordingly by pushing locking out of the implementation. A
follow-up patch will fix locking for all GEM code at once.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-7-tzimmermann@suse.de
6 months agodrm/nouveau: Provide nouveau_bo_{pin,unpin}_locked()
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:52 +0000 (11:14 +0100)]
drm/nouveau: Provide nouveau_bo_{pin,unpin}_locked()

Implement pinning without locking in nouveau_bo_pin_locked(). Keep
nouveau_bo_pin() for acquiring the buffer object's reservation lock.
The new helper will be useful for implementing the GEM pin callback
with correct semantics. Same for unpin.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-6-tzimmermann@suse.de
6 months agodrm/msm: Acquire reservation lock in GEM pin/unpin callback
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:51 +0000 (11:14 +0100)]
drm/msm: Acquire reservation lock in GEM pin/unpin callback

Export msm_gem_pin_pages_locked() and acquire the reservation lock
directly in GEM pin callback. Same for unpin. Prepares for further
changes.

Dma-buf locking semantics require callers to hold the buffer's
reservation lock when invoking the pin and unpin callbacks. Prepare
msm accordingly by pushing locking out of the implementation. A
follow-up patch will fix locking for all GEM code at once.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-5-tzimmermann@suse.de
6 months agodrm/msm: Provide msm_gem_get_pages_locked()
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:50 +0000 (11:14 +0100)]
drm/msm: Provide msm_gem_get_pages_locked()

Rename msm_gem_pin_pages_locked() to msm_gem_get_pages_locked(). The
function doesn't pin any pages, but only acquires them. Renaming the
function makes the old name available.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-4-tzimmermann@suse.de
6 months agodrm/gem-vram: Acquire reservation lock in GEM pin/unpin callbacks
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:49 +0000 (11:14 +0100)]
drm/gem-vram: Acquire reservation lock in GEM pin/unpin callbacks

Acquire the reservation lock directly in GEM pin callback. Same for
unpin. Prepares for further changes.

Dma-buf locking semantics require callers to hold the buffer's
reservation lock when invoking the pin and unpin callbacks. Prepare
gem-vram accordingly by pushing locking out of the implementation.
A follow-up patch will fix locking for all GEM code at once.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-3-tzimmermann@suse.de
6 months agodrm/gem-shmem: Acquire reservation lock in GEM pin/unpin callbacks
Thomas Zimmermann [Tue, 27 Feb 2024 10:14:48 +0000 (11:14 +0100)]
drm/gem-shmem: Acquire reservation lock in GEM pin/unpin callbacks

Export drm_gem_shmem_pin_locked() and acquire the reservation lock
directly in GEM pin callback. Same for unpin. Prepares for further
changes.

Dma-buf locking semantics require callers to hold the buffer's
reservation lock when invoking the pin and unpin callbacks. Prepare
gem-shmem accordingly by pushing locking out of the implementation.
A follow-up patch will fix locking for all GEM code at once.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-gpu
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-2-tzimmermann@suse.de
6 months agodrm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 11:55:42 +0000 (13:55 +0200)]
drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings

Mark some members private to silence kernel-doc warnings, and add FIXME
comments.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ffc58be256d71e6a98eb9f13337add64458d3476.1709898638.git.jani.nikula@intel.com
6 months agodrm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs
Adrián Larumbe [Wed, 6 Mar 2024 01:56:36 +0000 (01:56 +0000)]
drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs

Debugfs isn't always available in production builds that try to squeeze
every single byte out of the kernel image, but we still need a way to
toggle the timestamp and cycle counter registers so that jobs can be
profiled for fdinfo's drm engine and cycle calculations.

Drop the debugfs knob and replace it with a sysfs file that accomplishes
the same functionality, and document its ABI in a separate file.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240306015819.822128-2-adrian.larumbe@collabora.com
6 months agoRevert "drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue"
Jani Nikula [Mon, 11 Mar 2024 11:16:19 +0000 (13:16 +0200)]
Revert "drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue"

This reverts commit 674dc7f61aefea81901c21402946074927e63f1a.

The commit causes a recursive dependency in kconfig:

drivers/iommu/Kconfig:14:error: recursive dependency detected!
drivers/iommu/Kconfig:14: symbol IOMMU_SUPPORT is selected by DRM_PANTHOR
drivers/gpu/drm/panthor/Kconfig:3: symbol DRM_PANTHOR depends on PM
kernel/power/Kconfig:183: symbol PM is selected by PM_SLEEP
kernel/power/Kconfig:117: symbol PM_SLEEP depends on HIBERNATE_CALLBACKS
kernel/power/Kconfig:35: symbol HIBERNATE_CALLBACKS is selected by XEN_SAVE_RESTORE
arch/x86/xen/Kconfig:67: symbol XEN_SAVE_RESTORE depends on XEN
arch/x86/xen/Kconfig:6: symbol XEN depends on PARAVIRT
arch/x86/Kconfig:781: symbol PARAVIRT is selected by HYPERV
drivers/hv/Kconfig:5: symbol HYPERV depends on X86_LOCAL_APIC
arch/x86/Kconfig:1106: symbol X86_LOCAL_APIC depends on X86_UP_APIC
arch/x86/Kconfig:1081: symbol X86_UP_APIC prompt is visible depending on PCI_MSI
drivers/pci/Kconfig:39: symbol PCI_MSI is selected by AMD_IOMMU
drivers/iommu/amd/Kconfig:3: symbol AMD_IOMMU depends on IOMMU_SUPPORT
For a resolution refer to Documentation/kbuild/kconfig-language.rst
subsection "Kconfig recursive dependency limitations"

Fixes: 674dc7f61aef ("drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue")
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Steven Price <steven.price@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240311111619.249776-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 months agodrm/panthor: Fix undefined panthor_device_suspend/resume symbol issue
Boris Brezillon [Mon, 4 Mar 2024 09:08:12 +0000 (10:08 +0100)]
drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

panthor_device_resume/suspend() are only compiled when CONFIG_PM is
enabled but panthro_drv.c doesn't use the pm_ptr() macro to conditionally
discard resume/suspend assignments, which causes undefined symbol
errors at link time when !PM.

We could fix that by using pm_ptr(), but supporting the !PM case makes
little sense (the whole point of these embedded GPUs is to be low power,
so proper PM is a basic requirement in that case). So let's just enforce
the presence of CONFIG_PM with a Kconfig dependency instead.

If someone needs to relax this dependency, it can be done in a follow-up.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.EOimQ8WK-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240304090812.3941084-4-boris.brezillon@collabora.com
6 months agodrm/panthor: Explicitly include mm.h for the {virt, __phys)_to_pfn() defs
Boris Brezillon [Mon, 4 Mar 2024 09:08:11 +0000 (10:08 +0100)]
drm/panthor: Explicitly include mm.h for the {virt, __phys)_to_pfn() defs

Something on arm[64] must be including <asm/page.h>, but things fail
to compile on sparc64. Make sure this header is included (through
linux/mm.h) so this driver can be compile-tested on all supported
architectures.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240304090812.3941084-3-boris.brezillon@collabora.com
6 months agodrm/panthor: Fix panthor_devfreq kerneldoc
Boris Brezillon [Mon, 4 Mar 2024 09:08:10 +0000 (10:08 +0100)]
drm/panthor: Fix panthor_devfreq kerneldoc

Missing '*' to have a valid kerneldoc prefix.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031019.6jvrOqGT-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240304090812.3941084-2-boris.brezillon@collabora.com
6 months agodrm: avoid includes in drm_crtc_helper_internal.h
Jani Nikula [Fri, 8 Mar 2024 11:55:53 +0000 (13:55 +0200)]
drm: avoid includes in drm_crtc_helper_internal.h

Prefer forward declarations over includes where possible.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/fb7fb2986e19f949bf3a9b16230a59e0f7aaebdf.1709898638.git.jani.nikula@intel.com
6 months agodrm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h
Jani Nikula [Fri, 8 Mar 2024 11:55:52 +0000 (13:55 +0200)]
drm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h

Prefer forward declarations over includes where possible.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/83d96b40724e7fd18bec81a9c6c935dbe924da91.1709898638.git.jani.nikula@intel.com
6 months agodrm/ttm: make ttm_pool.h self-contained
Jani Nikula [Fri, 8 Mar 2024 11:55:51 +0000 (13:55 +0200)]
drm/ttm: make ttm_pool.h self-contained

struct seq_file needs a forward declaration in some configs. Sort the
forward declarations while at it.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403072259.EEC2Vf1X-lkp@intel.com/
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b92373759bba305ddf8d24fdca345f195400e206.1709898638.git.jani.nikula@intel.com
6 months agodrm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 11:55:50 +0000 (13:55 +0200)]
drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings

There's no proper way to document function pointer members, but at least
silence the warnings.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e80e74ac4b6c5f1df3bc2dd98651ba289aae8e83.1709898638.git.jani.nikula@intel.com
6 months agodrm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 11:55:49 +0000 (13:55 +0200)]
drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings

Fix some formatting errors and excess documentation.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b0f6d243c4e5eb1564ef2f4bb5bb834ee2c0305b.1709898638.git.jani.nikula@intel.com
6 months agodrm/ttm: make ttm_caching.h self-contained
Jani Nikula [Fri, 8 Mar 2024 11:55:48 +0000 (13:55 +0200)]
drm/ttm: make ttm_caching.h self-contained

Include <linux/pgtable.h> for pgprot_t.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/fb87ab4b4490c53e9ece66d53c4f178ead244cb5.1709898638.git.jani.nikula@intel.com
6 months agodrm/ttm: fix ttm_bo.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 16:07:50 +0000 (18:07 +0200)]
drm/ttm: fix ttm_bo.h kernel-doc warnings

Some renames, some formatting fixes, add some missing documentation.

v3: Fix struct ttm_buffer_object .sg documentation (Christian)

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240308160750.3741833-1-jani.nikula@intel.com
6 months agom68k: pgtable: Add missing #include <asm/page.h>
Geert Uytterhoeven [Fri, 8 Mar 2024 11:55:46 +0000 (13:55 +0200)]
m68k: pgtable: Add missing #include <asm/page.h>

When just including <linux/pgtable.h>:

    include/asm-generic/pgtable-nop4d.h:9:18: error: unknown type name ‘pgd_t’
9 | typedef struct { pgd_t pgd; } p4d_t;
  |                  ^~~~~

Make <asm/pgtable.h> self-contained by including <asm/page.h>.

Reported-by: Jani Nikula <jani.nikula@intel.com>
Closes: https://lore.kernel.org/r/878r2uxwha.fsf@intel.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/af9e22b878f59223adb593f5bbd5b61432120010.1709898638.git.jani.nikula@intel.com
6 months agodrm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 11:55:45 +0000 (13:55 +0200)]
drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings

Make documentation match code. Slightly fix up the documentation
comments while at it.

v2:
- Move comments next to members instead of struct comment (Lucas)
- Small fixups while at it

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7c26256dc00f970f94d145b73e341c36f553dfe4.1709898638.git.jani.nikula@intel.com
6 months agodrm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
Jani Nikula [Fri, 8 Mar 2024 11:55:44 +0000 (13:55 +0200)]
drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings

Make the documentation match code.

v2: Small fixups while at it (Lucas)

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5c7ba8db172101c40b686463f169ec579a509f29.1709898638.git.jani.nikula@intel.com
6 months agodrm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
Jani Nikula [Fri, 8 Mar 2024 11:55:43 +0000 (13:55 +0200)]
drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc

There's no proper way to document function pointer members, but at least
silence the warnings.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a84bd76162290940f709f5cb6e432e5e1f75a3b9.1709898638.git.jani.nikula@intel.com
6 months agodrm/encoder: improve drm_encoder_slave.h kernel-doc
Jani Nikula [Fri, 8 Mar 2024 11:55:41 +0000 (13:55 +0200)]
drm/encoder: improve drm_encoder_slave.h kernel-doc

Document structs drm_encoder_slave_funcs, drm_encoder_slave, and
drm_i2c_encoder_driver.

v2: Actually document the structs instead of just silencing kernel-doc

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/19bc9672c8ae4f7aee235665a4d2360e8790193d.1709898638.git.jani.nikula@intel.com
6 months agodrm: add missing header guards to drm_crtc_helper_internal.h
Jani Nikula [Fri, 8 Mar 2024 11:55:40 +0000 (13:55 +0200)]
drm: add missing header guards to drm_crtc_helper_internal.h

Including the file twice can lead to errors.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b5020cdc2ff6d2f4992ea25cf88d528e4738d700.1709898638.git.jani.nikula@intel.com
6 months agodrm: add missing header guards to drm_crtc_internal.h
Jani Nikula [Fri, 8 Mar 2024 11:55:39 +0000 (13:55 +0200)]
drm: add missing header guards to drm_crtc_internal.h

Including the file twice can lead to errors.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7ad51d9fb9c42c9901c5c1d5d16e32e857da9758.1709898638.git.jani.nikula@intel.com
6 months agodrm/gma500: Remove unused intel-mid.h
Andy Shevchenko [Tue, 5 Mar 2024 16:09:02 +0000 (18:09 +0200)]
drm/gma500: Remove unused intel-mid.h

intel-mid.h is providing some core parts of the South Complex PM,
which are usually are not used by individual drivers. In particular,
this driver doesn't use it, so simply remove the unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240305160902.1363835-1-andriy.shevchenko@linux.intel.com
6 months agodt-bindings: display/lvds-codec: add ti,sn65lvds94
Dmitry Baryshkov [Sat, 26 Aug 2023 21:54:28 +0000 (00:54 +0300)]
dt-bindings: display/lvds-codec: add ti,sn65lvds94

Add compatible strings for TI sn65lvds94, LVDS serdes receiver.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230826215429.1905599-1-dmitry.baryshkov@linaro.org
6 months agodrm/panel-edp: Add BOE NT116WHM-N44 and CMN N116BCA-EA1
Xuxin Xiong [Fri, 8 Mar 2024 00:47:57 +0000 (08:47 +0800)]
drm/panel-edp: Add BOE NT116WHM-N44 and CMN N116BCA-EA1

Add support for the following 2 panels:
1. BOE NT116WHM-N44
2. CMN N116BCA-EA1

Signed-off-by: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240308004757.1048284-1-xuxinxiong@huaqin.corp-partner.google.com
6 months agoMerge drm/drm-next into drm-misc-next
Thomas Zimmermann [Fri, 8 Mar 2024 08:47:22 +0000 (09:47 +0100)]
Merge drm/drm-next into drm-misc-next

Backmerging to get the latest fixes from drm-next; specifically the
build fix from the patchset at [1]. Also fixes the build by removing
an unused variable from rzg2l_du_vsp_atomic_flush().

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/series/130720/
6 months agoMerge tag 'drm-msm-next-2024-03-07' of https://gitlab.freedesktop.org/drm/msm into...
Dave Airlie [Fri, 8 Mar 2024 02:45:20 +0000 (12:45 +1000)]
Merge tag 'drm-msm-next-2024-03-07' of https://gitlab.freedesktop.org/drm/msm into drm-next

Late updates for v6.9, the main part is CDM (YUV over DP) which was
waiting for drm-misc-next-2024-02-29.

DPU:
- Add support for YUV420 over DP
- Patchset to ease debugging of vblank timeouts
- Small cleanup

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvedk6OCOZ-NNtGf_pNiGuK9uvWj1MCDZLX9Jo2nHS=Zg@mail.gmail.com
6 months agoMerge tag 'drm-etnaviv-next-2024-03-07' of https://git.pengutronix.de/git/lst/linux...
Dave Airlie [Fri, 8 Mar 2024 02:36:48 +0000 (12:36 +1000)]
Merge tag 'drm-etnaviv-next-2024-03-07' of https://git.pengutronix.de/git/lst/linux into drm-next

- various code cleanups
- enhancements for NPU and MRT support

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/72a783cd98d60f6ebb43b90a6b453eea87224409.camel@pengutronix.de
6 months agoMerge tag 'drm-xe-next-fixes-2024-03-04' of ssh://gitlab.freedesktop.org/drm/xe/kerne...
Dave Airlie [Fri, 8 Mar 2024 02:14:54 +0000 (12:14 +1000)]
Merge tag 'drm-xe-next-fixes-2024-03-04' of ssh://gitlab.freedesktop.org/drm/xe/kernel into drm-next

Driver Changes:

- Fix kunit link failure with built-in xe
- Fix one more 32-bit build failure with ARM compiler
- Fix initialization order of topology struct
- Cleanup unused fields in struct xe_vm
- Fix xe_vm leak when handling page fault on a VM not in fault mode
- Drop use of "grouped target" feature in Makefile since that's
  only available in make >= 4.3

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/kaypobelrl7u7rtnu6hg5czs3vptbhs4rp24vnwuo2ajoxysto@l5u7377hz4es
6 months agoMerge tag 'drm-misc-next-fixes-2024-03-07' of https://anongit.freedesktop.org/git...
Dave Airlie [Fri, 8 Mar 2024 01:58:28 +0000 (11:58 +1000)]
Merge tag 'drm-misc-next-fixes-2024-03-07' of https://anongit.freedesktop.org/git/drm/drm-misc into drm-next

Short summary of fixes pull:

- i915: Fix applying placement flags
- fbdev: Fix build on PowerMacs after header cleanup

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307124640.GA18593@localhost.localdomain
6 months agoMerge tag 'amd-drm-next-6.9-2024-03-01' of https://gitlab.freedesktop.org/agd5f/linux...
Dave Airlie [Fri, 8 Mar 2024 01:21:13 +0000 (11:21 +1000)]
Merge tag 'amd-drm-next-6.9-2024-03-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-next

amd-drm-next-6.9-2024-03-01:

amdgpu:
- GC 11.5.1 updates
- Misc display cleanups
- NBIO 7.9 updates
- Backlight fixes
- DMUB fixes
- MPO fixes
- atomfirmware table updates
- SR-IOV fixes
- VCN 4.x updates
- use RMW accessors for pci config registers
- PSR fixes
- Suspend/resume fixes
- RAS fixes
- ABM fixes
- Misc code cleanups
- SI DPM fix
- Revert freesync video

amdkfd:
- Misc cleanups
- Error handling fixes

radeon:
- use RMW accessors for pci config registers

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240301204857.13960-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 months agodrm/suballoc: fix drm_suballoc.h kernel-doc
Jani Nikula [Wed, 6 Mar 2024 18:31:19 +0000 (20:31 +0200)]
drm/suballoc: fix drm_suballoc.h kernel-doc

Rename dma_fence to fence to match code.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/36d18b315fd9a6788484667f644b3fea347fb007.1709749576.git.jani.nikula@intel.com
6 months agodrm/of: make drm_of.h self-contained
Jani Nikula [Wed, 6 Mar 2024 18:31:17 +0000 (20:31 +0200)]
drm/of: make drm_of.h self-contained

Include <linux/err.h> for ERR_PTR.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e9b3ea30984b913f6e32ed35e0575438dff8278c.1709749576.git.jani.nikula@intel.com
6 months agodrm: fix drm_gem_vram_helper.h kernel-doc
Jani Nikula [Wed, 6 Mar 2024 18:31:16 +0000 (20:31 +0200)]
drm: fix drm_gem_vram_helper.h kernel-doc

Remove excess funcs kernel-doc.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/02000be3455de639f32bde88f632ae8744142083.1709749576.git.jani.nikula@intel.com
6 months agodrm/lease: make drm_lease.h self-contained
Jani Nikula [Wed, 6 Mar 2024 18:31:15 +0000 (20:31 +0200)]
drm/lease: make drm_lease.h self-contained

Include <linux/types.h> for types used.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3a38688e90bb775380aad5b6aad5dce3d9d87ca7.1709749576.git.jani.nikula@intel.com
6 months agodrm: fix drm_format_helper.h kernel-doc warnings
Jani Nikula [Wed, 6 Mar 2024 18:31:14 +0000 (20:31 +0200)]
drm: fix drm_format_helper.h kernel-doc warnings

As the documentation says, all the fields are considered private. Mark
them private also for kernel-doc to silence warnings.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6dc5b1df34abc10d416c2db5b390440cf56e21ce.1709749576.git.jani.nikula@intel.com
6 months agodrm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
Jani Nikula [Wed, 6 Mar 2024 18:31:12 +0000 (20:31 +0200)]
drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc

Add a number of require includes and forward declare struct
drm_crtc. s/crc/crcs/ kernel-doc to match code.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/290b006bb348a03bd7c4c062d337df21fdaced53.1709749576.git.jani.nikula@intel.com
6 months agodrm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
Jani Nikula [Wed, 6 Mar 2024 18:31:11 +0000 (20:31 +0200)]
drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc

Drop excess vcpi member documentation.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/606eee280718ba372093fdebbda42c7581dbd827.1709749576.git.jani.nikula@intel.com
6 months agodrm: bridge: samsung-dsim: make samsung-dsim.h self-contained
Jani Nikula [Wed, 6 Mar 2024 18:31:10 +0000 (20:31 +0200)]
drm: bridge: samsung-dsim: make samsung-dsim.h self-contained

Include <drm/drm_bridge.h> and forward declare struct platform device.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9534ca7dfba96580950e116c84ce0fa68fdf93a4.1709749576.git.jani.nikula@intel.com
6 months agodrm/amdgpu: make amd_asic_type.h self-contained
Jani Nikula [Wed, 6 Mar 2024 18:31:09 +0000 (20:31 +0200)]
drm/amdgpu: make amd_asic_type.h self-contained

Include <linux/types.h> for u8.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/115327b880b69b1c8ad157e5ff7f6b419868fab0.1709749576.git.jani.nikula@intel.com
6 months agodrm/kunit: fix drm_kunit_helpers.h kernel-doc
Jani Nikula [Wed, 6 Mar 2024 18:31:08 +0000 (20:31 +0200)]
drm/kunit: fix drm_kunit_helpers.h kernel-doc

s/_features/_feat/ to match code.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f909224abc8d542a89b66b957a32f152f42e9bba.1709749576.git.jani.nikula@intel.com
6 months agodrm: add missing header guards to drm_internal.h
Jani Nikula [Wed, 6 Mar 2024 18:31:07 +0000 (20:31 +0200)]
drm: add missing header guards to drm_internal.h

Including the file twice leads to errors.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6e744360513e581765147ea7b1e693f4bffe03a9.1709749576.git.jani.nikula@intel.com
6 months agodrm/crtc: make drm_crtc_internal.h self-contained
Jani Nikula [Thu, 7 Mar 2024 08:34:10 +0000 (10:34 +0200)]
drm/crtc: make drm_crtc_internal.h self-contained

Forward declare struct drm_printer and include <linux/err.h>.

v2: Include <linux/err.h> (kernel test robot)

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307083410.2604712-1-jani.nikula@intel.com
6 months agodrm/ci: update device type for volteer devices
Vignesh Raman [Thu, 7 Mar 2024 02:18:41 +0000 (07:48 +0530)]
drm/ci: update device type for volteer devices

Volteer devices in the collabora lab are categorized under the
asus-cx9400-volteer device type. The majority of these units
has an Intel Core i5-1130G7 CPU, while some of them have a
Intel Core i7-1160G7 CPU instead. So due to this difference,
new device type template is added for the Intel Core i5-1130G7
and i7-1160G7 variants of the Acer Chromebook Spin 514 (CP514-2H)
volteer Chromebooks. So update the same in drm-ci.

https://gitlab.collabora.com/lava/lava/-/merge_requests/149

Fixes: 0119c894ab0d ("drm: Add initial ci/ subdirectory")
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307021841.100561-1-vignesh.raman@collabora.com
6 months agoarch/powerpc: Remove <linux/fb.h> from backlight code
Thomas Zimmermann [Wed, 6 Mar 2024 12:28:20 +0000 (13:28 +0100)]
arch/powerpc: Remove <linux/fb.h> from backlight code

Replace <linux/fb.h> with a forward declaration in <asm/backlight.h> to
resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup()
and struct fb_info from source and header files. The function and the
framebuffer struct are unused. No functional changes.

v3:
* Add Fixes tag (Christophe)
* fix typos in commit message (Jani)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # (powerpc)
Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-4-tzimmermann@suse.de
6 months agomacintosh/via-pmu-backlight: Include <linux/backlight.h>
Thomas Zimmermann [Wed, 6 Mar 2024 12:28:19 +0000 (13:28 +0100)]
macintosh/via-pmu-backlight: Include <linux/backlight.h>

Fix builds with CONFIG_PMAC_BACKLIGHT=y. The include statement for the
backlight header has recently been removed from <linux/fb.h>. Add it to
via-pmu-backlight.c to get the necessary symbols.

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Closes: https://lore.kernel.org/dri-devel/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-3-tzimmermann@suse.de
6 months agofbdev/chipsfb: Include <linux/backlight.h>
Thomas Zimmermann [Wed, 6 Mar 2024 12:28:18 +0000 (13:28 +0100)]
fbdev/chipsfb: Include <linux/backlight.h>

Fix builds with CONFIG_PMAC_BACKLIGHT=y. The include statement for
the backlight header has recently been removed from <linux/fb.h>.

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Closes: https://lore.kernel.org/dri-devel/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-2-tzimmermann@suse.de
6 months agoMerge drm/drm-next into drm-misc-next-fixes
Thomas Zimmermann [Thu, 7 Mar 2024 12:30:43 +0000 (13:30 +0100)]
Merge drm/drm-next into drm-misc-next-fixes

Backmerging to get a few more commits that came from drm-misc-next.
See [1]

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/dri-devel/20240229084806.GA21616@localhost.localdomain/
6 months agodrm/etnaviv: Restore some id values
Christian Gmeiner [Fri, 1 Mar 2024 13:28:11 +0000 (14:28 +0100)]
drm/etnaviv: Restore some id values

The hwdb selection logic as a feature that allows it to mark some fields
as 'don't care'. If we match with such a field we memcpy(..)
the current etnaviv_chip_identity into ident.

This step can overwrite some id values read from the GPU with the
'don't care' value.

Fix this issue by restoring the affected values after the memcpy(..).

As this is crucial for user space to know when this feature works as
expected increment the minor version too.

Fixes: 4078a1186dd3 ("drm/etnaviv: update hwdb selection logic")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
6 months agodrm: Add CONFIG_DRM_WERROR
Jani Nikula [Tue, 5 Mar 2024 09:07:36 +0000 (11:07 +0200)]
drm: Add CONFIG_DRM_WERROR

Add kconfig to enable -Werror subsystem wide. This is useful for
development and CI to keep the subsystem warning free, while avoiding
issues outside of the subsystem that kernel wide CONFIG_WERROR=y might
hit.

v2: Don't depend on COMPILE_TEST

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com> # v1
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/afe5ed943414f7ec3044c1547503b9941686a867.1709629403.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 months agodrm: enable (most) W=1 warnings by default across the subsystem
Jani Nikula [Tue, 5 Mar 2024 09:07:35 +0000 (11:07 +0200)]
drm: enable (most) W=1 warnings by default across the subsystem

At least the i915 and amd drivers enable a bunch more compiler warnings
than the kernel defaults.

Extend most of the W=1 warnings to the entire drm subsystem by
default. Use the copy-pasted warnings from scripts/Makefile.extrawarn
with s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it easier to compare and
keep up with them in the future.

This is similar to the approach currently used in i915.

Some of the -Wextra warnings do need to be disabled, just like in
Makefile.extrawarn, but take care to not disable them for W=2 or W=3
builds, depending on the warning.

There are too many -Wformat-truncation warnings to cleanly fix up front;
leave that warning disabled for now.

v3:
- Drop -Wmissing-declarations (already enabled by default)
- Drop -Wmissing-prototypes (already enabled by default)

v2:
- Drop -Wformat-truncation (too many warnings)
- Drop -Wstringop-overflow (already enabled by default)

Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Pan
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Acked-by: Danilo Krummrich <dakr@redhat.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/a50f1a69d5af72e913996179a75bc3a71d81ebea.1709629403.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 months agodrm/nouveau: move more missing UAPI bits
Karol Herbst [Tue, 5 Mar 2024 13:38:53 +0000 (14:38 +0100)]
drm/nouveau: move more missing UAPI bits

Those are already de-facto UAPI, so let's just move it into the uapi
header.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240305133853.2214268-2-kherbst@redhat.com
6 months agodrm/bridge: Document bridge init order with pre_enable_prev_first
Jagan Teki [Tue, 28 Mar 2023 17:07:52 +0000 (22:37 +0530)]
drm/bridge: Document bridge init order with pre_enable_prev_first

In order to satisfy the MIPI DSI initialization sequence the bridge
init order has been altered with the help of pre_enable_prev_first
in pre_enable and post_disable bridge operations.

Document the affected bridge init order with an example on the
bridge operations helpers.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230328170752.1102347-2-jagan@amarulasolutions.com
6 months agodrm/bridge: Fix improper bridge init order with pre_enable_prev_first
Jagan Teki [Tue, 28 Mar 2023 17:07:51 +0000 (22:37 +0530)]
drm/bridge: Fix improper bridge init order with pre_enable_prev_first

For a given bridge pipeline if any bridge sets pre_enable_prev_first
flag then the pre_enable for the previous bridge will be called before
pre_enable of this bridge and opposite is done for post_disable.

These are the potential bridge flags to alter bridge init order in order
to satisfy the MIPI DSI host and downstream panel or bridge to function.
However the existing pre_enable_prev_first logic with associated bridge
ordering has broken for both pre_enable and post_disable calls.

[pre_enable]

The altered bridge ordering has failed if two consecutive bridges on a
given pipeline enables the pre_enable_prev_first flag.

Example:
- 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

In this example, Bridge 4 and Bridge 5 have pre_enable_prev_first.

The logic looks for a bridge which enabled pre_enable_prev_first flag
on each iteration and assigned the previou bridge to limit pointer
if the bridge doesn't enable pre_enable_prev_first flags.

If control found Bridge 2 is pre_enable_prev_first then the iteration
looks for Bridge 3 and found it is not pre_enable_prev_first and assigns
it's previous Bridge 4 to limit pointer and calls pre_enable of Bridge 3
and Bridge 2 and assign iter pointer with limit which is Bridge 4.

Here is the actual problem, for the next iteration control look for
Bridge 5 instead of Bridge 4 has iter pointer in previous iteration
moved to Bridge 4 so this iteration skips the Bridge 4. The iteration
found Bridge 6 doesn't pre_enable_prev_first flags so the limit assigned
to Encoder. From next iteration Encoder skips as it is the last bridge
for reverse order pipeline.

So, the resulting pre_enable bridge order would be,
- Panel, Bridge 1, Bridge 3, Bridge 2, Bridge 6, Bridge 5.

This patch fixes this by assigning limit to next pointer instead of
previous bridge since the iteration always looks for bridge that does
NOT request prev so assigning next makes sure the last bridge on a
given iteration what exactly the limit bridge is.

So, the resulting pre_enable bridge order with fix would be,
- Panel, Bridge 1, Bridge 3, Bridge 2, Bridge 6, Bridge 5, Bridge 4,
  Encoder.

[post_disable]

The altered bridge ordering has failed if two consecutive bridges on a
given pipeline enables the pre_enable_prev_first flag.

Example:
- 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

In this example Bridge 5 and Bridge 4 have pre_enable_prev_first.

The logic looks for a bridge which enabled pre_enable_prev_first flags
on each iteration and assigned the previou bridge to next and next to
limit pointer if the bridge does enable pre_enable_prev_first flag.

If control starts from Bridge 6 then it found next Bridge 5 is
pre_enable_prev_first and immediately the next assigned to previous
Bridge 6 and limit assignments to next Bridge 6 and call post_enable
of Bridge 6 even though the next consecutive Bridge 5 is enabled with
pre_enable_prev_first. This clearly misses the logic to find the state
of next conducive bridge as everytime the next and limit assigns
previous bridge if given bridge enabled pre_enable_prev_first.

So, the resulting post_disable bridge order would be,
- Encoder, Bridge 6, Bridge 5, Bridge 4, Bridge 3, Bridge 2, Bridge 1,
  Panel.

This patch fixes this by assigning next with previou bridge only if the
bridge doesn't enable pre_enable_prev_first flag and the next further
assign it to limit. This way we can find the bridge that NOT requested
prev to disable last.

So, the resulting pre_enable bridge order with fix would be,
- Encoder, Bridge 4, Bridge 5, Bridge 6, Bridge 2, Bridge 3, Bridge 1,
  Panel.

Validated the bridge init ordering by incorporating dummy bridges in
the sun6i-mipi-dsi pipeline

Fixes: 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order")
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230328170752.1102347-1-jagan@amarulasolutions.com
6 months agodrm/tidss: Use dev_err_probe() over dev_dbg() when failing to probe the port
Andrew Halaney [Wed, 28 Feb 2024 20:12:06 +0000 (14:12 -0600)]
drm/tidss: Use dev_err_probe() over dev_dbg() when failing to probe the port

This gets logged out to /sys/kernel/debug/devices_deferred in the
-EPROBE_DEFER case and as an error otherwise. The message here provides
useful information to the user when troubleshooting why their display is
not working in either case, so let's make it output appropriately.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Enric Balletbo i Serra <eballetbo@kernel.org>
Link: https://lore.kernel.org/r/20240228-tidss-dev-err-probe-v1-1-5482252326d3@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>