aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_dp_aux_dev.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-01-15staging/vboxvideo: Don't set FBINFO_MISC_ALWAYS_SETPARDaniel Vetter1-5/+0
It's a debug hack flag useful to work around driver bugs. That's not a good idea for a new driver. Especially for a new drm driver. Aside: the fbdev support should probably be converted over to the new generic fbdev support. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Alexander Kapshuk <alexander.kapshuk@gmail.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190115102755.16183-1-daniel.vetter@ffwll.ch
2019-01-15MAINTAINERS: Add entry for VKMSRodrigo Siqueira1-0/+10
Add maintainers and reviewers for VKMS driver Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190113204038.bvdc6d5tyxjz6bzf@smtp.gmail.com
2019-01-15drm: Complete remove drm_mode_object dependencyShayenne Moura1-18/+3
This patch finalizes the KMS cleanup task dependency from drm_display_mode. It removes the use of drm_mode_object from drm_display_mode struct and it removes the use of base.id and base.type from drm_display_mode struct print string. Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/f40e904e665fe3e3ae3ae86e837024bee3b8ca6d.1547214023.git.shayenneluzmoura@gmail.com
2019-01-15drm: Remove use of drm_mode_objectShayenne Moura2-12/+2
This patch removes the drm_mode_object prints, evaluation and use from drm_display_mode objects used in drm files. It removes dependency from drm_mode_object. Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/785896b0a551464d0b780a55411707300802d6b6.1547214023.git.shayenneluzmoura@gmail.com
2019-01-15drm: armada: Cleanup drm_display_mode print strShayenne Moura1-7/+1
This patch adjust the print string of drm_display_mode object to remove drm_mode_object dependency in armada files. Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/dddd98f1a6687a37444d315adc4cbd8a692a8131.1547214023.git.shayenneluzmoura@gmail.com
2019-01-15drm/dp: annotate implicit fall throughsMathieu Malaterre1-0/+3
There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings (W=1). Fix them up. This commit remove the following warnings: include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' drivers/gpu/drm/drm_dp_helper.c:155:3: note: in expansion of macro 'WARN' include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' drivers/gpu/drm/drm_dp_helper.c:173:3: note: in expansion of macro 'WARN' drivers/gpu/drm/drm_dp_helper.c:547:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre <malat@debian.org> Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190114202748.15584-1-malat@debian.org
2019-01-15drm/fourcc: Add modifier defininitions for AFBC 1.3Matteo Franchin1-0/+23
This commit adds definitions of format modifiers for version 1.3 of the Arm Framebuffer Compression (AFBC). Signed-off-by: Matteo Franchin <matteo.franchin@arm.com> Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com> Link: https://patchwork.freedesktop.org/patch/277333/
2019-01-14drm/vblank: Allow dynamic per-crtc max_vblank_countVille Syrjälä3-3/+70
On i965gm we need to adjust max_vblank_count dynamically depending on whether the TV encoder is used or not. To that end add a per-crtc max_vblank_count that takes precedence over its device wide counterpart. The driver can now call drm_crtc_set_max_vblank_count() to configure the per-crtc value before calling drm_vblank_on(). Also looks like there was some discussion about exynos needing similar treatment. v2: Drop the extra max_vblank_count!=0 check for the WARN(last!=current), will take care of it in i915 code (Daniel) WARN_ON(!inmodeset) (Daniel) WARN_ON(dev->max_vblank_count) Pimp up the docs (Daniel) Cc: stable@vger.kernel.org Cc: Inki Dae <inki.dae@samsung.com> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181127182004.28885-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-01-14drm/meson: remove firmware framebuffersMaxime Jourdan1-0/+20
In case we are using simplefb or another conflicting framebuffer, make the call to drm_fb_helper_remove_conflicting_framebuffers() Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181210092853.13050-1-mjourdan@baylibre.com
2019-01-14drm/mxsfb: Use drm_fbdev_generic_setup()Noralf Trønnes2-25/+2
The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20181128212713.43500-3-noralf@tronnes.org
2019-01-14drm/hisilicon/kirin: Use drm_fbdev_generic_setup()Noralf Trønnes2-39/+3
The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. struct kirin_drm_private can be removed now that driver doesn't have to store the fbdev pointer. Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20181128212713.43500-2-noralf@tronnes.org
2019-01-14drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.hSam Ravnborg3-5/+17
In the quest to get rid of drmP.h move the newly added EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h. Fix the single user. Add a note to drmP.h to avoid further use of it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190112193251.20450-3-sam@ravnborg.org
2019-01-14drm: move drm_can_sleep() to drm_util.hSam Ravnborg14-9/+66
Move drm_can_sleep() out of drmP.h to allow users to get rid of the drmP.h include. There was no header file that was a good match for this helper function. So add this to drm_util with the relevant includes. Add include of drm_util.h to all users. v2: - Update comments to use kernel-doc style (Daniel) - Add FIXME to drm_can_sleep and add note that this function should not be used in new code (Daniel) v3: - Fix kernel-doc syntax (Daniel) - Plug drm_util.h into drm-internels.rst (Daniel) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190112193251.20450-2-sam@ravnborg.org
2019-01-14drm/cirrus: fix connector leak at unloadRob Clark1-0/+2
This fixes an '*ERROR* connector VGA-2 leaked!' splat at driver unload. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111140242.29002-1-robdclark@gmail.com [ kraxel: adapt to commit "c2d88e06bc drm: Move the legacy kms disable_all helper to crtc helpers" ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-14drm/bochs: move remaining fb bits to kmsGerd Hoffmann3-30/+18
bochs_fbdev.c is almost empty now. Move the remaining framebuffer bits over to bochs_kms.c. Pure code motion. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-17-kraxel@redhat.com
2019-01-14drm/bochs: drop old fbdev emulation codeGerd Hoffmann2-138/+0
Not needed any more, bochs uses the generic emulation now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-16-kraxel@redhat.com
2019-01-14drm/bochs: switch to generic drm fbdev emulationGerd Hoffmann1-12/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-15-kraxel@redhat.com
2019-01-14drm/bochs: add basic prime supportGerd Hoffmann3-1/+66
Just enough to make the generic framebuffer emulation happy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-14-kraxel@redhat.com
2019-01-14drm/bochs: move ttm_bo_(un)reserve calls into bochs_bo_{pin, unpin}Gerd Hoffmann3-21/+9
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-13-kraxel@redhat.com
2019-01-14drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()Gerd Hoffmann4-13/+4
It's always NULL, so just remove it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-12-kraxel@redhat.com
2019-01-14drm/bochs: remove old bochs_crtc_* functionsGerd Hoffmann1-81/+0
Remove the old, now unused crtc callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-11-kraxel@redhat.com
2019-01-14drm/bochs: atomic: set DRIVER_ATOMICGerd Hoffmann1-1/+1
Conversion to atomic modesetting, final step. Set the DRIVER_ATOMIC flag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-10-kraxel@redhat.com
2019-01-14drm/bochs: atomic: use suspend/resume helpersGerd Hoffmann1-9/+2
Switch to atomic helpers: drm_mode_config_helper_suspend/resume(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-9-kraxel@redhat.com
2019-01-14drm/bochs: atomic: use atomic page_flip helperGerd Hoffmann1-22/+1
Conversion to atomic modesetting, step five. Use atomic page_flip helper for crtc. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-8-kraxel@redhat.com
2019-01-14drm/bochs: atomic: use atomic set_config helperGerd Hoffmann1-1/+1
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-7-kraxel@redhat.com
2019-01-14drm/bochs: atomic: switch planes to atomic, wire up helpers.Gerd Hoffmann2-3/+82
Conversion to atomic modesetting, step three. Wire up atomic helpers. Switch planes to atomic. We are late to the party, the transitional helpers are gone, so this can't be splitted into smaller steps any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-6-kraxel@redhat.com
2019-01-14drm/bochs: atomic: add mode_set_nofb callback.Gerd Hoffmann1-0/+9
Conversion to atomic modesetting, step two. Add mode_set_nofb crtc helper callback. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-5-kraxel@redhat.com
2019-01-14drm/bochs: atomic: add atomic_flush+atomic_enable callbacks.Gerd Hoffmann1-0/+25
Conversion to atomic modesetting, step one. Add atomic crtc helper callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-4-kraxel@redhat.com
2019-01-14drm/bochs: split bochs_hw_setmodeGerd Hoffmann3-10/+17
Create a separate bochs_hw_setformat function to configure the framebuffer format (actually just the byteorder). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-3-kraxel@redhat.com
2019-01-14drm/bochs: encoder cleanupGerd Hoffmann1-26/+0
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-2-kraxel@redhat.com
2019-01-12drm: rockchip: vop: add rk3066 vop definitionsMark Yao3-0/+164
This patch adds the rk3066 VOP definitions. The VOP or LCD Controller serves as interface between framebuffer memory and a display device (LCD panel or TV set). This SOC has two symmetrical LCDC's for a dual panel application. A LCDC has 5 display layers. Only 3 are used here. - Video layer 0 (Win0) - Video layer 1 (Win1) - OSD layer (Win2) Win0 and Win1 are exchangeable. Maximum resolution is 1920x1080. The LCDC0 output is connected to: - LCDC0 IO (without IOMUX) - HDMI TX video input The LCDC1 output is connected to: - LCDC1 IO (with IOMUX) - HDMI TX video input The HDMI TX input can switch between LCDC0 and LCDC1. Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20181229133318.18128-4-jbx6244@gmail.com
2019-01-12drm/doc: Move bridge link target to the right placeDaniel Vetter1-2/+2
I screwed up a rebase somehow. v2: Drop bogus hunk. v3: Really drop bogus hunk (Lubomir). Cc: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-4-daniel.vetter@ffwll.ch
2019-01-12drm/panel: Small documentation polishDaniel Vetter2-4/+21
Need to make sure people can find the panel-bridge to avoid typing too much. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-3-daniel.vetter@ffwll.ch
2019-01-12drm/of: Fix kerneldocDaniel Vetter1-1/+3
I noticed a link that didn't work ... Fixes: 1f2db3034c9f ("drm: of: introduce drm_of_find_panel_or_bridge") Cc: Rob Herring <robh@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Sean Paul <seanpaul@chromium.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-2-daniel.vetter@ffwll.ch
2019-01-12drm/docs: improve docs for drm_drv.cDaniel Vetter1-12/+11
Just a bit of drive-by reading: - drm_dev_set_unique() is really the exception, make that clear. - drm_dev_init() is the recomended approach. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-1-daniel.vetter@ffwll.ch
2019-01-11drm/doc: Polish kerneldoc for drm_device.hDaniel Vetter2-65/+88
- Move all the legacy gunk at the bottom, and exclude it from kerneldoc. - Documentation for the remaining bits. v2: Fix typo (Sam). Cc: Sam Ravnborg <sam@ravnborg.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-5-daniel.vetter@ffwll.ch
2019-01-11drm/tda998x: Don't set dpms hookDaniel Vetter1-1/+0
Doesn't do anything for atomic drivers. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Russell King <linux@armlinux.org.uk> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-6-daniel.vetter@ffwll.ch
2019-01-11drm/arc: Don't set the dpms hookDaniel Vetter1-1/+0
Doesn't do anything for atomic. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-5-daniel.vetter@ffwll.ch
2019-01-11drm: Move the legacy kms disable_all helper to crtc helpersDaniel Vetter8-37/+40
It's not a core function, and the matching atomic functions are also not in the core. Plus the suspend/resume helper is also already there. Needs a tiny bit of open-coding, but less midlayer beats that I think. v2: Rebase onto ast (which gained a new user). Cc: Sam Bobroff <sbobroff@linux.ibm.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Sean Paul <sean@poorly.run> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: Rex Zhu <Rex.Zhu@amd.com> Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Cc: Huang Rui <ray.huang@amd.com> Cc: Shaoyun Liu <Shaoyun.Liu@amd.com> Cc: Monk Liu <Monk.Liu@amd.com> Cc: nouveau@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-4-daniel.vetter@ffwll.ch
2019-01-11drm/panel: Add a driver for the TPO TPG110Linus Walleij4-0/+513
The TPO (Toppoly) TPG110 is a pretty generic display driver similar in vein to the Ilitek 93xx devices. It is not a panel per se but a driver used with several low-cost noname panels. This is used on the Nomadik NHK15 combined with a OSD OSD057VA01CT display for WVGA 800x480. The driver is pretty minimalistic right now but can be extended to handle non-default polarities, gamma correction etc. The driver is based on the baked-in code in drivers/video/fbdev/amba-clcd-nomadik.c which will be decomissioned once this us upstream. Cc: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190111175406.27646-1-linus.walleij@linaro.org
2019-01-11drm: Auto-set allow_fb_modifiers when given modifiers at plane initPaul Kocialkowski1-0/+3
When drivers pass non-empty lists of modifiers for initializing their planes, we can infer that they allow framebuffer modifiers and set the driver's allow_fb_modifiers mode config element. In case the allow_fb_modifiers element was not set (some drivers tend to set them after registering planes), the modifiers will still be registered but won't be available to userspace unless the flag is set later. However in that case, the IN_FORMATS blob won't be created. In order to avoid this case and generally reduce the trouble associated with the flag, always set allow_fb_modifiers when a non-empty list of format modifiers is passed at plane init. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190104085610.5829-1-paul.kocialkowski@bootlin.com
2019-01-11drm/vc4: Limit SAND tiling support to semiplanar YUV420 formatsPaul Kocialkowski1-16/+1
Despite what the HVS documentation indicates, the VC4 does not actually support SAND tiling modes for any RGB format and only semiplanar YUV420 formats (NV12/NV21) can be used in these tiling modes. The driver currently claims to support RGB formats for the associated modifiers, so remove them from the supported list in the format_mod_supported helper for RGB formats. Remove further checks that are no longer necessary along the way, since semi-planar YUV420 formats support every SAND tiling mode. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181214141218.12671-1-paul.kocialkowski@bootlin.com
2019-01-11drm/atomic: Add missing () to function ref in kerneldocDaniel Vetter1-3/+3
Pure drive-by while reading code&docs. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181012073441.21774-1-daniel.vetter@ffwll.ch
2019-01-11drm: Unexport drm_crtc_force_disableDaniel Vetter3-11/+1
It's a legacy kms only thing, good to hide it better now that all those old drivers use the legacy crtc helpers directly. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-3-daniel.vetter@ffwll.ch
2019-01-11drm/nouveau: Stop using drm_crtc_force_disableDaniel Vetter1-1/+3
The correct way for legacy drivers to update properties that need to do a full modeset, is to do a full modeset. Note that we don't need to call the drm_mode_config_internal helper because we're not changing any of the refcounted paramters. v2: Fixup error handling (Ville). Since the old code didn't bother I decided to just delete it instead of adding even more code for just error handling. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Cc: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-2-daniel.vetter@ffwll.ch
2019-01-11drm/ch7006: Stop using drm_crtc_force_disableDaniel Vetter1-3/+3
The correct way for legacy drivers to update properties that need to do a full modeset, is to do a full modeset. Note that we don't need to call the drm_mode_config_internal helper because we're not changing any of the refcounted paramters. v2: Fixup error handling (Ville). Since the old code didn't bother I decided to just delete it instead of adding even more code for just error handling. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-1-daniel.vetter@ffwll.ch
2019-01-10drm/nouveau: Use atomic VCPI helpers for MSTLyude Paul1-6/+48
Currently, nouveau uses the yolo method of setting up MST displays: it uses the old VCPI helpers (drm_dp_find_vcpi_slots()) for computing the display configuration. These helpers don't take care to make sure they take a reference to the mstb port that they're checking, and additionally don't actually check whether or not the topology still has enough bandwidth to provide the VCPI tokens required. So, drop usage of the old helpers and move entirely over to the atomic helpers. Changes since v6: * Cleanup atomic check logic and remove a bunch of unneeded checks - danvet Changes since v5: * Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the new requirements for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Airlie <airlied@redhat.com> Cc: Jerry Zuo <Jerry.Zuo@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Juston Li <juston.li@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-21-lyude@redhat.com
2019-01-10drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()Lyude Paul1-1/+7
It occurred to me that we never actually check this! So let's start doing that. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Airlie <airlied@redhat.com> Cc: Jerry Zuo <Jerry.Zuo@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Juston Li <juston.li@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-20-lyude@redhat.com
2019-01-10drm/dp_mst: Start tracking per-port VCPI allocationsLyude Paul4-62/+266
There has been a TODO waiting for quite a long time in drm_dp_mst_topology.c: /* We cannot rely on port->vcpi.num_slots to update * topology_state->avail_slots as the port may not exist if the parent * branch device was unplugged. This should be fixed by tracking * per-port slot allocation in drm_dp_mst_topology_state instead of * depending on the caller to tell us how many slots to release. */ That's not the only reason we should fix this: forcing the driver to track the VCPI allocations throughout a state's atomic check is error prone, because it means that extra care has to be taken with the order that drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() are called in in order to ensure idempotency. Currently the only driver actually using these helpers, i915, doesn't even do this correctly: multiple ->best_encoder() checks with i915's current implementation would not be idempotent and would over-allocate VCPI slots, something I learned trying to implement fallback retraining in MST. So: simplify this whole mess, and teach drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() to track the VCPI allocations for each port. This allows us to ensure idempotency without having to rely on the driver as much. Additionally: the driver doesn't need to do any kind of VCPI slot tracking anymore if it doesn't need it for it's own internal state. Additionally; this adds a new drm_dp_mst_atomic_check() helper which must be used by atomic drivers to perform validity checks for the new VCPI allocations incurred by a state. Also: update the documentation and make it more obvious that these /must/ be called by /all/ atomic drivers supporting MST. Changes since v9: * Add some missing changes that were requested by danvet that I forgot about after I redid all of the kref stuff: * Remove unnecessary state changes in intel_dp_mst_atomic_check * Cleanup atomic check logic for VCPI allocations - all we need to check in compute_config is whether or not this state disables a CRTC, then free VCPI based off that Changes since v8: * Fix compile errors, whoops! Changes since v7: - Don't check for mixed stale/valid VCPI allocations, just rely on connector registration to stop such erroneous modesets Changes since v6: - Keep a kref to all of the ports we have allocations on. This required a good bit of changing to when we call drm_dp_find_vcpi_slots(), mainly that we need to ensure that we only redo VCPI allocations on actual mode or CRTC changes, not crtc_state->active changes. Additionally, we no longer take the registration of the DRM connector for each port into account because so long as we have a kref to the port in the new or previous atomic state, the connector will stay registered. - Use the small changes to drm_dp_put_port() to add even more error checking to make misusage of the helpers more obvious. I added this after having to chase down various use-after-free conditions that started popping up from the new helpers so no one else has to troubleshoot that. - Move some accidental DRM_DEBUG_KMS() calls to DRM_DEBUG_ATOMIC() - Update documentation again, note that find/release() should both not be called on the same port in a single atomic check phase (but multiple calls to one or the other is OK) Changes since v4: - Don't skip the atomic checks for VCPI allocations if no new VCPI allocations happen in a state. This makes the next change I'm about to list here a lot easier to implement. - Don't ignore VCPI allocations on destroyed ports, instead ensure that when ports are destroyed and still have VCPI allocations in the topology state, the only state changes allowed are releasing said ports' VCPI. This prevents a state with a mix of VCPI allocations from destroyed ports, and allocations from valid ports. Changes since v3: - Don't release VCPI allocations in the topology state immediately in drm_dp_atomic_release_vcpi_slots(), instead mark them as 0 and skip over them in drm_dp_mst_duplicate_state(). This makes it so drm_dp_atomic_release_vcpi_slots() is still idempotent while also throwing warnings if the driver messes up it's book keeping and tries to release VCPI slots on a port that doesn't have any pre-existing VCPI allocation - danvet - Change mst_state/state in some debugging messages to "mst state" Changes since v2: - Use kmemdup() for duplicating MST state - danvet - Move port validation out of duplicate state callback - danvet - Handle looping through MST topology states in drm_dp_mst_atomic_check() so the driver doesn't have to do it - Fix documentation in drm_dp_atomic_find_vcpi_slots() - Move the atomic check for each individual topology state into it's own function, reduces indenting - Don't consider "stale" MST ports when calculating the bandwidth requirements. This is needed because originally we relied on the state duplication functions to prune any stale ports from the new state, which would prevent us from incorrectly considering their bandwidth requirements alongside legitimate new payloads. - Add function references in drm_dp_atomic_release_vcpi_slots() - danvet - Annotate atomic VCPI and atomic check functions with __must_check - danvet Changes since v1: - Don't use the now-removed ->atomic_check() for private objects hook, just give drivers a function to call themselves Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@redhat.com> Cc: Jerry Zuo <Jerry.Zuo@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Juston Li <juston.li@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-19-lyude@redhat.com
2019-01-10drm/dp_mst: Add some atomic state iterator macrosLyude Paul2-2/+99
Changes since v6: - Move EXPORT_SYMBOL() for drm_dp_mst_topology_state_funcs to this commit - Document __drm_dp_mst_state_iter_get() and note that it shouldn't be called directly Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Airlie <airlied@redhat.com> Cc: Jerry Zuo <Jerry.Zuo@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Juston Li <juston.li@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-18-lyude@redhat.com