platform/kernel/linux-rpi.git
5 years agodrm/nouveau: remove open-coded drm_invalid_op()
Emil Velikov [Wed, 22 May 2019 15:02:19 +0000 (16:02 +0100)]
drm/nouveau: remove open-coded drm_invalid_op()

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190522150219.13913-2-emil.l.velikov@gmail.com
5 years agodrm/i915: remove irrelevant DRM_UNLOCKED flag
Emil Velikov [Wed, 22 May 2019 15:47:01 +0000 (16:47 +0100)]
drm/i915: remove irrelevant DRM_UNLOCKED flag

DRM_UNLOCKED doesn't do anything for non-legacy drivers. Remove it.

Cc: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190522154702.16269-3-emil.l.velikov@gmail.com
5 years agodrm/tegra: remove irrelevant DRM_UNLOCKED flag
Emil Velikov [Wed, 22 May 2019 15:46:59 +0000 (16:46 +0100)]
drm/tegra: remove irrelevant DRM_UNLOCKED flag

DRM_UNLOCKED doesn't do anything for non-legacy drivers. Remove it.

Cc: Thierry Reding <treding@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190522154702.16269-1-emil.l.velikov@gmail.com
5 years agodt-bindings: panel: Add Boe Himax8279d is 1200x1920, 4-lane MIPI-DSI LCD panel
Jerry Han [Thu, 25 Apr 2019 03:18:42 +0000 (11:18 +0800)]
dt-bindings: panel: Add Boe Himax8279d is 1200x1920, 4-lane MIPI-DSI LCD panel

The Boe Himax8279d is a 8.0" panel with a 1200x1920 resolution and
connected to DSI using four lanes.

V8:
- Modify communication address

V7:
- Add the information of the reviewer

V6:
- Add the information of the reviewer

V5:
- Added changelog

V4:
- None

V3:
- None

V2:
- Add compatible device "boe,himax8279d10p" (Sam)
- Add the necessary property descriptions (Sam)

Signed-off-by: Jerry Han <jerry.han.hq@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Cc: Jitao Shi <jitao.shi@mediatek.com>
Cc: Rock wang <rock_wang@himax.com.cn>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190425031842.17202-1-jerry.han.hq@gmail.com
5 years agodt-bindings: display: Add ETM0700G0DH6 compatible string
Marek Vasut [Fri, 3 May 2019 15:47:49 +0000 (17:47 +0200)]
dt-bindings: display: Add ETM0700G0DH6 compatible string

The ETM0700G0DH6 is currently documented as using edt,etm070080dh6
compatible string, however the Linux kernel driver as well as a
couple of DTs use edt,etm0700g0dh6 compatible string. Add it into
the documentation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Jan Tuerk <jan.tuerk@emtrion.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: devicetree@vger.kernel.org
To: dri-devel@lists.freedesktop.org
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190503154749.5630-1-marex@denx.de
5 years agodrm/panel: jh057n00900: Add regulator support
Guido Günther [Wed, 26 Jun 2019 10:37:51 +0000 (12:37 +0200)]
drm/panel: jh057n00900: Add regulator support

Allow to specify regulators for vcc and iovcc. According to the data
sheet the panel wants vcc (2.8V) and iovcc (1.8V) and there's no startup
dependency between the two.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/f78611fb26329e50ec1533810fbb76562f2f4e48.1561542477.git.agx@sigxcpu.org
5 years agodt-bindings: display/panel: jh057n00900: Document power supply properties
Guido Günther [Wed, 26 Jun 2019 10:37:50 +0000 (12:37 +0200)]
dt-bindings: display/panel: jh057n00900: Document power supply properties

Document the vcc-supply and iovcc-supply properties of the Rocktech
jh057n00900 panel.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/ec5ee11786036dc8826a3f8555cbb1dce4dbca25.1561542477.git.agx@sigxcpu.org
5 years agodrm/panel: jh057n00900: Don't use magic constant
Guido Günther [Wed, 26 Jun 2019 10:37:49 +0000 (12:37 +0200)]
drm/panel: jh057n00900: Don't use magic constant

0xBF isn't in any ST7703 data sheet so mark it as unknown. This avoids
confusion on whether there is a missing command in that
dsi_generic_write_seq() call.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/7f50fa6de2ae029111f158f8ea7fd69a0903eb97.1561542477.git.agx@sigxcpu.org
5 years agoMAINTAINERS: Add Purism mail alias as reviewer for their devkit's panel
Guido Günther [Wed, 26 Jun 2019 10:37:48 +0000 (12:37 +0200)]
MAINTAINERS: Add Purism mail alias as reviewer for their devkit's panel

Add a mail alias as reviewer for the rocktech jh057n00900 panel driver.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/a392758c914d436ec5e449980f619bc906c3054a.1561542477.git.agx@sigxcpu.org
5 years agodrm/panel: Add support for Raydium RM67191 panel driver
Robert Chiras [Wed, 26 Jun 2019 12:08:27 +0000 (15:08 +0300)]
drm/panel: Add support for Raydium RM67191 panel driver

This patch adds Raydium RM67191 TFT LCD panel driver (MIPI-DSI
protocol).

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1561550907-9733-3-git-send-email-robert.chiras@nxp.com
5 years agodt-bindings: display: panel: Add support for Raydium RM67191 panel
Robert Chiras [Wed, 26 Jun 2019 12:08:26 +0000 (15:08 +0300)]
dt-bindings: display: panel: Add support for Raydium RM67191 panel

Add dt-bindings documentation for Raydium RM67191 DSI panel.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1561550907-9733-2-git-send-email-robert.chiras@nxp.com
5 years agodrm/panel: simple: Add Sharp LS020B1DD01D panel support
Paul Cercueil [Mon, 3 Jun 2019 15:31:20 +0000 (17:31 +0200)]
drm/panel: simple: Add Sharp LS020B1DD01D panel support

The Sharp LS020B1DD01D is a simple 2.0" 240x160 16-bit TFT panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603153120.23947-3-paul@crapouillou.net
5 years agodrm: Add bus flag for Sharp-specific signals
Paul Cercueil [Mon, 3 Jun 2019 15:31:19 +0000 (17:31 +0200)]
drm: Add bus flag for Sharp-specific signals

Add the DRM_BUS_FLAG_SHARP_SIGNALS to the drm_bus_flags enum.

This flags can be used when the display must be driven with the
Sharp-specific signals SPL, CLS, REV, PS.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603153120.23947-2-paul@crapouillou.net
5 years agodt-bindings: display: Add Sharp LS020B1DD01D panel documentation
Paul Cercueil [Mon, 3 Jun 2019 15:31:18 +0000 (17:31 +0200)]
dt-bindings: display: Add Sharp LS020B1DD01D panel documentation

The LS020B1DD01D is a 2.0" 240x160 16-bit TFT LCD panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603153120.23947-1-paul@crapouillou.net
5 years agodrm/panel: Add Novatek NT39016 panel support
Paul Cercueil [Mon, 3 Jun 2019 15:25:55 +0000 (17:25 +0200)]
drm/panel: Add Novatek NT39016 panel support

Add support for display panels built around the Novatek NT39016 display
controller, as found on e.g. the King Display KD035G6-54NT 24-bit
320x240 3.5" LCD panel which equips the GCW Zero open-source handheld
gaming console.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603152555.23527-2-paul@crapouillou.net
5 years agodt-bindings: display: Add King Display KD035G6-54NT panel documentation
Paul Cercueil [Mon, 3 Jun 2019 15:25:54 +0000 (17:25 +0200)]
dt-bindings: display: Add King Display KD035G6-54NT panel documentation

The KD035G6-54NT is a 3.5" 320x240 24-bit TFT LCD panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603152555.23527-1-paul@crapouillou.net
5 years agoMAINTAINERS: Update Maintainers and Reviewers of DRM Bridge Drivers
Neil Armstrong [Mon, 24 Jun 2019 09:08:51 +0000 (11:08 +0200)]
MAINTAINERS: Update Maintainers and Reviewers of DRM Bridge Drivers

Add myself as co-maintainer of DRM Bridge Drivers then add Jonas Karlman
and Jernej Škrabec as Reviewers of DRM Bridge Drivers.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Jernej Škrabec <jernej.skrabec@siol.net>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624090851.17859-1-narmstrong@baylibre.com
5 years agodrm/panel: simple: Add Ortustech COM37H3M panel support
H. Nikolaus Schaller [Fri, 7 Jun 2019 11:11:08 +0000 (13:11 +0200)]
drm/panel: simple: Add Ortustech COM37H3M panel support

The change adds support for the Ortustech COM37H3M05DTC/99DTC 3.7" TFT LCD panel.

Tested on Letux3704.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/43b47034b618cff26cea0484591c6deafb7f0685.1559905870.git.hns@goldelico.com
5 years agodrm/panel: simple: Add Sharp LQ070Y3DG3B panel support
H. Nikolaus Schaller [Fri, 7 Jun 2019 11:11:07 +0000 (13:11 +0200)]
drm/panel: simple: Add Sharp LQ070Y3DG3B panel support

The change adds support for the Sharp LQ070Y3DG3B 7.0" TFT LCD panel.

Tested on Letux7004.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/d16aaa1ac93e4f15c13cd7d621de95836257676a.1559905870.git.hns@goldelico.com
5 years agodt-bindings: drm/panel: simple: add sharp, lq070y3dg3b panel
H. Nikolaus Schaller [Fri, 7 Jun 2019 11:11:11 +0000 (13:11 +0200)]
dt-bindings: drm/panel: simple: add sharp, lq070y3dg3b panel

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/ee90ed56d2c294ce8ac3b44bf2229c5ab9f85e91.1559905870.git.hns@goldelico.com
5 years agodt-bindings: drm/panel: simple: add ortustech, com37h3m99dtc panel
H. Nikolaus Schaller [Fri, 7 Jun 2019 11:11:10 +0000 (13:11 +0200)]
dt-bindings: drm/panel: simple: add ortustech, com37h3m99dtc panel

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/3e0720fbddfd7b35ad8551440544411485d8ad9f.1559905870.git.hns@goldelico.com
5 years agodt-bindings: drm/panel: simple: add ortustech, com37h3m05dtc panel
H. Nikolaus Schaller [Fri, 7 Jun 2019 11:11:09 +0000 (13:11 +0200)]
dt-bindings: drm/panel: simple: add ortustech, com37h3m05dtc panel

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/a650cb8df1bdf58ec3c8a182532692db16b77f70.1559905870.git.hns@goldelico.com
5 years agodrm/panel: simple: Add GiantPlus GPM940B0 panel support
Paul Cercueil [Wed, 5 Jun 2019 22:22:47 +0000 (00:22 +0200)]
drm/panel: simple: Add GiantPlus GPM940B0 panel support

The GiantPlus GPM940B0 is a simple 3.0" 320x240 24-bit TFT panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605222247.25657-3-paul@crapouillou.net
5 years agomedia: uapi: Add MEDIA_BUS_FMT_RGB888_3X8 media bus format
Paul Cercueil [Wed, 5 Jun 2019 22:22:46 +0000 (00:22 +0200)]
media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8 media bus format

This patch adds MEDIA_BUS_FMT_RGB888_3X8, used for the GiantPlus
GPM940B0 24-bit TFT panel, where the RGB components are transferred
sequentially on a 8-bit bus.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605222247.25657-2-paul@crapouillou.net
5 years agodt-bindings: display: Add GiantPlus GPM940B0 panel documentation
Paul Cercueil [Wed, 5 Jun 2019 22:22:45 +0000 (00:22 +0200)]
dt-bindings: display: Add GiantPlus GPM940B0 panel documentation

The GPM940B0 is a 3.0" 320x240 24-bit TFT LCD panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605222247.25657-1-paul@crapouillou.net
5 years agodrm/msm: Drop robj from msm_gem_new_impl
Daniel Vetter [Fri, 14 Jun 2019 20:36:01 +0000 (22:36 +0200)]
drm/msm: Drop robj from msm_gem_new_impl

Only user was the prime import, and drm_prime.c takes care of that
now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-46-daniel.vetter@ffwll.ch
5 years agodrm/etnaviv: Drop resv argument from etnaviv_gem_new_impl
Daniel Vetter [Fri, 14 Jun 2019 20:35:58 +0000 (22:35 +0200)]
drm/etnaviv: Drop resv argument from etnaviv_gem_new_impl

Only user was the prime import, and drm_prime.c takes care of that
now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: etnaviv@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-43-daniel.vetter@ffwll.ch
5 years agodrm/todo: Add new debugfs todo
Daniel Vetter [Fri, 14 Jun 2019 20:36:14 +0000 (22:36 +0200)]
drm/todo: Add new debugfs todo

Greg is busy already, but maybe he won't do everything ...

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-59-daniel.vetter@ffwll.ch
5 years agodrm/todo: Update mmap todo
Daniel Vetter [Fri, 14 Jun 2019 20:36:13 +0000 (22:36 +0200)]
drm/todo: Update mmap todo

Thanks to Noralf some good progress already.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-58-daniel.vetter@ffwll.ch
5 years agodrm/todo: Update backlight todo
Daniel Vetter [Fri, 14 Jun 2019 20:36:12 +0000 (22:36 +0200)]
drm/todo: Update backlight todo

Basic helpers have been extracted, now there's a pile more todo still
across the entire tree.

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-57-daniel.vetter@ffwll.ch
5 years agodrm/todo: remove gem_prime_import/export todo
Daniel Vetter [Fri, 14 Jun 2019 20:36:11 +0000 (22:36 +0200)]
drm/todo: remove gem_prime_import/export todo

I've done that.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-56-daniel.vetter@ffwll.ch
5 years agodrm/vc4: Don set gem_obj->resv in prime import anymore
Daniel Vetter [Fri, 14 Jun 2019 20:36:03 +0000 (22:36 +0200)]
drm/vc4: Don set gem_obj->resv in prime import anymore

This is done in drm_prime.c now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-48-daniel.vetter@ffwll.ch
5 years agodrm/panfrost: don't set gem_obj->resv for prime import anymore
Daniel Vetter [Fri, 14 Jun 2019 20:36:02 +0000 (22:36 +0200)]
drm/panfrost: don't set gem_obj->resv for prime import anymore

This is now done in drm_prime.c

Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-47-daniel.vetter@ffwll.ch
5 years agodrm/mediatek: Use drm_atomic_helper_wait_for_fences
Daniel Vetter [Fri, 14 Jun 2019 20:36:00 +0000 (22:36 +0200)]
drm/mediatek: Use drm_atomic_helper_wait_for_fences

If we use the gem fb helper as the prepare_fb hook, plus the
drm_prime.c import helpers now automatically setting obj->resv, we can
use the shared helpers to wait for fences instead of rolling our own.
Note that this relies on mtk setting drm_fb->obj, which is already
done in mtk_drm_framebuffer_init().

Aside: Probably can use the default commit_tail with this again, but I
didn't check for that.

Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-45-daniel.vetter@ffwll.ch
5 years agodrm/lima: Drop resv argument from lima_bo_create_struct
Daniel Vetter [Fri, 14 Jun 2019 20:35:59 +0000 (22:35 +0200)]
drm/lima: Drop resv argument from lima_bo_create_struct

It was only used for prime import, which is now handled by
drm_prime.c.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Qiang Yu <yuq825@gmail.com>
Cc: lima@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-44-daniel.vetter@ffwll.ch
5 years agodt-bindings: display: Convert tpo,tpg110 panel to DT schema
Rob Herring [Mon, 24 Jun 2019 21:56:44 +0000 (15:56 -0600)]
dt-bindings: display: Convert tpo,tpg110 panel to DT schema

Convert the tpo,tpg110 panel binding to DT schema.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624215649.8939-11-robh@kernel.org
5 years agodrm/mcde: Fix uninitialized variable
Linus Walleij [Tue, 18 Jun 2019 11:52:45 +0000 (13:52 +0200)]
drm/mcde: Fix uninitialized variable

We need to handle the case when of_drm_find_bridge() returns
NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190618115245.13915-1-linus.walleij@linaro.org
5 years agodrm/sun4i: Eliminate pointless on stack copy of drm_display_info
Ville Syrjälä [Tue, 26 Mar 2019 17:38:10 +0000 (19:38 +0200)]
drm/sun4i: Eliminate pointless on stack copy of drm_display_info

Just use a pointer to the display_info rather than make a copy
on stack.

Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326173810.11979-1-ville.syrjala@linux.intel.com
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
5 years agodrm: WARN on illegal aspect ratio when converting a mode to umode
Ville Syrjälä [Thu, 20 Jun 2019 14:26:37 +0000 (17:26 +0300)]
drm: WARN on illegal aspect ratio when converting a mode to umode

WARN if the incoming drm_display_mode has an illegal aspect ratio
when converting it to a user mode. This should never happen unless
the driver made a mistake and put an invalid value into the aspect
ratio.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620142639.17518-4-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm: Do not accept garbage mode aspect ratio flags
Ville Syrjälä [Thu, 20 Jun 2019 14:26:36 +0000 (17:26 +0300)]
drm: Do not accept garbage mode aspect ratio flags

Don't let userspace feed us any old garbage in the mode aspect ratio
flags.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620142639.17518-3-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm: Do not use bitwise OR to set picure_aspect_ratio
Ville Syrjälä [Thu, 20 Jun 2019 14:26:35 +0000 (17:26 +0300)]
drm: Do not use bitwise OR to set picure_aspect_ratio

enum hdmi_picture_aspect is not a bitmask, so don't use bitwise OR
to populate it.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620142639.17518-2-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/connector: Fix warning in debug message
Maxime Ripard [Mon, 24 Jun 2019 08:40:16 +0000 (10:40 +0200)]
drm/connector: Fix warning in debug message

The commit 3aeeb13d8996 ("drm/modes: Support modes names on the command
line") added name support to the DRM modes, and added that name to the
debug message.

However, that code tests for whether or not the name variable is NULL and
only prints it if it's not. Except that that variable is an array, so it
will never be NULL.

The original intent was to print it only when the name has been specified.
Just printing the array directly will achieve the same thing since the
drm_cmdline_mode structure that holds it is itself contained in
drm_connector, that is allocated with its whole content zero'd.

That means that if the name is not declared, the array will be all zeros,
which will not print anything.

Cc: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624084016.12937-1-maxime.ripard@bootlin.com
5 years agodrm/bridge/synopsys: dsi: Allow VPG to be enabled via debugfs
Matt Redfearn [Tue, 30 Apr 2019 08:17:04 +0000 (08:17 +0000)]
drm/bridge/synopsys: dsi: Allow VPG to be enabled via debugfs

The Synopsys MIPI DSI IP contains a video test pattern generator which
is helpful in debugging video timing with connected displays.
Add a debugfs directory containing files which allow the VPG to be
enabled and disabled, and its orientation to be changed.

Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com>
Tested-by: Yannick Fertré <yannick.fertre@st.com>
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190430081646.23845-1-matt.redfearn@thinci.com
5 years agodrm/lima: Reduce the amount of logs on deferred probe of clocks and reset controller
Krzysztof Kozlowski [Fri, 21 Jun 2019 16:21:17 +0000 (18:21 +0200)]
drm/lima: Reduce the amount of logs on deferred probe of clocks and reset controller

There is no point to print deferred probe messages as errors.  Adjust
the printks for error paths of obtaining clocks and reset controller.
This removes the error message of lima_clk_init() call in favor or
specific failure messages inside.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621162117.22533-4-krzk@kernel.org
5 years agodrm/lima: Reduce number of PTR_ERR() calls
Krzysztof Kozlowski [Fri, 21 Jun 2019 16:21:16 +0000 (18:21 +0200)]
drm/lima: Reduce number of PTR_ERR() calls

Store the PTR_ERR() result in local variable in clock init error path.
This makes the code consistent with similar section in regulator init
code.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621162117.22533-3-krzk@kernel.org
5 years agodrm/lima: Reduce the amount of logs on deferred probe
Krzysztof Kozlowski [Fri, 21 Jun 2019 16:21:15 +0000 (18:21 +0200)]
drm/lima: Reduce the amount of logs on deferred probe

There is no point to print deferred probe (and its failures to get
resources) as an error.  For example getting a regulator causes three
unneeded error messages:

    lima 13000000.gpu: failed to get regulator: -517
    lima 13000000.gpu: regulator init fail -517
    lima 13000000.gpu: Fatal error during GPU init

Also do not print clock rates before the initialization finishes
because they will be duplicated after deferral.  Each probe step already
prints error so remove the final error message "Fatal error during GPU
init".

In case of multiple probe tries this would pollute the dmesg.

Fixes: a1d2a6339961 ("drm/lima: driver for ARM Mali4xx GPUs")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621162117.22533-2-krzk@kernel.org
5 years agodrm/lima: Mark 64-bit number as ULL
Krzysztof Kozlowski [Fri, 21 Jun 2019 16:21:14 +0000 (18:21 +0200)]
drm/lima: Mark 64-bit number as ULL

Mark long numbers with ULL to silence the Smatch warning:

    drivers/gpu/drm/lima/lima_device.c:314:32: warning: constant 0x100000000 is so big it is long long

Fixes: a1d2a6339961 ("drm/lima: driver for ARM Mali4xx GPUs")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621162117.22533-1-krzk@kernel.org
5 years agodrm/vgem: Ditch attach trickery in the fence ioctl
Daniel Vetter [Fri, 14 Jun 2019 20:36:04 +0000 (22:36 +0200)]
drm/vgem: Ditch attach trickery in the fence ioctl

It looks like this was done purely to get a consistent place to look
up the reservation object pointer. With the drm_prime.c helper code
now also setting gem_object->resv for imported objects we can just use
that pointer directly, instead of first ensuring a dma-buf exists.

v2: Note that I screwed up the patch ordering, hence why this needed
a Fixes: tag - CI spotted the broken intermediate state.

Fixes: 5eab998741c8 ("drm/vgem: Drop drm_gem_prime_export")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-49-daniel.vetter@ffwll.ch
5 years agodrm/prime: automatically set gem_obj->resv on import
Daniel Vetter [Fri, 14 Jun 2019 20:35:57 +0000 (22:35 +0200)]
drm/prime: automatically set gem_obj->resv on import

It's really the only reasonable thing to do, and it won't hurt drivers
which don't (yet) use drm_gem_object->resv.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
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: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-42-daniel.vetter@ffwll.ch
5 years agodrm/vram-helper: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:56 +0000 (22:35 +0200)]
drm/vram-helper: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.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>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-41-daniel.vetter@ffwll.ch
5 years agodrm/zte: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:55 +0000 (22:35 +0200)]
drm/zte: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-40-daniel.vetter@ffwll.ch
5 years agodrm/xen: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:54 +0000 (22:35 +0200)]
drm/xen: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: xen-devel@lists.xenproject.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-39-daniel.vetter@ffwll.ch
5 years agodrm/virtio: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:53 +0000 (22:35 +0200)]
drm/virtio: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-38-daniel.vetter@ffwll.ch
5 years agodrm/vgem: Drop drm_gem_prime_export
Daniel Vetter [Fri, 14 Jun 2019 20:35:52 +0000 (22:35 +0200)]
drm/vgem: Drop drm_gem_prime_export

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-37-daniel.vetter@ffwll.ch
5 years agodrm/radeon: Drop drm_gem_prime_import
Daniel Vetter [Fri, 14 Jun 2019 20:35:51 +0000 (22:35 +0200)]
drm/radeon: Drop drm_gem_prime_import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-36-daniel.vetter@ffwll.ch
5 years agodrm/vc3: Drop drm_gem_prime_import
Daniel Vetter [Fri, 14 Jun 2019 20:35:50 +0000 (22:35 +0200)]
drm/vc3: Drop drm_gem_prime_import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-35-daniel.vetter@ffwll.ch
5 years agodrm/vboxvideo: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:49 +0000 (22:35 +0200)]
drm/vboxvideo: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-34-daniel.vetter@ffwll.ch
5 years agodrm/tve2000: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:48 +0000 (22:35 +0200)]
drm/tve2000: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-33-daniel.vetter@ffwll.ch
5 years agodrm/tilcdc: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:47 +0000 (22:35 +0200)]
drm/tilcdc: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-32-daniel.vetter@ffwll.ch
5 years agodrm/stm: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:46 +0000 (22:35 +0200)]
drm/stm: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Acked-by: Philippe Cornu <philippe.cornu@st.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Yannick Fertre <yannick.fertre@st.com>
Cc: Philippe Cornu <philippe.cornu@st.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-31-daniel.vetter@ffwll.ch
5 years agodrm/sti: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:45 +0000 (22:35 +0200)]
drm/sti: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-30-daniel.vetter@ffwll.ch
5 years agodrm/shmob: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:44 +0000 (22:35 +0200)]
drm/shmob: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-29-daniel.vetter@ffwll.ch
5 years agodrm/rockchip: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:43 +0000 (22:35 +0200)]
drm/rockchip: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-28-daniel.vetter@ffwll.ch
5 years agodrm/rcar-du: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:42 +0000 (22:35 +0200)]
drm/rcar-du: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-27-daniel.vetter@ffwll.ch
5 years agodrm/qxl: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:41 +0000 (22:35 +0200)]
drm/qxl: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: spice-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-26-daniel.vetter@ffwll.ch
5 years agodrm/pl111: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:40 +0000 (22:35 +0200)]
drm/pl111: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-25-daniel.vetter@ffwll.ch
5 years agodrm/nouveau: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:39 +0000 (22:35 +0200)]
drm/nouveau: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-24-daniel.vetter@ffwll.ch
5 years agodrm/mxsfb: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:38 +0000 (22:35 +0200)]
drm/mxsfb: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-23-daniel.vetter@ffwll.ch
5 years agodrm/msm: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:37 +0000 (22:35 +0200)]
drm/msm: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-22-daniel.vetter@ffwll.ch
5 years agodrm/meson: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:36 +0000 (22:35 +0200)]
drm/meson: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-21-daniel.vetter@ffwll.ch
5 years agodrm/mtk: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:35 +0000 (22:35 +0200)]
drm/mtk: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-20-daniel.vetter@ffwll.ch
5 years agodrm/mcde: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:34 +0000 (22:35 +0200)]
drm/mcde: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-19-daniel.vetter@ffwll.ch
5 years agodrm/imx: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:33 +0000 (22:35 +0200)]
drm/imx: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-18-daniel.vetter@ffwll.ch
5 years agodrm/hisilicon: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:32 +0000 (22:35 +0200)]
drm/hisilicon: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-17-daniel.vetter@ffwll.ch
5 years agodrm/fsl-dcu: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:31 +0000 (22:35 +0200)]
drm/fsl-dcu: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Alison Wang <alison.wang@nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-16-daniel.vetter@ffwll.ch
5 years agodrm/exynos: Drop drm_gem_prime_export
Daniel Vetter [Fri, 14 Jun 2019 20:35:30 +0000 (22:35 +0200)]
drm/exynos: Drop drm_gem_prime_export

They're the default. We can't do the same on the import side, due to
the exynos_drm->dma_dev not necessarily matching the overall drm
device.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-15-daniel.vetter@ffwll.ch
5 years agodrm/etnaviv: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:29 +0000 (22:35 +0200)]
drm/etnaviv: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: etnaviv@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-14-daniel.vetter@ffwll.ch
5 years agodrm/atmel: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:28 +0000 (22:35 +0200)]
drm/atmel: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-13-daniel.vetter@ffwll.ch
5 years agodrm/arm: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:27 +0000 (22:35 +0200)]
drm/arm: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-12-daniel.vetter@ffwll.ch
5 years agodrm/arc: Drop drm_gem_prime_export/import
Daniel Vetter [Fri, 14 Jun 2019 20:35:26 +0000 (22:35 +0200)]
drm/arc: Drop drm_gem_prime_export/import

They're the default.

Aside: Would be really nice to switch the others over to
drm_gem_object_funcs.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-11-daniel.vetter@ffwll.ch
5 years agodrm/ioctl: Ditch DRM_UNLOCKED except for the legacy vblank ioctl
Daniel Vetter [Wed, 5 Jun 2019 12:08:35 +0000 (14:08 +0200)]
drm/ioctl: Ditch DRM_UNLOCKED except for the legacy vblank ioctl

This completes Emil's series of removing DRM_UNLOCKED from modern
drivers. It's entirely cargo-culted since we ignore it on
non-DRIVER_LEGACY drivers since:

commit ea487835e8876abf7ad909636e308c801a2bcda6
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Sep 28 21:42:40 2015 +0200

    drm: Enforce unlocked ioctl operation for kms driver ioctls

Now justifying why we can do this for legacy drives too (and hence
close the source of all the bogus copypasting) is a bit more involved.
DRM_UNLOCKED was introduced in:

commit ed8b67040965e4fe695db333d5914e18ea5f146f
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Dec 16 22:17:09 2009 +0000

    drm: convert drm_ioctl to unlocked_ioctl

As a immediate hack to keep i810 happy, which would have deadlocked
without this trickery. The old BKL is automatically dropped in
schedule(), and hence the i810 vs. mmap_sem deadlock didn't actually
cause a real deadlock. But with a mutex it would. The solution was to
annotate these as DRM_UNLOCKED and mark i810 unsafe on SMP machines.

This conversion caused a regression, because unlike the BKL a mutex
isn't dropped over schedule (that thing again), which caused a vblank
wait in one thread to block the entire desktop and all its apps. Back
then we did vblank scheduling by blocking in the client, awesome isn't
it. This was fixed quickly in (ok not so quickly, took 2 years):

commit 8f4ff2b06afcd6f151868474a432c603057eaf56
Author: Ilija Hadzic <ihadzic@research.bell-labs.com>
Date:   Mon Oct 31 17:46:18 2011 -0400

    drm: do not sleep on vblank while holding a mutex

All the other DRM_UNLOCKED annotations for all the core ioctls was
work to reach finer-grained locking for modern drivers. This took
years, and culminated in:

commit fdd5b877e9ebc2029e1373b4a3cd057329a9ab7a
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Dec 10 22:52:54 2016 +0100

    drm: Enforce BKL-less ioctls for modern drivers

DRM_UNLOCKED was never required by any legacy drivers, except for the
vblank_wait IOCTL. Therefore we will not regress these old drivers by
going back to where we've been in 2011. For all modern drivers nothing
will change.

To make this perfectly clear, also add a comment to DRM_UNLOCKED.

v2: Don't forget about drm_ioc32.c (Michel).

Cc: Michel Dänzer <michel@daenzer.net>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605120835.2798-1-daniel.vetter@ffwll.ch
5 years agodrm/prime: Align gem_prime_export with obj_funcs.export
Daniel Vetter [Fri, 14 Jun 2019 20:35:25 +0000 (22:35 +0200)]
drm/prime: Align gem_prime_export with obj_funcs.export

The idea is that gem_prime_export is deprecated in favor of
obj_funcs.export. That's much easier to do if both have matching
function signatures.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Russell King <linux@armlinux.org.uk>
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: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.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: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Feifei Xu <Feifei.Xu@amd.com>
Cc: Jim Qu <Jim.Qu@amd.com>
Cc: Evan Quan <evan.quan@amd.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Thomas Zimmermann <tdz@users.sourceforge.net>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Jilayne Lovejoy <opensource@jilayne.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-10-daniel.vetter@ffwll.ch
5 years agodrm/omapdrm: drop fb_debug_enter/leave
Daniel Vetter [Fri, 14 Jun 2019 20:35:24 +0000 (22:35 +0200)]
drm/omapdrm: drop fb_debug_enter/leave

This is a no-op on atomic drivers because with atomic it's simply too
complicated to get all the locking and workers and nonblocking
synchronization correct, from essentially an NMI context. Well, too
complicated = impossible. Also, omapdrm never implemented the
mode_set_base_atomic hook, so I kinda wonder why this was ever added.

Drop the hooks.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-9-daniel.vetter@ffwll.ch
5 years agodrm/arm/komeda: Remove DRIVER_HAVE_IRQ
Daniel Vetter [Fri, 14 Jun 2019 20:35:23 +0000 (22:35 +0200)]
drm/arm/komeda: Remove DRIVER_HAVE_IRQ

Read the docs, komeda is not an old enough driver for this :-)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-8-daniel.vetter@ffwll.ch
5 years agodrm/prime: Actually remove DRIVER_PRIME everywhere
Daniel Vetter [Mon, 17 Jun 2019 15:39:24 +0000 (17:39 +0200)]
drm/prime: Actually remove DRIVER_PRIME everywhere

Split out to make the functional changes stick out more.

All places where DRIVER_PRIME was used have been removed in previous
patches already.

v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE.

v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE.

v4: Don't add a space in i915_drv.c (Sam)

v5: Add note that previous patches removed all the DRIVER_PRIME users
already (Emil).

v6: Fixupe ingenic (new driver) while applying.

Cc: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: etnaviv@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: lima@lists.freedesktop.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-aspeed@lists.ozlabs.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: nouveau@lists.freedesktop.org
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: spice-devel@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: xen-devel@lists.xenproject.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190617153924.414-1-daniel.vetter@ffwll.ch
5 years agodrm/prime: Make DRIVER_PRIME a no-op
Daniel Vetter [Fri, 14 Jun 2019 20:35:21 +0000 (22:35 +0200)]
drm/prime: Make DRIVER_PRIME a no-op

Drivers must fill out the handle_to_fd and fd_to_handle hooks to
enable export/import prime functionality already. The additional
DRIVER_PRIME flag doesn't serve any real purpose, since the overall
flag doesn't even tell you whether import or export or maybe even both
is supported.

Ditch it.

This patch just makes it defunct, subsequent patches will remove it
from all the drivers.

Note this changes the userspace visible errno in some situations from
EOPNOTSUPP to ENOSYS. Userspace already needs to treat both as "no
prime support", so this should break anything.

v2: Improve commit message as suggested by Emil

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-6-daniel.vetter@ffwll.ch
5 years agodrm/prime: Unconditionally set up the prime file private
Daniel Vetter [Fri, 14 Jun 2019 20:35:20 +0000 (22:35 +0200)]
drm/prime: Unconditionally set up the prime file private

It's tiny, already embedded, and setup/teardown cost is trivial.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-5-daniel.vetter@ffwll.ch
5 years agodrm/prime: Update docs
Daniel Vetter [Thu, 20 Jun 2019 12:46:15 +0000 (14:46 +0200)]
drm/prime: Update docs

Yes this is a bit a big patch, but since it's essentially a complete
rewrite of all the prime docs I didn't see how to better split it up.

Changes:
- Consistently point to drm_gem_object_funcs as the preferred hooks,
  where applicable.

- Document all the hooks in &drm_driver that lacked kerneldoc.

- Completely new overview section, which now also includes the cleaned
  up lifetime/reference counting subchapter. I also mentioned the weak
  references in there due to the lookup caches.

- Completely rewritten helper intro section, highlight the
  import/export related functionality.

- Polish for all the functions and more cross references.

I also sprinkled a bunch of todos all over.

Most important: 0 code changes in here. The cleanup motivated by
reading and improving all this will follow later on.

v2: Actually update the prime helper docs. Plus add a few FIXMEs that
I won't address right away in subsequent cleanup patches.

v3:
- Split out the function moving. This patch is now exclusively
  documentation changes.
- Typos and nits (Sam).

v4: Polish suggestions from Noralf.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620124615.24434-1-daniel.vetter@ffwll.ch
5 years agodrm/prime: Shuffle functions.
Daniel Vetter [Tue, 18 Jun 2019 09:20:37 +0000 (11:20 +0200)]
drm/prime: Shuffle functions.

Reorder all the functions in drm_prime.[hc] into three groups: core,
export helpers, import helpers.

Not other changes beyond moving the functions and their unchanged
kerneldoc around in here.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190618092038.17929-1-daniel.vetter@ffwll.ch
5 years agodrm/sti: Remove duplicated include from sti_drv.c
YueHaibing [Thu, 20 Jun 2019 15:03:06 +0000 (15:03 +0000)]
drm/sti: Remove duplicated include from sti_drv.c

Remove duplicated include.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620150306.124839-1-yuehaibing@huawei.com
5 years agodrm/todo: Update drm_gem_object_funcs todo even more
Daniel Vetter [Tue, 18 Jun 2019 14:02:41 +0000 (16:02 +0200)]
drm/todo: Update drm_gem_object_funcs todo even more

I rushed merging this a bit too much, and Noralf pointed out that
we're a lot better already and have made great progress.

Let's try again.

v2: Fix typo spotted by Eric Engestrom.

Fixes: 8db420ac6cf2 ("drm/todo: Improve drm_gem_object funcs todo")
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190618140241.19856-1-daniel.vetter@ffwll.ch
5 years agodrm/stm: drv: fix suspend/resume
Yannick Fertré [Mon, 17 Jun 2019 07:18:17 +0000 (09:18 +0200)]
drm/stm: drv: fix suspend/resume

Without this fix, the system can not go in "suspend" mode
due to an error in drv_suspend function.

Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management")

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1560755897-5002-1-git-send-email-yannick.fertre@st.com
5 years agodrm/self_refresh: Fix possible NULL deref in failure path
Sean Paul [Wed, 19 Jun 2019 18:19:47 +0000 (14:19 -0400)]
drm/self_refresh: Fix possible NULL deref in failure path

If state allocation fails, we still try to give back the reference on
it. Also initialize ret in case the crtc is not enabled and we hit the
eject button.

Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers")
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jose Souza <jose.souza@intel.com>
Cc: Zain Wang <wzz@rock-chips.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sean Paul <seanpaul@chromium.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: dri-devel@lists.freedesktop.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619181951.192305-1-sean@poorly.run
5 years agodrm: self_refresh: Fix a reversed condition in drm_self_refresh_helper_cleanup()
Dan Carpenter [Wed, 19 Jun 2019 10:01:41 +0000 (13:01 +0300)]
drm: self_refresh: Fix a reversed condition in drm_self_refresh_helper_cleanup()

This test is flipped around so it either leads to a memory leak or a
NULL dereference.

Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619100141.GA28596@mwanda
5 years agoDRM: Add KMS driver for the Ingenic JZ47xx SoCs
Paul Cercueil [Mon, 3 Jun 2019 15:23:31 +0000 (17:23 +0200)]
DRM: Add KMS driver for the Ingenic JZ47xx SoCs

Add a KMS driver for the Ingenic JZ47xx family of SoCs.
This driver is meant to replace the aging jz4740-fb driver.

This driver does not make use of the simple pipe helper, for the reason
that it will soon be updated to support more advanced features like
multiple planes, IPU integration for colorspace conversion and up/down
scaling, support for DSI displays, and TV-out and HDMI outputs.

Notes:
    v2: - Remove custom handling of panel. The panel is now discovered using
          the standard API.
        - Lots of small tweaks suggested by upstream

    v3: - Use devm_drm_dev_init()
        - Update compatible strings to -lcd instead of -drm
        - Add destroy() callbacks to plane and crtc
        - The ingenic,lcd-mode is now read from the bridge's DT node

    v4: Remove ingenic,lcd-mode property completely. The various modes are now
        deduced from the connector type, the pixel format or the bus flags.

    v5: - Fix framebuffer size incorrectly calculated for 24bpp framebuffers
        - Use 32bpp framebuffer instead of 16bpp, as it'll work with both
          16-bit and 24-bit panel
        - Get rid of drm_format_plane_cpp() which has been dropped upstream
        - Avoid using drm_format_info->depth, which is deprecated.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-2-paul@crapouillou.net
5 years agodt-bindings: Add doc for the Ingenic JZ47xx LCD controller driver
Paul Cercueil [Mon, 3 Jun 2019 15:23:30 +0000 (17:23 +0200)]
dt-bindings: Add doc for the Ingenic JZ47xx LCD controller driver

Add documentation for the devicetree bindings of the LCD controller
present in the JZ47xx family of SoCs from Ingenic.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-1-paul@crapouillou.net
5 years agoMerge branch 'topic/remove-fbcon-notifiers' into drm-misc-next
Maarten Lankhorst [Wed, 19 Jun 2019 10:33:05 +0000 (12:33 +0200)]
Merge branch 'topic/remove-fbcon-notifiers' into drm-misc-next

topic/remove-fbcon-notifiers:
- remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon locking
- assorted locking checks in vt/console code
- assorted notifier and cleanups in fbdev and backlight code

This is the pull request that was sent out, plus the compile fix for
sh4 reported by kbuild.

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
5 years agoMerge remote-tracking branch 'drm/drm-next' into drm-misc-next
Maarten Lankhorst [Wed, 19 Jun 2019 10:32:13 +0000 (12:32 +0200)]
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next

remove-fbcon-notifiers topic branch is based on rc4, so we need a fresh
backmerge of drm-next to pull it in.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
5 years agodrm/vc4: hdmi: Set default state margin at reset
Maxime Ripard [Wed, 19 Jun 2019 10:17:53 +0000 (12:17 +0200)]
drm/vc4: hdmi: Set default state margin at reset

Now that the TV margins are properly parsed and filled into
drm_cmdline_mode, we just need to initialise the first state at reset to
get those values and start using them.

Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/44e24172e300be6a41578517021ef6a6e90ed682.1560783090.git-series.maxime.ripard@bootlin.com
5 years agodrm/selftests: Add command line parser selftests
Maxime Ripard [Wed, 19 Jun 2019 10:17:52 +0000 (12:17 +0200)]
drm/selftests: Add command line parser selftests

The command line parser is pretty tough to get right and very error prone,
so let's add a selftest to try to catch any regression.

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/735348d3a475ce0bcc88b46e093ab149023bb202.1560783090.git-series.maxime.ripard@bootlin.com