1
0
Fork 0
alistair23-linux/drivers/gpu/drm
Noralf Trønnes d81294afee drm/fb-helper: Remove drm_fb_helper_crtc
struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so
use that directly instead and attach it as a modeset array onto
drm_client_dev. drm_fb_helper will use this array to store its modesets
which means it will always initialize a drm_client, but it will not
register the client (callbacks) unless it's the generic fbdev emulation.

Code will later be moved to drm_client, so add code there in a new file
drm_client_modeset.c with MIT license to match drm_fb_helper.c.

The modeset connector array size is hardcoded for the cloned case to avoid
having to pass in a value from the driver. A value of 8 is chosen to err
on the safe side. This means that the max connector argument for
drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore,
a todo entry for this is added.

In pan_display_atomic() restore_fbdev_mode_force() is used instead of
restore_fbdev_mode_atomic() because that one will later become internal
to drm_client_modeset.

Locking order:
1. drm_fb_helper->lock
2. drm_master_internal_acquire
3. drm_client_dev->modeset_mutex

v6: Improve commit message (Sam Ravnborg)

v3:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

v2:
- Add modesets array to drm_client (Daniel Vetter)
- Use a new file for the modeset code (Daniel Vetter)
- File has to be MIT licensed (Emmanuel Vadot)
- Add copyrights from drm_fb_helper.c

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-3-noralf@tronnes.org
2019-06-04 12:13:47 +02:00
..
amd drm/amd/display: Only force modesets when toggling HDR 2019-06-03 10:23:10 -04:00
arc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
arm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
armada drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
aspeed treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ast drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
atmel-hlcdc drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
bochs drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
bridge drm/bridge: sii902x: Implement HDMI audio support 2019-05-31 15:57:19 +02:00
cirrus drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
etnaviv drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
exynos treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fsl-dcu treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
gma500 drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
hisilicon drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
i2c treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i810 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i915 Features: 2019-05-28 09:26:52 +10:00
imx drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
lib
lima drm/lima: add timeout to drm scheduler init 2019-05-21 20:47:36 +08:00
mcde drm/mcde: Fix compile problems 2019-05-26 13:42:23 +02:00
mediatek drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
meson Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
mga treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mgag200 drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
msm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
mxsfb treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nouveau drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
omapdrm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
panel drm/panel: drop drmP.h usage 2019-05-28 17:14:53 +02:00
panfrost drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
pl111 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qxl treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
r128 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
radeon drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
rcar-du drm: rcar-du: lvds: Set LVEN and LVRES bits together on D3 2019-03-28 06:12:42 +02:00
rockchip drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
savage treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
scheduler drm/sched: Fix make htmldocs warnings. 2019-05-29 11:49:51 -05:00
selftests treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
shmobile video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol 2019-04-03 11:15:57 +01:00
sis treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sti treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
stm Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
sun4i drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
tdfx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tegra drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
tilcdc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tinydrm treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ttm drm pull request for 5.2 2019-05-08 21:35:19 -07:00
tve200 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
udl treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
v3d drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
vboxvideo Merge drm/drm-next into drm-misc-next 2019-05-22 16:08:21 -04:00
vc4 drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
vgem treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
via treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
virtio drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
vkms drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
vmwgfx drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read 2019-05-21 10:23:10 +02:00
xen treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zte drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
Kconfig Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
Makefile drm/fb-helper: Remove drm_fb_helper_crtc 2019-06-04 12:13:47 +02:00
ati_pcigart.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_agpsupport.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_atomic.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_atomic_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_atomic_state_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_atomic_uapi.c Features: 2019-05-28 09:26:52 +10:00
drm_auth.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_blend.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_bridge.c
drm_bufs.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_cache.c
drm_client.c drm/fb-helper: Remove drm_fb_helper_crtc 2019-06-04 12:13:47 +02:00
drm_client_modeset.c drm/fb-helper: Remove drm_fb_helper_crtc 2019-06-04 12:13:47 +02:00
drm_color_mgmt.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_connector.c Features: 2019-05-28 09:26:52 +10:00
drm_context.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_crtc.c drm/lease: Make sure implicit planes are leased 2019-04-24 11:30:32 +02:00
drm_crtc_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_crtc_helper_internal.h
drm_crtc_internal.h drm: make drm_crtc_internal.h self-contained 2019-05-27 18:06:27 +02:00
drm_damage_helper.c drm/damage-helper: Use NULL instead of 0 2019-05-28 09:03:06 +02:00
drm_debugfs.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_debugfs_crc.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_dma.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_dp_aux_dev.c drm/dp: drmP.h include removal 2019-05-06 16:00:48 +03:00
drm_dp_cec.c
drm_dp_dual_mode_helper.c drm/dp: drmP.h include removal 2019-05-06 16:00:48 +03:00
drm_dp_helper.c drm/dp: drmP.h include removal 2019-05-06 16:00:48 +03:00
drm_dp_mst_topology.c drm/mst: Fix MST sideband up-reply failure handling 2019-05-29 20:12:34 +03:00
drm_drv.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_dsc.c drm/dsc: Split DSC PPS and SDP header initialisations 2019-03-05 13:24:34 -05:00
drm_dumb_buffers.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_edid.c drm/edid: Fix docbook in drm_hdmi_infoframe_set_hdr_metadata() 2019-05-23 12:58:35 -04:00
drm_edid_load.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_encoder.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm/fb-helper: Remove drm_fb_helper_crtc 2019-06-04 12:13:47 +02:00
drm_file.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_flip_work.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_format_helper.c drm: Remove users of drm_format_info_plane_cpp 2019-05-20 13:35:56 +02:00
drm_fourcc.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_framebuffer.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem_cma_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem_framebuffer_helper.c drm/docs: More links for implicit/explicit fencing. 2019-06-03 17:11:33 +02:00
drm_gem_shmem_helper.c drm: shmem: Off by one in drm_gem_shmem_fault() 2019-04-01 10:44:34 -07:00
drm_gem_vram_helper.c drm: Assert that BO is locked in drm_gem_vram_{pin, unpin}_locked() 2019-05-22 12:43:30 +02:00
drm_hashtab.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_hdcp.c drm/hdcp: drm_hdcp_request_srm() as static 2019-05-13 22:05:54 +02:00
drm_internal.h Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_ioc32.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_ioctl.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_irq.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_kms_helper_common.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_lease.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_legacy.h drm: make drm_legacy.h self-contained 2019-05-27 18:06:47 +02:00
drm_legacy_misc.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_lock.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_memory.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mipi_dsi.c
drm_mm.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mode_config.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mode_object.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_modes.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_modeset_helper.c
drm_modeset_lock.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_of.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_panel.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 2019-03-01 09:15:55 +02:00
drm_pci.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_plane.c drm/lease: Make sure implicit planes are leased 2019-04-24 11:30:32 +02:00
drm_plane_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_prime.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_print.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_probe_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_property.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_rect.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_scatter.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_scdc_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_simple_kms_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_syncobj.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_sysfs.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_trace.h drm: make drm_trace.h self-contained 2019-05-27 18:06:54 +02:00
drm_trace_points.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vblank.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vm.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vma_manager.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vram_helper_common.c drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin 2019-05-22 12:43:29 +02:00
drm_vram_mm_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_writeback.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00