linux-2.6-microblaze.git
6 years agodrm/atomic: Move drm_crtc_commit to drm_crtc_state, v4.
Maarten Lankhorst [Mon, 4 Sep 2017 15:04:56 +0000 (17:04 +0200)]
drm/atomic: Move drm_crtc_commit to drm_crtc_state, v4.

Most code only cares about the current commit or previous commit.
Fortuantely we already have a place to track those. Move it to
drm_crtc_state where it belongs. :)

The per-crtc commit_list is kept for places where we have to look
deeper than the current or previous commit for checking whether to stall
on unpin. This is used in drm_atomic_helper_setup_commit and
intel_has_pending_fb_unpin.

Changes since v1:
- Update kerneldoc for drm_crtc.commit_list. (danvet)
Changes since v2:
- Remove drm_atomic_helper_async_check hunk. (pinchartl)
Changes since v3:
- Fix use-after-free in drm_atomic_helper_commit_cleanup_done().

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904150456.31049-1-maarten.lankhorst@linux.intel.com
[mlankhorst: preceeding -> preceding (checkpatch)]

6 years agodrm/atomic: Return commit in drm_crtc_commit_get for better annotation
Maarten Lankhorst [Mon, 4 Sep 2017 10:48:36 +0000 (12:48 +0200)]
drm/atomic: Return commit in drm_crtc_commit_get for better annotation

This will allow code to do x->commit = drm_crtc_commit_get(commit),
making it clearer where references are used.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-5-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/i915: Always wait for flip_done, v2.
Maarten Lankhorst [Mon, 4 Sep 2017 10:48:33 +0000 (12:48 +0200)]
drm/i915: Always wait for flip_done, v2.

The next commit removes the wait for flip_done in in
drm_atomic_helper_commit_cleanup_done, but we need it for the tests
to pass. Instead of using complicated vblank tracking which ends
up being ignored anyway, call the correct atomic helper. :)

Changes since v1:
- Always call drm_atomic_helper_wait_for_flip_done,
  even for legacy cursor updates. (danvet)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-2-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/stm: fix warning about multiplication in condition
Arnd Bergmann [Wed, 6 Sep 2017 13:13:07 +0000 (15:13 +0200)]
drm/stm: fix warning about multiplication in condition

gcc-7 complains about multiplying within a condition being
suspicious:

drivers/gpu/drm/stm/dw_mipi_dsi-stm.c: In function 'dsi_pll_get_clkout_khz':
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c:117:10: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]

The code here is correct, but can be easily rephrased to make
that more obvious. I also swap out the error handling and the normal
code path for clarity.

Fixes: b0f09a3c69d9 ("drm/stm: Add STM32 DSI controller driver")
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Tested-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170906131331.2691300-1-arnd@arndb.de
6 years agodrm/rockchip: Add support for Rockchip Soc LVDS
Sandy Huang [Sat, 2 Sep 2017 11:28:54 +0000 (19:28 +0800)]
drm/rockchip: Add support for Rockchip Soc LVDS

This adds support for Rockchip soc lvds found on rk3288
Based on the patches from Mark yao and Heiko Stuebner.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1504351737-136042-1-git-send-email-hjc@rock-chips.com
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodt-bindings: display: Add Document for Rockchip Soc LVDS
Sandy Huang [Sat, 2 Sep 2017 11:28:47 +0000 (19:28 +0800)]
dt-bindings: display: Add Document for Rockchip Soc LVDS

This patch add Document for Rockchip Soc RK3288 LVDS,
This based on the patches from Mark yao and Heiko Stuebner.

Signed-off-by: Mark yao <mark.yao@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1504351729-135932-1-git-send-email-hjc@rock-chips.com
6 years agodrm: gma500: fix logic error
Arnd Bergmann [Tue, 5 Sep 2017 07:47:26 +0000 (09:47 +0200)]
drm: gma500: fix logic error

gcc-8 points out a condition that almost certainly doesn't
do what the author had in mind:

drivers/gpu/drm/gma500/mdfld_intel_display.c: In function 'mdfldWaitForPipeEnable':
drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]

This changes it to a simple bit mask operation to check
whether the bit is set.

Fixes: 026abc333205 ("gma500: initial medfield merge")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905074741.435324-1-arnd@arndb.de
6 years agodrm/vc4: Use correct path to trace include
Thierry Reding [Fri, 1 Sep 2017 14:49:54 +0000 (16:49 +0200)]
drm/vc4: Use correct path to trace include

The header comment in include/trace/define_trace.h specifies that the
TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header
rather than the trace file including it. Most instances get that wrong
and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the
trace file in the first place and avoid any workaround.

Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-6-thierry.reding@gmail.com
6 years agodrm/armada: Use correct path to trace include
Thierry Reding [Fri, 1 Sep 2017 14:49:51 +0000 (16:49 +0200)]
drm/armada: Use correct path to trace include

The header comment in include/trace/define_trace.h specifies that the
TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header
rather than the trace file including it. Most instances get that wrong
and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the
trace file in the first place and avoid any workaround.

Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-3-thierry.reding@gmail.com
6 years agodrm: Use correct path to trace include
Thierry Reding [Fri, 1 Sep 2017 14:49:49 +0000 (16:49 +0200)]
drm: Use correct path to trace include

The header comment in include/trace/define_trace.h specifies that the
TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header
rather than the trace file including it. Most instances get that wrong
and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the
trace file in the first place and avoid any workaround.

Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-1-thierry.reding@gmail.com
6 years agodrm/bridge/synopsys: dsi: explicitly request exclusive reset control
Philippe CORNU [Tue, 1 Aug 2017 13:23:08 +0000 (15:23 +0200)]
drm/bridge/synopsys: dsi: explicitly request exclusive reset control

Based on patch "Convert drivers to explicit reset API" from Philipp Zabel

Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-4-git-send-email-philippe.cornu@st.com
6 years agodrm/bridge/synopsys: dsi: Register list clean up
Philippe CORNU [Tue, 1 Aug 2017 13:23:07 +0000 (15:23 +0200)]
drm/bridge/synopsys: dsi: Register list clean up

This patch cleans up the Synopsys mipi dsi register list:
- rename registers according to the Synopsys documentation
  (1.30 & 1.31)
- fix typos
- re-order registers for a better coherency

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-3-git-send-email-philippe.cornu@st.com
6 years agodrm: Fix example comment of format modifier blob
Gabriel Krisman Bertazi [Thu, 31 Aug 2017 19:52:14 +0000 (16:52 -0300)]
drm: Fix example comment of format modifier blob

To represent formats 98-102, the supported formats mask must be
0x7c00000000 and not 0x3c00000000.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170831195215.13302-1-krisman@collabora.co.uk
6 years agodrm/tve200: Replace custom connector with panel bridge
Linus Walleij [Sat, 2 Sep 2017 20:07:11 +0000 (22:07 +0200)]
drm/tve200: Replace custom connector with panel bridge

This replaces the custom connector in the TVE200 with the
panel bridge helper. As long as we're just using panels
and no other bridges, this works just fine.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170902200711.29298-1-linus.walleij@linaro.org
6 years agodrm/fb-helper: Avoid NULL ptr dereference in fb_set_suspend()
Noralf Trønnes [Mon, 28 Aug 2017 17:17:43 +0000 (19:17 +0200)]
drm/fb-helper: Avoid NULL ptr dereference in fb_set_suspend()

drm_fb_helper_resume_worker() uses fb_helper->fbdev to call
fb_set_suspend() which dereferences the pointer.
Move sync-canceling of the resume worker in drm_fb_helper_fini() before
setting fb_helper->fbdev to NULL. Move dirty_work as well.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1503940668-25883-2-git-send-email-noralf@tronnes.org
6 years agodrm/stm: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:32:00 +0000 (15:32 +0200)]
drm/stm: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

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>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Tested-by: Philippe Cornu <philippe.cornu@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-18-git-send-email-noralf@tronnes.org
6 years agodrm/arc: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:47 +0000 (15:31 +0200)]
drm/arc: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-5-git-send-email-noralf@tronnes.org
6 years agodrm/armada: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Thu, 17 Aug 2017 16:21:31 +0000 (18:21 +0200)]
drm/armada: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502986891-36764-3-git-send-email-noralf@tronnes.org
6 years agodrm/gem: drm_gem_dumb_map_offset(): reject dma-buf
Noralf Trønnes [Thu, 17 Aug 2017 16:21:30 +0000 (18:21 +0200)]
drm/gem: drm_gem_dumb_map_offset(): reject dma-buf

Reject mapping an imported dma-buf since is's an invalid use-case.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502986891-36764-2-git-send-email-noralf@tronnes.org
6 years agodrm/scdc-helper: Use consistent spelling for TMDS
Thierry Reding [Fri, 1 Sep 2017 14:44:30 +0000 (16:44 +0200)]
drm/scdc-helper: Use consistent spelling for TMDS

The file uses inconsistent capitalization for TMDS. Since it is an
abbreviation, all uppercase is correct.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-3-thierry.reding@gmail.com
6 years agodrm/scdc-helper: Use consistent error reporting
Thierry Reding [Fri, 1 Sep 2017 14:44:29 +0000 (16:44 +0200)]
drm/scdc-helper: Use consistent error reporting

The error messages generated by the SCDC helpers are somewhat
inconsistent with other DRM errors and even with other errors in the
same file. Fix them all up to use a common format.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-2-thierry.reding@gmail.com
6 years agodrm/scdc-helper: Remove gratuitous blank lines
Thierry Reding [Fri, 1 Sep 2017 14:44:28 +0000 (16:44 +0200)]
drm/scdc-helper: Remove gratuitous blank lines

It's unusual to separate kerneldoc comments from the functions that they
describe by a blank line. Remove them.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-1-thierry.reding@gmail.com
6 years agodrm/atomic: Fix typo in kerneldoc
Thierry Reding [Fri, 1 Sep 2017 14:40:42 +0000 (16:40 +0200)]
drm/atomic: Fix typo in kerneldoc

The for_each_crtc_in_state() is used to iterate over CRTCs rather than
connectors.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144042.6023-2-thierry.reding@gmail.com
6 years agodrm/vtables: Fix typo
Thierry Reding [Fri, 1 Sep 2017 14:40:41 +0000 (16:40 +0200)]
drm/vtables: Fix typo

The callback is named .atomic_check, not .atomc_check.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901144042.6023-1-thierry.reding@gmail.com
6 years agodrm/gma500: Remove null check before kfree
Himanshu Jha [Wed, 30 Aug 2017 13:25:56 +0000 (18:55 +0530)]
drm/gma500: Remove null check before kfree

kfree on NULL pointer is a no-op and therefore checking is redundant.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1504099556-3887-1-git-send-email-himanshujha199640@gmail.com
6 years agodrm/tve200: Pass NULL format_modifier to drm_simple_display_pipe_init
Rodrigo Vivi [Fri, 25 Aug 2017 20:16:12 +0000 (13:16 -0700)]
drm/tve200: Pass NULL format_modifier to drm_simple_display_pipe_init

This Fixes build on branches where we already have format-modifier.

Reference: https://lists.freedesktop.org/archives/dri-devel/2017-August/151044.html
Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200")
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Janet Morgan <janet.morgan@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Daniel Stone <daniels@collabora.com> (v2)
Cc: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: Daniel Stone <daniels@collabora.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170825201612.23056-1-rodrigo.vivi@intel.com
6 years agodrm/zte: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:32:04 +0000 (15:32 +0200)]
drm/zte: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-22-git-send-email-noralf@tronnes.org
6 years agodrm/sti: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:59 +0000 (15:31 +0200)]
drm/sti: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-17-git-send-email-noralf@tronnes.org
6 years agodrm/atmel-hlcdc: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:50 +0000 (15:31 +0200)]
drm/atmel-hlcdc: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-8-git-send-email-noralf@tronnes.org
6 years agodrm/arm/mali: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:49 +0000 (15:31 +0200)]
drm/arm/mali: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-7-git-send-email-noralf@tronnes.org
6 years agodrm/arm/hdlcd: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:48 +0000 (15:31 +0200)]
drm/arm/hdlcd: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-6-git-send-email-noralf@tronnes.org
6 years agodrm/tve200: Add new driver for TVE200
Linus Walleij [Sun, 20 Aug 2017 10:05:55 +0000 (12:05 +0200)]
drm/tve200: Add new driver for TVE200

This adds a new DRM driver for the Faraday Technology TVE200
block. This "TV Encoder" encodes a ITU-T BT.656 stream and can
be found in the StorLink SL3516 (later Cortina Systems CS3516)
as well as the Grain Media GM8180.

I do not have definitive word from anyone at Faraday that this
IP block is theirs, but it bears the hallmark of their 3-digit
version code (200) and is used in two SoCs from completely
different companies. (Grain Media was fully owned by Faraday
until it was transferred to NovoTek this january, and
Faraday did lots of work on the StorLink SoCs.)

The D-Link DIR-685 uses this in connection with the Ilitek
ILI9322 panel driver that supports BT.656 input, while the
GM8180 apparently has been used with the Cirrus Logic CS4954
digital video encoder. The oldest user seems to be
something called Techwall 2835.

This driver is heavily inspired by Eric Anholt's PL111
driver and therefore I have mentioned all the ancestor authors
in the header file.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-2-linus.walleij@linaro.org
6 years agodrm/tve200: Add DT bindings
Linus Walleij [Sun, 20 Aug 2017 10:05:54 +0000 (12:05 +0200)]
drm/tve200: Add DT bindings

This adds device tree bindings for the Faraday TVE200 IP block.
This IP block is present in the Gemini ARM SoC and also in some
Grain Media GMxxxx SoCs.

Cc: devicetree@vger.kernel.org
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-1-linus.walleij@linaro.org
6 years agodrm/doc: Document ioctl errno value patterns
Daniel Vetter [Fri, 18 Aug 2017 17:43:28 +0000 (19:43 +0200)]
drm/doc: Document ioctl errno value patterns

We're not super-consistent about these, but I think it's worth to
document at least the commmon patterns.

v2:
- Add a not about ENOTTY (it's just a confusing name, but used
exactly what it's meant for in DRM) (Chris).
- Unconfuse the text for ENODEV (Daniel)
- Move text undert the IOCTL heading (Chris).
- typos

Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Zhang, Tina" <tina.zhang@intel.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/20170818174328.6386-1-daniel.vetter@ffwll.ch
6 years agodrm/dp: Add defines for DP SDP types
Ville Syrjälä [Fri, 18 Aug 2017 13:49:51 +0000 (16:49 +0300)]
drm/dp: Add defines for DP SDP types

Add defines for the secondary data packet (SDP) types from the spec.
These are the DP specific ones, and in addition HDMI infoframe types
(see enum hdmi_infoframe_type) are also valid SDP types.

v2: Add more SDP types
v3: Note the DP version that added each SDP type (Rodrigo)

Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-2-ville.syrjala@linux.intel.com
6 years agodrm: Release driver tracking before making the object available again
Chris Wilson [Sat, 19 Aug 2017 12:05:58 +0000 (13:05 +0100)]
drm: Release driver tracking before making the object available again

This is the same bug as we fixed in commit f6cd7daecff5 ("drm: Release
driver references to handle before making it available again"), but now
the exposure is via the PRIME lookup tables. If we remove the
object/handle from the PRIME lut, then a new request for the same
object/fd will generate a new handle, thus for a short window that
object is known to userspace by two different handles. Fix this by
releasing the driver tracking before PRIME.

Fixes: 0ff926c7d4f0 ("drm/prime: add exported buffers to current fprivs
imported buffer list (v2)")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170819120558.6465-1-chris@chris-wilson.co.uk
6 years agodrm: i2c: tda998x: constify i2c_device_id
Arvind Yadav [Sat, 19 Aug 2017 18:28:20 +0000 (23:58 +0530)]
drm: i2c: tda998x: constify i2c_device_id

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-4-git-send-email-arvind.yadav.cs@gmail.com
Link: https://patchwork.freedesktop.org/patch/msgid/60db0ba6ddce08444299533e97c9adec3b3ef1bb.1503311145.git.arvind.yadav.cs@gmail.com
6 years agodrm: i2c: sil164: constify i2c_device_id
Arvind Yadav [Sat, 19 Aug 2017 18:28:19 +0000 (23:58 +0530)]
drm: i2c: sil164: constify i2c_device_id

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-3-git-send-email-arvind.yadav.cs@gmail.com
6 years agodrm: i2c: ch7006: constify i2c_device_id
Arvind Yadav [Sat, 19 Aug 2017 18:28:18 +0000 (23:58 +0530)]
drm: i2c: ch7006: constify i2c_device_id

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-2-git-send-email-arvind.yadav.cs@gmail.com
6 years agodrm/bridge: change return type of drm_bridge_add function
Inki Dae [Mon, 3 Jul 2017 08:42:17 +0000 (17:42 +0900)]
drm/bridge: change return type of drm_bridge_add function

This patch changes return type of drm_bridge_add function.

This function never return negative value but returns only 0.
So it changes the return type of this function to void one.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-2-git-send-email-inki.dae@samsung.com
6 years agodrm/exynos: mic: clean up drm_bridge_add call
Inki Dae [Mon, 3 Jul 2017 08:42:28 +0000 (17:42 +0900)]
drm/exynos: mic: clean up drm_bridge_add call

This patch removes unnecessary checking of return value.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-13-git-send-email-inki.dae@samsung.com
6 years agodrm/sti: sti_vdo: clean up drm_bridge_add call
Inki Dae [Mon, 3 Jul 2017 08:42:30 +0000 (17:42 +0900)]
drm/sti: sti_vdo: clean up drm_bridge_add call

This patch removes unnecessary checking of return value.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-15-git-send-email-inki.dae@samsung.com
6 years agodrm/mediatek: hdmi: clean up drm_bridge_add call
Inki Dae [Mon, 3 Jul 2017 08:42:29 +0000 (17:42 +0900)]
drm/mediatek: hdmi: clean up drm_bridge_add call

This patch removes unnecessary checking of return value.

Acked-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-14-git-send-email-inki.dae@samsung.com
6 years agodma-buf/sync_file: document flags field
Gustavo Padovan [Mon, 31 Jul 2017 19:36:55 +0000 (16:36 -0300)]
dma-buf/sync_file: document flags field

Documentation for it was missing.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170731193655.6176-1-gustavo@padovan.org
6 years agodrm/panel: Add driver for Seiko 43WVF1G panel
Marco Franchi [Thu, 20 Jul 2017 16:12:59 +0000 (13:12 -0300)]
drm/panel: Add driver for Seiko 43WVF1G panel

Add driver for Seiko Instruments Inc. 4.3" WVGA (800 x RGB x 480)
TFT with Touch-Panel.

Datasheet available at:
http://www.glyn.de/data/glyn/media/doc/43wvf1g-0.pdf

Seiko 43WVF1G panel has two power supplies: avdd and dvdd and they
require a specific power on/down sequence.
For this reason the simple panel driver cannot be used to drive this
panel, so create a new one heavily based on simple panel.

Based on initial patch submission from Breno Lima.

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500567179-6967-1-git-send-email-marco.franchi@nxp.com
6 years agoMAINTAINERS: drm/panel is now maintained in drm-misc
Thierry Reding [Mon, 14 Aug 2017 14:00:11 +0000 (16:00 +0200)]
MAINTAINERS: drm/panel is now maintained in drm-misc

drm/panel is a good candidate for the drm-misc group maintainership and
it's been maintained in the common drm-misc tree for a release, so make
it official.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170814140011.1336-1-thierry.reding@gmail.com
6 years agodrm/panel: simple: Remove unneeded gpiod NULL check
Fabio Estevam [Mon, 17 Jul 2017 00:05:39 +0000 (21:05 -0300)]
drm/panel: simple: Remove unneeded gpiod NULL check

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500249939-8075-1-git-send-email-festevam@gmail.com
6 years agodrm/panel: simple: Add missing panel_simple_unprepare() calls
Jonathan Liu [Mon, 7 Aug 2017 11:55:45 +0000 (21:55 +1000)]
drm/panel: simple: Add missing panel_simple_unprepare() calls

During panel removal or system shutdown panel_simple_disable() is called
which disables the panel backlight but the panel is still powered due to
missing calls to panel_simple_unprepare().

Fixes: d02fd93e2cd8 ("drm/panel: simple - Disable panel on shutdown")
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170807115545.27747-1-net147@gmail.com
6 years agodrm/panel: simple: Fix width and height for Olimex LCD-OLinuXino-4.3TS
Jonathan Liu [Thu, 20 Jul 2017 10:29:43 +0000 (20:29 +1000)]
drm/panel: simple: Fix width and height for Olimex LCD-OLinuXino-4.3TS

The physical size of the panel is 105.5 (W) x 67.2 (H) x 4.05 (D) mm
but the active display area is 95.04 (W) x 53.856 (H) mm.

The width and height should be set to the active display area.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Fixes: cf5c9e6dc70d ("drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170720102943.25091-1-net147@gmail.com
6 years agodrm/panel: Add support for OTM8009A panel driver
Philippe CORNU [Mon, 17 Jul 2017 13:19:53 +0000 (15:19 +0200)]
drm/panel: Add support for OTM8009A panel driver

This patch adds Orise Tech OTM8009A 3.97" 480x800 TFT LCD
panel driver (MIPI-DSI video mode). The panel backlight is
managed through the DSI link. This panel driver is used in
several STM32 boards.

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-4-git-send-email-philippe.cornu@st.com
6 years agodt-bindings: display: panel: Add support for Orise Tech OTM8009A DSI panel
Philippe CORNU [Mon, 17 Jul 2017 13:19:52 +0000 (15:19 +0200)]
dt-bindings: display: panel: Add support for Orise Tech OTM8009A DSI panel

The Orise Tech OTM8009A is a 3.97" 480x800 TFT LCD panel connected using
a MIPI-DSI video interface. Its backlight is managed through the DSI link.

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-3-git-send-email-philippe.cornu@st.com
6 years agodt-bindings: Add vendor prefix for Orise Technology
Philippe CORNU [Mon, 17 Jul 2017 13:19:51 +0000 (15:19 +0200)]
dt-bindings: Add vendor prefix for Orise Technology

Orise Technology is headquartered in Taiwan and specializes
in manufacture of Flat Panel Display Driver IC and Flat Panel
Display Controller IC.

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-2-git-send-email-philippe.cornu@st.com
6 years agodrm/panel: simple: Skip error message on deferred probe
Fabio Estevam [Fri, 30 Jun 2017 21:14:46 +0000 (18:14 -0300)]
drm/panel: simple: Skip error message on deferred probe

When enable_gpio is provided via an I2C or SPI expander, it may not be
available when panel-simple probes leading to the following error:

panel-simple panel: failed to request GPIO: -517

As this error message is not very useful to the end user, skip printing
it in the case of deferred probe.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1498857286-10820-1-git-send-email-festevam@gmail.com
6 years agodrm/panel: Add support for S6E63J0X03 panel
Hoegeun Kwon [Thu, 13 Jul 2017 02:20:42 +0000 (11:20 +0900)]
drm/panel: Add support for S6E63J0X03 panel

This patch adds MIPI-DSI based S6E63J0X03 AMOLED LCD panel driver
which uses MIPI DSI bus to communicate with panel. The panel has
320×320 resolution in 1.63" physical panel. This panel is used in
Samsung Galaxy Gear 2.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1499912443-3671-3-git-send-email-hoegeun.kwon@samsung.com
6 years agodt-bindings: Add binding for Samsung S6E63J0X03 panel
Hoegeun Kwon [Thu, 13 Jul 2017 02:20:41 +0000 (11:20 +0900)]
dt-bindings: Add binding for Samsung S6E63J0X03 panel

The Samsung S6E63J0X03 is a 1.63" 320x320 AMOLED panel connected using
MIPI-DSI interfaces.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1499912443-3671-2-git-send-email-hoegeun.kwon@samsung.com
6 years agoMerge airlied/drm-next into drm-misc-next
Sean Paul [Fri, 18 Aug 2017 14:52:44 +0000 (10:52 -0400)]
Merge airlied/drm-next into drm-misc-next

Archit requested this backmerge to facilitate merging some patches
depending on changes between -rc2 & -rc5

Signed-off-by: Sean Paul <seanpaul@chromium.org>
6 years agodrm: udl: constify usb_device_id
Arvind Yadav [Sat, 12 Aug 2017 08:35:19 +0000 (14:05 +0530)]
drm: udl: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/22fa8ca67a6d4a59997f463bf241ed56596fbcfa.1502526524.git.arvind.yadav.cs@gmail.com
6 years agodrm/gma500: fix potential NULL pointer dereference dereference
Gustavo A. R. Silva [Sat, 12 Aug 2017 01:55:15 +0000 (20:55 -0500)]
drm/gma500: fix potential NULL pointer dereference dereference

NULL check at line 528: if (!sender || !data_out || !len_out) {, implies
that pointer _sender_ might be NULL.

Move pointer _sender_ dereference after NULL check in order to avoid a
potential NULL pointer dereference.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170812015515.GA8360@embeddedgus
6 years agoMerge tag 'omapdrm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux...
Dave Airlie [Thu, 17 Aug 2017 19:41:32 +0000 (05:41 +1000)]
Merge tag 'omapdrm-4.14' of git://git./linux/kernel/git/tomba/linux into drm-next

omapdrm changes for v4.14

* HDMI hot plug IRQ support (instead of polling)
* Big driver cleanup from Laurent (no functional changes)
* OMAP5 DSI support (only the pinmuxing was missing)

* tag 'omapdrm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (60 commits)
  drm/omap: Potential NULL deref in omap_crtc_duplicate_state()
  drm/omap: remove no-op cleanup code
  drm/omap: rename omapdrm device back
  drm: omapdrm: Remove omapdrm platform data
  ARM: OMAP2+: Don't register omapdss device for omapdrm
  ARM: OMAP2+: Remove unused omapdrm platform device
  drm: omapdrm: Remove the omapdss driver
  drm: omapdrm: Register omapdrm platform device in omapdss driver
  drm: omapdrm: hdmi: Don't allocate PHY features dynamically
  drm: omapdrm: hdmi: Configure the PHY from the HDMI core version
  drm: omapdrm: hdmi: Configure the PLL from the HDMI core version
  drm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio
  drm: omapdrm: hdmi: Replace OMAP SoC model check with HDMI xmit version
  drm: omapdrm: hdmi: Rename functions and structures to use hdmi_ prefix
  drm/omap: add OMAP5 DSIPHY lane-enable support
  drm/omap: use regmap_update_bit() when muxing DSI pads
  drm: omapdrm: Remove dss_features.h
  drm: omapdrm: Move supported outputs feature to dss driver
  drm: omapdrm: Move DSS_FCK feature to dss driver
  drm: omapdrm: Move PCD, LINEWIDTH and DOWNSCALE features to dispc driver
  ...

6 years agoMerge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 17 Aug 2017 19:30:53 +0000 (05:30 +1000)]
Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next

More features for 4.14.  Nothing too major here.  I have a few more additional
patches for large page support in vega10 among other things, but they require
some resevation object patches from drm-misc-next, so I'll send that request
once you've pulled the latest drm-misc-next.  Highlights:
- Fixes for ACP audio on stoney
- SR-IOV fixes for vega10
- various powerplay fixes
- lots of code clean up

* 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux: (62 commits)
  drm/amdgpu/gfx7: fix function name
  drm/amd/amdgpu: Disabling Power Gating for Stoney platform
  drm/amd/amdgpu: Added a quirk for Stoney platform
  drm/amdgpu: jt_size was wrongly counted twice
  drm/amdgpu: fix missing endian-safe guard
  drm/amdgpu: ignore digest_size when loading sdma fw for raven
  drm/amdgpu: Uninitialized variable in amdgpu_ttm_backend_bind()
  drm/amd/powerplay: fix coding style in hwmgr.c
  drm/amd/powerplay: refine dmesg info under powerplay.
  drm/amdgpu: don't finish the ring if not initialized
  drm/radeon: Fix preferred typo
  drm/amdgpu: Fix preferred typo
  drm/radeon: Fix stolen typo
  drm/amdgpu: Fix stolen typo
  drm/amd/powerplay: fix coccinelle warnings in vega10_hwmgr.c
  drm/amdgpu: set gfx_v9_0_ip_funcs as static
  drm/radeon: switch to drm_*{get,put} helpers
  drm/amdgpu: switch to drm_*{get,put} helpers
  drm/amd/powerplay: add CZ profile support
  drm/amd/powerplay: fix PSI not enabled by kmd
  ...

6 years agoMerge tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc...
Dave Airlie [Wed, 16 Aug 2017 21:33:41 +0000 (07:33 +1000)]
Merge tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next

UAPI Changes:
- vc4: Allow userspace to dictate rendering order in submit_cl ioctl (Eric)

Cross-subsystem Changes:
- vboxvideo: One of Cihangir's patches applies to vboxvideo which is maintained
     in staging

Core Changes:
- atomic_legacy_backoff is officially killed (Daniel)
- Extract drm_device.h (Daniel)
- Unregister drm device on unplug (Daniel)
- Rename deprecated drm_*_(un)?reference functions to drm_*_{get|put} (Cihangir)

Driver Changes:
- vc4: Error/destroy path cleanups, log level demotion, edid leak (Eric)
- various: Make various drm_*_funcs structs const (Bhumika)
- tinydrm: add support for LEGO MINDSTORMS EV3 LCD (David)
- various: Second half of .dumb_{map_offset|destroy} defaults set (Noralf)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Cc: Bhumika Goyal <bhumirks@gmail.com>
Cc: Cihangir Akturk <cakturk@gmail.com>
Cc: David Lechner <david@lechnology.com>
Cc: Noralf Trønnes <noralf@tronnes.org>
* tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc: (50 commits)
  drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()
  drm/virtio: Use the drm_driver.dumb_destroy default
  drm/bochs: Use the drm_driver.dumb_destroy default
  drm/mgag200: Use the drm_driver.dumb_destroy default
  drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults
  drm/msm: Use the drm_driver.dumb_destroy default
  drm/ast: Use the drm_driver.dumb_destroy default
  drm/qxl: Use the drm_driver.dumb_destroy default
  drm/udl: Use the drm_driver.dumb_destroy default
  drm/cirrus: Use the drm_driver.dumb_destroy default
  drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults
  drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults
  drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults
  drm/meson: Use .dumb_map_offset and .dumb_destroy defaults
  drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults
  drm/vc4: Continue the switch to drm_*_put() helpers
  drm/vc4: Fix leak of HDMI EDID
  dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly v2
  dma-buf: add reservation_object_copy_fences (v2)
  drm/tinydrm: add support for LEGO MINDSTORMS EV3 LCD
  ...

6 years agodrm/tinydrm: make function st7586_pipe_enable static
Colin Ian King [Wed, 16 Aug 2017 09:23:06 +0000 (10:23 +0100)]
drm/tinydrm: make function st7586_pipe_enable static

The function st7586_pipe_enable  is local to the source
and does not need to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'st7586_pipe_enable' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-By: David Lechner <david@lechnology.com>
[noralf: fixed: Alignment should match open parenthesis]
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170816092306.10969-1-colin.king@canonical.com
6 years agoMAINTAINERS: Add drm/tinydrm maintainer entry
Noralf Trønnes [Sun, 13 Aug 2017 17:36:30 +0000 (19:36 +0200)]
MAINTAINERS: Add drm/tinydrm maintainer entry

Add myself as drivers/gpu/drm/tinydrm maintainer.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502645790-14944-1-git-send-email-noralf@tronnes.org
6 years agodrm/vc4: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:32:03 +0000 (15:32 +0200)]
drm/vc4: Use drm_gem_fb_create()

drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now,
so use the function directly.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-21-git-send-email-noralf@tronnes.org
6 years agodrm/pl111: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:56 +0000 (15:31 +0200)]
drm/pl111: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()

drm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now,
use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-14-git-send-email-noralf@tronnes.org
6 years agodrm/fb-cma-helper: Use drm_gem_framebuffer_helper
Noralf Trønnes [Sun, 13 Aug 2017 13:31:45 +0000 (15:31 +0200)]
drm/fb-cma-helper: Use drm_gem_framebuffer_helper

Use the new drm_gem_framebuffer_helper who's code was copied
from this helper.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-3-git-send-email-noralf@tronnes.org
6 years agodrm: Add GEM backed framebuffer library
Noralf Trønnes [Sun, 13 Aug 2017 13:31:44 +0000 (15:31 +0200)]
drm: Add GEM backed framebuffer library

This library provides helpers for drivers that don't subclass
drm_framebuffer and are backed by drm_gem_object. The code is
taken from drm_fb_cma_helper.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-2-git-send-email-noralf@tronnes.org
6 years agodrm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()
Noralf Trønnes [Sun, 6 Aug 2017 15:41:08 +0000 (17:41 +0200)]
drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

There are no more users of drm_gem_cma_dumb_map_offset(), so remove it.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-20-git-send-email-noralf@tronnes.org
6 years agodrm/virtio: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:41:07 +0000 (17:41 +0200)]
drm/virtio: Use the drm_driver.dumb_destroy default

virtio_gpu_mode_dumb_destroy() is the same as drm_gem_dumb_destroy()
which is the drm_driver.dumb_destroy default, so no need to set it.

Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-19-git-send-email-noralf@tronnes.org
6 years agodrm/bochs: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:41:05 +0000 (17:41 +0200)]
drm/bochs: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-17-git-send-email-noralf@tronnes.org
6 years agodrm/mgag200: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:41:03 +0000 (17:41 +0200)]
drm/mgag200: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-15-git-send-email-noralf@tronnes.org
6 years agodrm/exynos: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:41:02 +0000 (17:41 +0200)]
drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.
Use drm_gem_dumb_map_offset() in exynos_drm_gem_map_ioctl() and
remove exynos_drm_gem_dumb_map_offset().

Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-14-git-send-email-noralf@tronnes.org
6 years agodrm/msm: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:41:01 +0000 (17:41 +0200)]
drm/msm: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-13-git-send-email-noralf@tronnes.org
6 years agodrm/ast: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:40:59 +0000 (17:40 +0200)]
drm/ast: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-11-git-send-email-noralf@tronnes.org
6 years agodrm/qxl: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:40:58 +0000 (17:40 +0200)]
drm/qxl: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-10-git-send-email-noralf@tronnes.org
6 years agodrm/udl: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:40:57 +0000 (17:40 +0200)]
drm/udl: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-9-git-send-email-noralf@tronnes.org
6 years agodrm/cirrus: Use the drm_driver.dumb_destroy default
Noralf Trønnes [Sun, 6 Aug 2017 15:40:56 +0000 (17:40 +0200)]
drm/cirrus: Use the drm_driver.dumb_destroy default

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default,
so no need to set it.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-8-git-send-email-noralf@tronnes.org
6 years agodrm/tegra: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:40:55 +0000 (17:40 +0200)]
drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-7-git-send-email-noralf@tronnes.org
6 years agodrm/gma500: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:40:54 +0000 (17:40 +0200)]
drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-6-git-send-email-noralf@tronnes.org
6 years agodrm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:40:52 +0000 (17:40 +0200)]
drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-4-git-send-email-noralf@tronnes.org
6 years agodrm/meson: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:40:51 +0000 (17:40 +0200)]
drm/meson: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-3-git-send-email-noralf@tronnes.org
6 years agodrm/kirin: Use .dumb_map_offset and .dumb_destroy defaults
Noralf Trønnes [Sun, 6 Aug 2017 15:40:50 +0000 (17:40 +0200)]
drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

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>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-2-git-send-email-noralf@tronnes.org
6 years agodrm/omap: Potential NULL deref in omap_crtc_duplicate_state()
Dan Carpenter [Fri, 11 Aug 2017 20:16:06 +0000 (23:16 +0300)]
drm/omap: Potential NULL deref in omap_crtc_duplicate_state()

If the kmalloc() fails then we dereference "state" when we set
"state->zpos".

Fixes: 3dfeb631a15d ("drm/omap: Rework the rotation-on-crtc hack")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: remove no-op cleanup code
Tomi Valkeinen [Tue, 15 Aug 2017 13:04:20 +0000 (16:04 +0300)]
drm/omap: remove no-op cleanup code

The driver sets crtc and plane rotation properties back to 0 degrees in
dev_lastclose() using drm_object_property_set_value().
drm_object_property_set_value() doesn't do anything with atomic drivers,
and a recent change added WARN_ON() when atomic driver calls the
function.

So remove the code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agodrm/omap: rename omapdrm device back
Tomi Valkeinen [Wed, 16 Aug 2017 09:43:55 +0000 (12:43 +0300)]
drm/omap: rename omapdrm device back

Now that creating the omapdrm device from the platform code has been
removed, we can rename the omapdrm device back to "omapdrm".

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Remove omapdrm platform data
Laurent Pinchart [Fri, 11 Aug 2017 13:49:12 +0000 (16:49 +0300)]
drm: omapdrm: Remove omapdrm platform data

The omapdrm platform data are not used anymore, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agoARM: OMAP2+: Don't register omapdss device for omapdrm
Laurent Pinchart [Fri, 11 Aug 2017 13:49:11 +0000 (16:49 +0300)]
ARM: OMAP2+: Don't register omapdss device for omapdrm

The omapdrm driver doesn't need the omapdss device anymore. Although it
can't be removed completely as the fbdev driver still requires it, we
can condition its registration to the usage of the omapfb driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agoARM: OMAP2+: Remove unused omapdrm platform device
Laurent Pinchart [Fri, 11 Aug 2017 13:49:10 +0000 (16:49 +0300)]
ARM: OMAP2+: Remove unused omapdrm platform device

The omapdrm platform device is unused, as a replacement is now
registered in the omapdss driver. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Remove the omapdss driver
Laurent Pinchart [Fri, 11 Aug 2017 13:49:09 +0000 (16:49 +0300)]
drm: omapdrm: Remove the omapdss driver

The omapdss driver (not to be confused with the omapdss_dss driver) is
now a dummy driver with empty probe and remove functions. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: Register omapdrm platform device in omapdss driver
Laurent Pinchart [Fri, 11 Aug 2017 13:49:08 +0000 (16:49 +0300)]
drm: omapdrm: Register omapdrm platform device in omapdss driver

The omapdrm platform device is a virtual device created for the sole
purpose of handling the omapdss/omapdrm driver split. It should
eventually be removed. As a first step to ease refactoring move its
registration from platform code to driver code.

The omapdrm driver name must be changed internally to avoid probing both
the device registered in platform code and the device registered in the
omapdss driver, as that would otherwise break bisection.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Don't allocate PHY features dynamically
Laurent Pinchart [Fri, 11 Aug 2017 13:49:07 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Don't allocate PHY features dynamically

There's no need to allocate memory dynamically to duplicate the contents
of a const structure, only to store the memory pointer in a const
pointer field. Just use the original structures directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Configure the PHY from the HDMI core version
Laurent Pinchart [Fri, 11 Aug 2017 13:49:06 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Configure the PHY from the HDMI core version

The OMAP4 and OMAP5 HDMI PHYs have different properties that require
specific handling in the HDMI PHY driver. This needs knowledge of the
PHY version, which is currently inferred from the DSS version. As part
of the effort to remove usage of the DSS version, use the HDMI
controller version instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Configure the PLL from the HDMI core version
Laurent Pinchart [Fri, 11 Aug 2017 13:49:05 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Configure the PLL from the HDMI core version

The OMAP4 and OMAP5 PLLs have different properties that require specific
handling in the HDMI PLL driver. This needs knowledge of the PLL
version, which is currently inferred from the DSS version. AS part of
the effort to remove usage of the DSS version, use the HDMI controller
version instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio
Laurent Pinchart [Fri, 11 Aug 2017 13:49:04 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio

The HDMI audio driver only needs to know which generation of HDMI
transmitter it deals with, not the detailed SoC model. Pass the version
number as an integer to prepare for removal of the OMAP SoC version from
the omapdrm driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Replace OMAP SoC model check with HDMI xmit version
Laurent Pinchart [Fri, 11 Aug 2017 13:49:03 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Replace OMAP SoC model check with HDMI xmit version

The HDMI wrapper code only needs to differentiate between major OMAP
revisions, which can be obtained from the HDMI transmitter compatible
string. Replace the OMAP SoC model checks to prepare for removal of the
OMAP SoC version platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm: omapdrm: hdmi: Rename functions and structures to use hdmi_ prefix
Laurent Pinchart [Fri, 11 Aug 2017 13:49:02 +0000 (16:49 +0300)]
drm: omapdrm: hdmi: Rename functions and structures to use hdmi_ prefix

The dsi_pll_ops structure and dsi_init_pll_data() function incorrectly
use a dsi_ prefix, likely due to copy & paste. Fix it by using the
correct hdmi_ prefix.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
6 years agodrm/omap: add OMAP5 DSIPHY lane-enable support
Tomi Valkeinen [Thu, 10 Aug 2017 06:33:07 +0000 (09:33 +0300)]
drm/omap: add OMAP5 DSIPHY lane-enable support

We are missing OMAP5 DSIPHY lane-enable support, which has prevented
OMAP5 DSI working in mainline. This patch adds the lane-enable similarly
to the recently added OMAP4 version.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agodrm/omap: use regmap_update_bit() when muxing DSI pads
Tomi Valkeinen [Thu, 10 Aug 2017 12:11:03 +0000 (15:11 +0300)]
drm/omap: use regmap_update_bit() when muxing DSI pads

Use regmap_update_bits instead of regmap_read/write, which simplifies
the code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agodrm/nouveau: Fix merge commit
Maarten Lankhorst [Tue, 15 Aug 2017 08:52:50 +0000 (10:52 +0200)]
drm/nouveau: Fix merge commit

The most recent merge commit in airlied/drm-next has problems with
confusing old_crtc_state and new_crtc_state. Use the
for_each_oldnew_crtc_in_state macros to clean up the confusion,
and explicitly look at the correct state instead of looking at
asyh->state.

With these fixes it becomes more obvious what the code is trying to do,
which will hopefully prevent future confusion.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agodrm/amdgpu/gfx7: fix function name
Alex Deucher [Tue, 15 Aug 2017 14:34:55 +0000 (10:34 -0400)]
drm/amdgpu/gfx7: fix function name

Was using the wrong prefix (gmc rather than gfx).  The function
is related to the gfx hw, not gmc.  This also makes it consistent
with the naming in gfx8.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>