Thomas Zimmermann
fb84efa28a
drm/aperture: Run fbdev removal before internal helpers
...
Always run fbdev removal first to remove simpledrm via
sysfb_disable(). This clears the internal state. The later call
to drm_aperture_detach_drivers() then does nothing. Otherwise,
with drm_aperture_detach_drivers() running first, the call to
sysfb_disable() uses inconsistent state.
Example backtrace show below:
[ 11.663422] ==================================================================
[ 11.663426] BUG: KASAN: use-after-free in device_del+0x79/0x5f0
[ 11.663435] Read of size 8 at addr ffff888108185050 by task systemd-udevd/311
[ 11.663440] CPU: 0 PID: 311 Comm: systemd-udevd Tainted: G E 5
.19.0-rc2-1-default+ #1689
[ 11.663445] Hardware name: HP ProLiant DL120 G7, BIOS J01 04/21/2011
[ 11.663447] Call Trace:
[ 11.663449] <TASK>
[ 11.663451] ? device_del+0x79/0x5f0
[ 11.663456] dump_stack_lvl+0x5b/0x73
[ 11.663462] print_address_description.constprop.0+0x1f/0x1b0
[ 11.663468] ? device_del+0x79/0x5f0
[ 11.663471] ? device_del+0x79/0x5f0
[ 11.663475] print_report.cold+0x3c/0x21c
[ 11.663481] ? lock_acquired+0x87/0x1e0
[ 11.663484] ? lock_acquired+0x87/0x1e0
[ 11.663489] ? device_del+0x79/0x5f0
[ 11.663492] kasan_report+0xbf/0xf0
[ 11.663498] ? device_del+0x79/0x5f0
[ 11.663503] device_del+0x79/0x5f0
[ 11.663509] ? device_remove_attrs+0x170/0x170
[ 11.663514] ? lock_is_held_type+0xe8/0x140
[ 11.663523] platform_device_del.part.0+0x19/0xe0
[ 11.663530] platform_device_unregister+0x1c/0x30
[ 11.663535] sysfb_disable+0x2d/0x70
[ 11.663540] remove_conflicting_framebuffers+0x1c/0xf0
[ 11.663546] remove_conflicting_pci_framebuffers+0x130/0x1a0
[ 11.663554] drm_aperture_remove_conflicting_pci_framebuffers+0x86/0xb0
[ 11.663561] ? mgag200_pci_remove+0x30/0x30 [mgag200]
[ 11.663578] mgag200_pci_probe+0x2d/0x140 [mgag200]
Reported-by: Zack Rusin <zackr@vmware.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Zack Rusin <zackr@vmware.com >
Fixes: 873eb3b118 ("fbdev: Disable sysfb device registration when removing conflicting FBs")
Cc: Javier Martinez Canillas <javierm@redhat.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Helge Deller <deller@gmx.de >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Zhen Lei <thunder.leizhen@huawei.com >
Cc: Changcheng Deng <deng.changcheng@zte.com.cn >
Link: https://patchwork.freedesktop.org/patch/msgid/20220617121027.30273-1-tzimmermann@suse.de
2022-06-21 12:54:34 +02:00
Ville Syrjälä
395d10ae4d
drm/xlnx: Fix build failure due to missing include
...
Dropping drm_blend.h from drm_crtc.h broke the
xlnx driver. Make it build again by including
drm_blend.h from the driver directly.
My .config was missing some required dependencies so
I never build tested it :/
Cc: Hyun Kwon <hyun.kwon@xilinx.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Fixes: 90bb087f66 ("drm: Drop drm_blend.h from drm_crtc.h")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220621075648.7717-1-ville.syrjala@linux.intel.com
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-21 11:23:52 +03:00
Alex Deucher
f16a716621
drm/amdgpu/display: drop set but unused variable
...
Fixes this warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9143:27: warning: variable 'abo' set but not used [-Wunused-but-set-variable]
Fixes: 047de3f17a ("drm/amdgpu: switch DM to atomic fence helpers v2")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220616203538.649041-1-alexander.deucher@amd.com
2022-06-20 18:18:49 -04:00
Ville Syrjälä
90bb087f66
drm: Drop drm_blend.h from drm_crtc.h
...
drm_crtc.h has no need for drm_blend.h, so don't include it.
Avoids useless rebuilds of the entire universe when
touching drm_blend.h.
Quite a few placs do currently depend on drm_blend.h without
actually including it directly. All of those need to be fixed
up.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220613200317.11305-4-ville.syrjala@linux.intel.com
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
2022-06-20 23:53:55 +03:00
Ville Syrjälä
720cf96d8f
drm: Drop drm_framebuffer.h from drm_crtc.h
...
drm_crtc.h has no need for drm_frambuffer.h, so don't include it.
Avoids useless rebuilds of the entire universe when
touching drm_framebuffer.h.
Quite a few placs do currently depend on drm_framebuffer.h without
actually including it directly. All of those need to be fixed
up.
v2: Fix up msm some more
v2: Deal with ingenic and shmobile as well
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614095449.29311-1-ville.syrjala@linux.intel.com
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
2022-06-20 23:53:55 +03:00
Ville Syrjälä
255490f915
drm: Drop drm_edid.h from drm_crtc.h
...
drm_crtc.h has no need for drm_edid.h, so don't include it.
Avoids useless rebuilds of the entire universe when
touching drm_edid.h.
Quite a few placs do currently depend on drm_edid.h without
actually including it directly. All of those need to be fixed
up.
v2: Fix up i915 and msm some more
v3: Fix alphabetical ordering (Sam)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614090245.30283-1-ville.syrjala@linux.intel.com
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
2022-06-20 23:53:55 +03:00
Alexander Stein
8052450712
drm/bridge: ti-sn65dsi83: Allow GPIO operations to sleep
...
There is no need to require non-sleeping GPIO access. Silence the
WARN_ON() if GPIO is using e.g. I2C expanders.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614095835.1398708-2-alexander.stein@ew.tq-group.com
Reviewed-by: Robert Foss <robert.foss@linaro.org >
2022-06-20 22:00:32 +02:00
Alexander Stein
03e22ba090
drm/bridge: ti-sn65dsi83: add more dev_err_probe
...
Add more warning/debug messages during probe. E.g. a single -EPROBE_DEFER
might have several causes, these messages help finding the origin.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614095835.1398708-1-alexander.stein@ew.tq-group.com
Reviewed-by: Robert Foss <robert.foss@linaro.org >
2022-06-20 22:00:08 +02:00
Jiri Vanek
993a87917c
drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation
...
Use the same PCLK divide option (divide DSI clock to generate pixel clock)
which is set to LVDS Configuration Register (LVCFG) also for a VSync delay
calculation. Without this change an auxiliary variable could underflow
during the calculation for some dual-link LVDS panels and then calculated
VSync delay is wrong. This leads to a shifted picture on a panel.
Tested-by: Jiri Vanek <jirivanek1@gmail.com >
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com >
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-3-jirivanek1@gmail.com
2022-06-20 21:34:21 +02:00
Jiri Vanek
89fc846675
drm/bridge/tc358775: Return before displaying inappropriate error message
...
Function for reading from i2c device register displays error message even
if reading ends correctly. Add return to avoid falling through into
the fail label.
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com >
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-2-jirivanek1@gmail.com
2022-06-20 21:34:20 +02:00
Liu Ying
e60c435484
drm/bridge: imx: Add LDB support for i.MX8qm
...
This patch adds a drm bridge driver for i.MX8qm LVDS display bridge(LDB)
which is officially named as pixel mapper. The LDB has two channels.
Each of them supports up to 30bpp parallel input color format and can
map the input to VESA or JEIDA standards. The two channels can be used
simultaneously, either in dual mode or split mode. In dual mode, the
two channels output identical data. In split mode, channel0 outputs
odd pixels and channel1 outputs even pixels. This patch supports the
LDB single mode and split mode.
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-13-victor.liu@nxp.com
2022-06-20 21:15:19 +02:00
Liu Ying
3818715f62
drm/bridge: imx: Add LDB support for i.MX8qxp
...
This patch adds a drm bridge driver for i.MX8qxp LVDS display bridge(LDB)
which is officially named as pixel mapper. The LDB has two channels.
Each of them supports up to 24bpp parallel input color format and can map
the input to VESA or JEIDA standards. The two channels cannot be used
simultaneously, that is to say, the user should pick one of them to use.
Two LDB channels from two LDB instances can work together in LDB split
mode to support a dual link LVDS display. The channel indexes have to be
different. Channel0 outputs odd pixels and channel1 outputs even pixels.
This patch supports the LDB single mode and split mode.
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-12-victor.liu@nxp.com
2022-06-20 21:15:17 +02:00
Liu Ying
1039fb6046
drm/bridge: imx: Add LDB driver helper support
...
This patch adds a helper to support LDB drm bridge drivers for
i.MX SoCs. Helper functions supported by this helper should
implement common logics for all LDB modules embedded in i.MX SoCs.
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-10-victor.liu@nxp.com
2022-06-20 21:15:15 +02:00
Liu Ying
96988a526c
drm/bridge: imx: Add i.MX8qxp pixel link to DPI support
...
This patch adds a drm bridge driver for i.MX8qxp pixel link to display
pixel interface(PXL2DPI). The PXL2DPI interfaces the pixel link 36-bit
data output and the DSI controller’s MIPI-DPI 24-bit data input, and
inputs of LVDS Display Bridge(LDB) module used in LVDS mode, to remap
the pixel color codings between those modules. The PXL2DPI is purely
combinatorial.
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-9-victor.liu@nxp.com
2022-06-20 21:15:13 +02:00
Liu Ying
1ec17c26bc
drm/bridge: imx: Add i.MX8qm/qxp display pixel link support
...
This patch adds a drm bridge driver for i.MX8qm/qxp display pixel link.
The pixel link forms a standard asynchronous linkage between
pixel sources(display controller or camera module) and pixel
consumers(imaging or displays). It consists of two distinct
functions, a pixel transfer function and a control interface.
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-7-victor.liu@nxp.com
2022-06-20 21:15:11 +02:00
Liu Ying
93e163a9e0
drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support
...
This patch adds a drm bridge driver for i.MX8qm/qxp pixel combiner.
The pixel combiner takes two output streams from a single display
controller and manipulates the two streams to support a number
of modes(bypass, pixel combine, YUV444 to YUV422, split_RGB) configured
as either one screen, two screens, or virtual screens. The pixel
combiner is also responsible for generating some of the control signals
for the pixel link output channel. For now, the driver only supports
the bypass mode.
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com > # Colibri iMX8X, LT170410-2WHC, LP156WF1
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220611141421.718743-5-victor.liu@nxp.com
2022-06-20 21:15:07 +02:00
Xin Ji
b708b36afd
drm/bridge: anx7625: Use DPI bus type
...
As V4L2_FWNODE_BUS_TYPE_PARALLEL not properly descript for DPI
interface, this patch use new defined V4L2_FWNODE_BUS_TYPE_DPI for it.
Fixes: fd0310b6fe ("drm/bridge: anx7625: add MIPI DPI input feature")
Signed-off-by: Xin Ji <xji@analogixsemi.com >
Tested-by: Chen-Yu Tsai <wenst@chromium.org >
Acked-by: Robert Foss <robert.foss@linaro.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/20220422084720.959271-4-xji@analogixsemi.com
2022-06-20 21:01:45 +02:00
Thomas Zimmermann
2b1333b808
Merge drm/drm-next into drm-misc-next
...
Backmerging to get new regmap APIs of v5.19-rc1.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
2022-06-20 18:21:25 +02:00
pengfuyuan
8ee53c702f
drm/nouveau: Fix spelling typo in comments
...
Fix spelling typo in comments.
Reported-by: k2ci <kernel-bot@kylinos.cn >
Signed-off-by: pengfuyuan <pengfuyuan@kylinos.cn >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/tencent_C15AFFD9BBB862C56280A415C336F94C3909@qq.com
2022-06-16 18:37:03 -04:00
Imre Deak
7a710a8bc9
drm/dp/mst: Read the extended DPCD capabilities during system resume
...
The WD22TB4 Thunderbolt dock at least will revert its DP_MAX_LINK_RATE
from HBR3 to HBR2 after system suspend/resume if the DP_DP13_DPCD_REV
registers are not read subsequently also as required.
Fix this by reading DP_DP13_DPCD_REV registers as well, matching what is
done during connector detection. While at it also fix up the same call
in drm_dp_mst_dump_topology().
Cc: Lyude Paul <lyude@redhat.com >
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5292
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Cc: <stable@vger.kernel.org > # v5.14+
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220614094537.885472-1-imre.deak@intel.com
2022-06-16 21:41:02 +03:00
Samuel Holland
6da623684c
drm/sun4i: sun8i-hdmi-phy: Group PHY ops functions by generation
...
Now that the PHY ops are separated, sort them topologically, with the
common sun8i_hdmi_phy_set_polarity helper at the top. No function
contents are changed in this commit.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-7-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Samuel Holland
ef2731e48b
drm/sun4i: sun8i-hdmi-phy: Separate A83T and H3 PHY ops
...
Since the driver already needs to support multiple sets of ops, we can
drop the mid-layer used by the A83T and H3 PHYs. They share only a small
amount of code; factor this out as sun8i_hdmi_phy_set_polarity.
For clarity, this commit keeps the existing function order.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-6-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Samuel Holland
cdf3e5e15a
drm/sun4i: sun8i-hdmi-phy: Support multiple custom PHY ops
...
The D1 SoC comes with a new custom HDMI PHY, which does not share any
registers with the existing custom PHY. So it needs a new set of ops.
Instead of providing a flag in the variant structure, provide the ops
themselves.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-5-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Samuel Holland
94c25fb1df
drm/sun4i: sun8i-hdmi-phy: Used device-managed clocks/resets
...
Now that the HDMI PHY is using a platform driver, it can use device-
managed resources. Use these, as well as the dev_err_probe helper, to
simplify the probe function and get rid of the remove function.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-4-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Samuel Holland
719216eb51
drm/sun4i: sun8i-hdmi-phy: Use devm_platform_ioremap_resource
...
The struct resource is not used for anything else, so we can simplify
the code a bit by using the helper function.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-3-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Samuel Holland
1a395a5604
drm/sun4i: sun8i-hdmi-phy: Use of_device_get_match_data
...
Now that the HDMI PHY is using a platform driver, we can use the usual
helper function for getting the variant structure.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://lore.kernel.org/r/20220615045543.62813-2-samuel@sholland.org
2022-06-16 09:27:46 +02:00
Alex Deucher
c0c87382c1
drm/amdgpu/display: fix build when CONFIG_DEBUG_FS is not set
...
amdgpu_dm_crtc_late_register() is only used when CONFIG_DEBUG_FS
is enabled so make it dependent on that.
Fixes: 4cd79f614b ("drm/amd/display: Move connector debugfs to drm")
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com >
Cc: Harry Wentland <harry.wentland@amd.com >
Cc: Arun R Murthy <arun.r.murthy@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Reported-by: Nathan Chancellor <nathan@kernel.org >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Tested-by: Nathan Chancellor <nathan@kernel.org > # build
Link: https://lists.freedesktop.org/archives/dri-devel/2022-June/359496.html
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220615210019.28943-1-alexander.deucher@amd.com
2022-06-15 22:31:25 -04:00
Daniel Vetter
0f95ee9a0c
Merge tag 'drm-misc-next-2022-06-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 5.20:
UAPI Changes:
* connector: export bpc limits in debugfs
* dma-buf: Print buffer name in debugfs
Cross-subsystem Changes:
* dma-buf: Improve dma-fence handling; Cleanups
* fbdev: Device-unregistering fixes
Core Changes:
* client: Only use driver-validated modes to avoid blank screen
* dp-aux: Make probing more reliable; Small fixes
* edit: CEA data-block iterators; Introduce struct drm_edid; Many cleanups
* gem: Don't use framebuffer format's non-exising color planes
* probe-helper: Use 640x480 as DisplayPort fallback; Refactoring
* scheduler: Don't kill jobs in interrupt context
Driver Changes:
* amdgpu: Use atomic fence helpers in DM; Fix VRAM address calculation;
Export CRTC bpc settings via debugfs
* bridge: Add TI-DLPC3433; anx7625: Fixes; fy07024di26a30d: Optional
GPIO reset; icn6211: Cleanups; ldb: Add reg and reg-name properties
to bindings, Kconfig fixes; lt9611: Fix display sensing; lt9611uxc:
Fixes; nwl-dsi: Fixes; ps8640: Cleanups; st7735r: Fixes; tc358767:
DSI/DPI refactoring and DSI-to-eDP support, Fixes; ti-sn65dsi83:
Fixes;
* gma500: Cleanup connector I2C handling
* hyperv: Unify VRAM allocation of Gen1 and Gen2
* i915: export CRTC bpc settings via debugfs
* meson: Support YUV422 output; Refcount fixes
* mgag200: Support damage clipping; Support gamma handling; Protect
concurrent HW access; Fixes to connector; Store model-specific limits
in device-info structure; Cleanups
* nouveau: Fixes and Cleanups
* panel: Kconfig fixes
* panfrost: Valhall support
* r128: Fix bit-shift overflow
* rockchip: Locking fixes in error path; Minor cleanups
* ssd130x: Fix built-in linkage
* ttm: Cleanups
* udl; Always advertize VGA connector
* fbdev/vesa: Support COMPILE_TEST
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
From: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/YqBtumw05JZDEZE2@linux-uq9g
2022-06-15 19:12:17 +02:00
Zheng Bin
abf0ba5a34
drm/bridge: it6505: Add missing CRYPTO_HASH dependency
...
The driver uses crypto hash functions so it needs to select CRYPTO_HASH.
This fixes build errors:
drivers/gpu/drm/bridge/ite-it6505.o: in function `it6505_hdcp_wait_ksv_list':
ite-it6505.c:(.text+0x4c26): undefined reference to `crypto_alloc_shash'
ite-it6505.c:(.text+0x4c6d): undefined reference to `crypto_shash_digest'
ite-it6505.c:(.text+0x4c7d): undefined reference to `crypto_destroy_tfm'
ite-it6505.c:(.text+0x4d69): undefined reference to `crypto_destroy_tfm'
Fixes: b5c84a9edc ("drm/bridge: add it6505 driver")
Signed-off-by: Zheng Bin <zhengbin13@huawei.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220613150653.1310029-1-zhengbin13@huawei.com
2022-06-15 18:28:47 +02:00
Nícolas F. R. A. Prado
3f49f7591e
drm/bridge: anx7625: Zero error variable when panel bridge not present
...
While parsing the DT, the anx7625 driver checks for the presence of a
panel bridge on endpoint 1. If it is missing, pdata->panel_bridge stores
the error pointer and the function returns successfully without first
cleaning that variable. This is an issue since other functions later
check for the presence of a panel bridge by testing the trueness of that
variable.
In order to ensure proper behavior, zero out pdata->panel_bridge before
returning when no panel bridge is found.
Fixes: 9e82ea0fb1 ("drm/bridge: anx7625: switch to devm_drm_of_get_bridge")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220613163705.1531721-1-nfraprado@collabora.com
2022-06-15 18:03:44 +02:00
Marek Vasut
53b93c0ff7
drm/msm: Fix convert to drm_of_get_data_lanes_count
...
Add missing header file into dsi_host.c and encode data-lanes string
directly into the warning message in the driver to avoid build issues
detected by lkp.
Fixes: 185443efa2 ("drm/msm: Convert to drm_of_get_data_lanes_count")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Rob Clark <robdclark@gmail.com >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Sean Paul <sean@poorly.run >
To: dri-devel@lists.freedesktop.org
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612143349.105766-1-marex@denx.de
2022-06-13 17:02:32 +02:00
Jani Nikula
019fd800cf
drm/probe-helper: abstract .get_modes() connector helper call
...
Abstract the .get_modes() connector helper call, including the
override/firmware EDID fallback, for clarity.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a4de51efc246e4f5bcbf7b84d66bb49aaf7fd974.1654674560.git.jani.nikula@intel.com
2022-06-13 12:31:27 +03:00
Jani Nikula
6537f79a2a
drm/edid: add new interfaces around struct drm_edid
...
Add new functions drm_edid_read(), drm_edid_read_ddc(), and
drm_edid_read_custom() to replace drm_get_edid() and drm_do_get_edid()
for reading the EDID. The transition is expected to happen over a fairly
long time.
Note that the new drm_edid_read*() functions do not do any of the
connector updates anymore. The reading and parsing will be completely
separated from each other.
Add new functions drm_edid_alloc(), drm_edid_dup(), and drm_edid_free()
for allocating and freeing drm_edid containers.
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5a6532a94cad6a79424f6d1918dbe7b7d607ac03.1654674560.git.jani.nikula@intel.com
2022-06-13 12:30:54 +03:00
Jani Nikula
407d63b3af
drm/edid: keep track of alloc size in drm_do_get_edid()
...
We'll want to return the allocated buffer size in the future. Keep track
of it.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8e4261d8c2947ea99240ea929f09a04878235f4e.1654674560.git.jani.nikula@intel.com
2022-06-13 12:30:49 +03:00
Jani Nikula
d9307f27ef
drm/edid: add block count and data helper functions for drm_edid
...
Add drm_edid based block count and data access helper functions that
take the EDID allocated size into account.
At the moment, the allocated size should always match the EDID size
indicated by the extension count, but this will change in the future.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1a68c8667a88e7c451b001ad8bd86c8badb57fb8.1654674560.git.jani.nikula@intel.com
2022-06-13 12:30:44 +03:00
Jani Nikula
11a8d095d8
drm/edid: abstract cea data block collection size
...
Add a function to get the cea data block collection size.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5339ab3249400a3c41001967e7ff2611b58e0425.1654674560.git.jani.nikula@intel.com
2022-06-13 12:30:34 +03:00
Jani Nikula
fc67615f4e
drm/edid: fix CTA data block collection size for CTA version 3
...
The CTA Data Block Collection is valid only for CTA extension version
3. In versions 1 and 2, it is a reserved block, which we ignore.
The DTD start offset (byte 2, or d in CTA-861 spec), which determines
the CTA Data Block Collection size, is specified slightly differently
for different versions:
Version 1:
d = offset for the byte following the reserved data block. If no
data is provided in the reserved data block, then d=4. If no DTDs
are provided, then d=0
Version 2:
d = offset for the byte following the reserved data block. If no
data is provided in the reserved data block, then d=4. If d=0, then
no detailed timing descriptors are provided, and no data is provided
in the reserved data block.
Version 3:
d = offset for the byte following the data block collection. If no
data is provided in the data block collection, then d=4. If d=0,
then no detailed timing descriptors are provided, and no data is
provided in the data block collection.
Ever since commit 9e50b9d55e ("drm: edid: Add some bounds checking"),
we've interpreted 0 to mean there are no DTDs but it's all Data
Blocks. Per the spec, Data Blocks are only valid for version 3, where we
should interpret 0 to mean there are no data blocks.
Follow the spec (and hope the EDIDs follow it too).
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2a4c94417f024cbafc5d4ca0a74e4617fc4325d1.1654674560.git.jani.nikula@intel.com
2022-06-13 12:30:16 +03:00
Yang Yingliang
f4e3a12bf2
drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline()
...
If dma_fence_unwrap_merge() fails, it should return error code
in drm_syncobj_transfer_to_timeline()
Fixes: ec8d985ff2 ("drm: use dma_fence_unwrap_merge() in drm_syncobj")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220613063454.2609364-1-yangyingliang@huawei.com
2022-06-13 08:54:16 +02:00
Igor Torrente
16490922a9
drm: vkms: Alloc the compose frame using vzalloc
...
Currently, the memory to the composition frame is being allocated using
the kzmalloc. This comes with the limitation of maximum size of one
page size(which in the x86_64 is 4Kb and 4MB for default and hugepage
respectively).
Somes test of igt (e.g. kms_plane@pixel-format) uses more than 4MB when
testing some pixel formats like ARGB16161616 and the following error were
showing up when running kms_plane@plane-panning-bottom-right*:
[drm:vkms_composer_worker [vkms]] *ERROR* Cannot allocate memory for
output frame.
This problem is addessed by allocating the memory using kvzalloc that
circunvents this limitation.
V5: Improve the commit message and drop the debugging issues in VKMS
TO-DO(Melissa Wen).
Reviewed-by: Melissa Wen <mwen@igalia.com >
Signed-off-by: Igor Torrente <igormtorrente@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220404204515.42144-2-igormtorrente@gmail.com
2022-06-12 22:14:25 -01:00
Tales Lelo da Aparecida
24f6fe3226
drm/vkms: check plane_composer->map[0] before using it
...
Fix a copypasta error. The caller of compose_plane() already checks
primary_composer->map. In contrast, plane_composer->map is never
verified here before handling.
Fixes: 7938f42181 ("dma-buf-map: Rename to iosys-map")
Reviewed-by: André Almeida <andrealmeid@riseup.net >
Signed-off-by: Tales Lelo da Aparecida <tales.aparecida@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220415111300.61013-2-tales.aparecida@gmail.com
2022-06-12 22:14:03 -01:00
Peter Robinson
e5a068983c
drm/v3d: Add support for bcm2711
...
Add compatible string and Kconfig options and help for bcm2711.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Signed-off-by: Peter Robinson <pbrobinson@gmail.com >
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603092610.1909675-4-pbrobinson@gmail.com
2022-06-12 22:10:50 -01:00
Peter Robinson
90a64adb08
drm/v3d: Get rid of pm code
...
Runtime PM doesn't seem to work correctly on this driver. On top of
that, commit 8b6864e3e1 ("drm/v3d/v3d_drv: Remove unused static
variable 'v3d_v3d_pm_ops'") hints that it most likely never did as the
driver's PM ops were not hooked-up.
So, in order to support regular operation with V3D on BCM2711 (Raspberry
Pi 4), get rid of the PM code. PM will be reinstated once we figure out
the underlying issues.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Signed-off-by: Peter Robinson <pbrobinson@gmail.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Acked-by: Melissa Wen <mwen@igalia.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220603092610.1909675-3-pbrobinson@gmail.com
2022-06-12 22:10:40 -01:00
Marek Vasut
473c93b5b9
drm/bridge: rcar: Drop unused variables due to drm_of_get_data_lanes_count_ep
...
The rcar_mipi_dsi_parse_dt() now contains two uninitialized variables
due to conversion to common drm_of_get_data_lanes_count_ep() helper.
Drop them.
Fixes: d643daaf16 ("drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-3-marex@denx.de
2022-06-12 16:07:06 +02:00
Marek Vasut
c750c4ce1a
drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion
...
Initialize dsi_lanes to -1, so that in case the endpoint is missing,
probe would fail as it did before the conversion, instead of depending
on uninitialized variable and thus undefined behavior.
Fixes: 56426faa14 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-2-marex@denx.de
2022-06-12 16:07:06 +02:00
Marek Vasut
16bd48dc2b
drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612102947.13912-1-marex@denx.de
2022-06-12 16:06:58 +02:00
Marek Vasut
fc8adb13d8
drm/bridge: ti-sn65dsi83: Do not cache dsi_lanes and host twice
...
The DSI lane count can be accessed via the dsi device pointer, make use
of that. The DSI host pointer is only used in sn65dsi83_host_attach(),
move the code around so that the host does not have to be cached in the
driver private data. This simplifies the code further. No functional
change.
This has the added bonus that lt9211, tc358767, sn65dsi83 now use very
similar *_mipi_dsi_host_attach() which is ripe for deduplication.
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612102918.13874-1-marex@denx.de
2022-06-12 16:06:53 +02:00
Marek Vasut
d643daaf16
drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-11-marex@denx.de
2022-06-12 12:22:27 +02:00
Marek Vasut
185443efa2
drm/msm: Convert to drm_of_get_data_lanes_count
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Rob Clark <robdclark@gmail.com >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Sean Paul <sean@poorly.run >
To: dri-devel@lists.freedesktop.org
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-10-marex@denx.de
2022-06-12 12:22:26 +02:00
Marek Vasut
254a8d0c00
drm/bridge: ti-sn65dsi86: Convert to drm_of_get_data_lanes_count
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-9-marex@denx.de
2022-06-12 12:22:26 +02:00
Marek Vasut
56426faa14
drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-7-marex@denx.de
2022-06-12 12:22:25 +02:00