platform/kernel/linux-rpi.git
6 years agodrm/tinydrm: export mipi_dbi_buf_copy and mipi_dbi_spi_cmd_max_speed
David Lechner [Sun, 19 Nov 2017 20:12:07 +0000 (14:12 -0600)]
drm/tinydrm: export mipi_dbi_buf_copy and mipi_dbi_spi_cmd_max_speed

This exports the mipi_dbi_buf_copy() and mipi_dbi_spi_cmd_max_speed()
functions so that they can be shared with other drivers.

Signed-off-by: David Lechner <david@lechnology.com>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1511122328-31133-4-git-send-email-david@lechnology.com
6 years agodt-bindings: Add binding for Ilitek ILI9225 display panels
David Lechner [Sun, 19 Nov 2017 20:12:06 +0000 (14:12 -0600)]
dt-bindings: Add binding for Ilitek ILI9225 display panels

This adds a new binding for display panels that use an Ilitek ILI9225
controller.

The "ilitek,ili9225-2.2in-176x220" device listed has no identification
markings whatsoever and an hour of googling turned up nothing, hence the use
of the size and resolution in the name instead of a model name.

An example of this nameless device can be found at:
https://github.com/Nkawu/TFT_22_ILI9225

Signed-off-by: David Lechner <david@lechnology.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1511122328-31133-3-git-send-email-david@lechnology.com
6 years agodt-bindings: Add vendor prefix for ilitek
David Lechner [Sun, 19 Nov 2017 20:12:05 +0000 (14:12 -0600)]
dt-bindings: Add vendor prefix for ilitek

This adds the vendor prefix ilitek for ILI Technology Corporation (ILITEK).

This prefix is already used several places and I will be adding more.

Signed-off-by: David Lechner <david@lechnology.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1511122328-31133-2-git-send-email-david@lechnology.com
6 years agodrm/docs: Add todo entry for simple modeset suspend/resume
Noralf Trønnes [Mon, 6 Nov 2017 19:18:12 +0000 (20:18 +0100)]
drm/docs: Add todo entry for simple modeset suspend/resume

Add entry for conversion of drivers to new helpers.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-7-noralf@tronnes.org
6 years agodrm/tinydrm: Use drm_mode_config_helper_suspend/resume()
Noralf Trønnes [Mon, 6 Nov 2017 19:18:11 +0000 (20:18 +0100)]
drm/tinydrm: Use drm_mode_config_helper_suspend/resume()

Replace driver's code with the generic helpers that do the same thing.
Remove todo entry.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-6-noralf@tronnes.org
6 years agodrm/arm/mali: Use drm_mode_config_helper_suspend/resume()
Noralf Trønnes [Mon, 6 Nov 2017 19:18:09 +0000 (20:18 +0100)]
drm/arm/mali: Use drm_mode_config_helper_suspend/resume()

Replace driver's code with the generic helpers that do the same thing.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-4-noralf@tronnes.org
6 years agodrm/modeset-helper: Add simple modeset suspend/resume helpers
Noralf Trønnes [Mon, 6 Nov 2017 19:18:08 +0000 (20:18 +0100)]
drm/modeset-helper: Add simple modeset suspend/resume helpers

Add drm_mode_config_helper_suspend/resume() which takes care of
atomic modeset suspend/resume for simple use cases.
The suspend state is stored in struct drm_mode_config.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-3-noralf@tronnes.org
6 years agodrm/probe-helper: Fix drm_kms_helper_poll_enable() docs
Noralf Trønnes [Mon, 6 Nov 2017 19:18:07 +0000 (20:18 +0100)]
drm/probe-helper: Fix drm_kms_helper_poll_enable() docs

Fix docs to reflect code and drm_kms_helper_poll_disable() docs by saying
that calling drm_kms_helper_poll_enable() is fine even if output polling
is not enabled.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-2-noralf@tronnes.org
6 years agodrm/sun4i: use sun4i_tcon_of_table to check if a device node is a TCON
Chen-Yu Tsai [Mon, 27 Nov 2017 08:46:32 +0000 (16:46 +0800)]
drm/sun4i: use sun4i_tcon_of_table to check if a device node is a TCON

The sun4i DRM driver maintains a list of compatible strings it uses to
check if a device node within the display component graph is a TCON.
The TCON driver also has this list, used to bind the TCON driver to
the device. These two lists are identical.

Instead of maintaining two identical lists, export the list from the
TCON driver for the DRM driver to use.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171127084632.25511-1-wens@csie.org
6 years agodrm/bridge: tc358767: add copyright lines
Andrey Gusakov [Tue, 7 Nov 2017 16:56:25 +0000 (19:56 +0300)]
drm/bridge: tc358767: add copyright lines

Add copyright lines for Zodiac who paid for driver development.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Acked-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-8-git-send-email-andrey.gusakov@cogentembedded.com
6 years agoMAINTAINERS: change maintainer for Rockchip drm drivers
Mark Yao [Wed, 29 Nov 2017 14:24:42 +0000 (09:24 -0500)]
MAINTAINERS: change maintainer for Rockchip drm drivers

For personal reasons, Mark Yao will leave rockchip,
can not continue maintain drm/rockchip, Sandy Huang
and Heiko Stübner will take over drm/rockchip.

Cc: Sandy Huang <hjc@rock-chips.com>
Cc: Heiko Stübner <heiko@sntech.de>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
[seanpaul added Heiko]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171129142459.32351-1-seanpaul@chromium.org
6 years agodrm/vblank: Fix vblank timestamp debugs
Ville Syrjälä [Mon, 13 Nov 2017 15:02:10 +0000 (17:02 +0200)]
drm/vblank: Fix vblank timestamp debugs

We're currently calling ktime_to_timespec64() on stack garbage
hence the debug output for vblank timestamps also contains garbage.
Let's assing something to the ktime_t first before we go converting
it to a timespec.

While at it micro-optimize the ktime_to_timespec64() calls away
when vblank debugging isn't enabled.

Fixes: 67680d3c0464 ("drm: vblank: use ktime_t instead of timeval")
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Keith Packard <keithp@keithp.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113150210.11311-1-ville.syrjala@linux.intel.com
Acked-by: Arnd Bergmann <arnd@arndb.de>
6 years agodrm/via: use monotonic time for VIA_WAIT_IRQ
Arnd Bergmann [Mon, 27 Nov 2017 11:17:03 +0000 (12:17 +0100)]
drm/via: use monotonic time for VIA_WAIT_IRQ

The normal DRM vblank interrupt events started using monotonic times in
commit c61eef726a78 ("drm: add support for monotonic vblank timestamps"),
which is useful for a number of reasons, including the possible y2038
overflow.

The VIA_WAIT_IRQ ioctl uses the same drm_wait_vblank_reply as
DRM_IOCTL_WAIT_VBLANK, but still uses wall-clock time.

This converts it to using monotonic time as well, which is more
consistent, and avoids problems with the y2038 overflow as well
as synchronization issues when the real time skips.

I could not find the matching user space that calls the VIA_WAIT_IRQ
ioctl to verify that this is safe, but it very likely is. Please
either test or review the user space side before applying this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171127111728.1710742-1-arnd@arndb.de
6 years agodma-buf: Fix ifnullfree.cocci warnings
Vasyl Gomonovych [Wed, 22 Nov 2017 15:22:41 +0000 (16:22 +0100)]
dma-buf: Fix ifnullfree.cocci warnings

NULL check before some freeing functions is not needed.
drivers/dma-buf/dma-buf.c:1183:2-26: WARNING: NULL check before freeing debugfs_remove_recursive
Generated by: scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1511364161-6074-1-git-send-email-gomonovych@gmail.com
6 years agodrm/printer: Add drm_vprintf()
Chris Wilson [Thu, 23 Nov 2017 08:40:46 +0000 (08:40 +0000)]
drm/printer: Add drm_vprintf()

Simple va_args equivalent to the existing drm_printf() for use with the
drm_printer.

v2: Fixup kerneldoc to match final parameter names.
v3: Turn it into a kerneldoc comment

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171123084051.30203-1-chris@chris-wilson.co.uk
6 years agodrm/edid: Allow HDMI infoframe without VIC or S3D
Ville Syrjälä [Mon, 13 Nov 2017 17:04:19 +0000 (19:04 +0200)]
drm/edid: Allow HDMI infoframe without VIC or S3D

Appedix F of HDMI 2.0 says that some HDMI sink may fail to switch from
3D to 2D mode in a timely fashion if the source simply stops sending the
HDMI infoframe. The suggested workaround is to keep sending the
infoframe even when strictly not necessary (ie. no VIC and no S3D).
HDMI 1.4 does allow for this behaviour, stating that sending the
infoframe is optional in this case.

The infoframe was first specified in HDMI 1.4, so in theory sinks
predating that may not appreciate us sending an uknown infoframe
their way. To avoid regressions let's try to determine if the sink
supports the infoframe or not. Unfortunately there's no direct way
to do that, so instead we'll just check if we managed to parse any
HDMI 1.4 4k or stereo modes from the EDID, and if so we assume the
sink will accept the infoframe. Also if the EDID contains the HDMI
2.0 HDMI Forum VSDB we can assume the sink is prepared to receive
the infoframe.

v2: Fix getting has_hdmi_infoframe from display_info
    Always fail constructing the infoframe if the display
    possibly can't handle it

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113170427.4150-3-ville.syrjala@linux.intel.com
6 years agovideo/hdmi: Allow "empty" HDMI infoframes
Ville Syrjälä [Mon, 13 Nov 2017 17:04:18 +0000 (19:04 +0200)]
video/hdmi: Allow "empty" HDMI infoframes

HDMI 2.0 Appendix F suggest that we should keep sending the infoframe
when switching from 3D to 2D mode, even if the infoframe isn't strictly
necessary (ie. not needed to transmit the VIC or stereo information).
This is a workaround against some sinks that fail to realize that they
should switch from 3D to 2D mode when the source stop transmitting
the infoframe.

v2: Handle unpack() as well
    Pull the length calculation into a helper

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113170427.4150-2-ville.syrjala@linux.intel.com
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
6 years agodma-buf/fence: Fix lock inversion within dma-fence-array
Chris Wilson [Tue, 14 Nov 2017 16:27:19 +0000 (16:27 +0000)]
dma-buf/fence: Fix lock inversion within dma-fence-array

Ages ago Rob Clark noted,

"Currently with fence-array, we have a potential deadlock situation.  If
we fence_add_callback() on an array-fence, the array-fence's lock is
acquired first, and in it's ->enable_signaling() callback, it will install
cbs on it's array-member fences, so the array-member's lock is acquired
second.

But in the signal path, the array-member's lock is acquired first, and
the array-fence's lock acquired second."

Rob proposed either extensive changes to dma-fence to unnest the
fence-array signaling, or to defer the signaling onto a workqueue. This
is a more refined version of the later, that should keep the latency
of the fence signaling to a minimum by using an irq-work, which is
executed asap.

Reported-by: Rob Clark <robdclark@gmail.com>
Suggested-by: Rob Clark <robdclark@gmail.com>
References: 1476635975-21981-1-git-send-email-robdclark@gmail.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114162719.30958-1-chris@chris-wilson.co.uk
6 years agoMerge airlied/drm-next into drm-misc-next
Daniel Vetter [Tue, 21 Nov 2017 10:33:10 +0000 (11:33 +0100)]
Merge airlied/drm-next into drm-misc-next

Bake in the conflict between the drm_print.h extraction and the
addition of DRM_DEBUG_LEASES since we lost it a few too many times.

Also fix a new use of drm_plane_helper_check_state in msm to follow
Ville's conversion in

commit a01cb8ba3f6282934cff65e89ab36b18b14cbe27
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Wed Nov 1 22:16:19 2017 +0200

    drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c

Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/sti: Handle return value of platform_get_irq_byname
Arvind Yadav [Fri, 17 Nov 2017 10:36:06 +0000 (16:06 +0530)]
drm/sti: Handle return value of platform_get_irq_byname

platform_get_irq_byname() can fail here and we must check its return
value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/f4b4f1b2cfa5e302ef7ffad4e3efb0d3147709d3.1510914877.git.arvind.yadav.cs@gmail.com
6 years agodrm/vc4: Add support for NV21 and NV61.
Dave Stevenson [Thu, 16 Nov 2017 14:22:31 +0000 (14:22 +0000)]
drm/vc4: Add support for NV21 and NV61.

NV12 (YUV420 2 plane) and NV16 (YUV422 2 plane) were
supported, but NV21 and NV61 (same but with Cb and Cr
swapped) weren't. Add them.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1f50799525e3401551dff2b0b2828b9ab892f75f.1510841336.git.dave.stevenson@raspberrypi.org
6 years agodrm/vc4: Use .pixel_order instead of custom .flip_cbcr
Dave Stevenson [Thu, 16 Nov 2017 14:22:30 +0000 (14:22 +0000)]
drm/vc4: Use .pixel_order instead of custom .flip_cbcr

The hardware has enums for altering the Cr and Cb order,
so use this instead of having a flag which swaps the
order the pointers are presented to the hardware
(that only worked for 3 plane formats anyway).

Explicitly sets .pixel_order in each case, rather than
relying on then default XYCBCR order being a value 0.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/563872b69c1e5df142cb15ebfca7f20056b8a64c.1510841336.git.dave.stevenson@raspberrypi.org
6 years agodrm/vc4: Add support for DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888
Dave Stevenson [Thu, 16 Nov 2017 14:22:29 +0000 (14:22 +0000)]
drm/vc4: Add support for DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888

Filling out the list of supported formats based on those the
hardware can support.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/b551205d1c33fa49eef2c33ed2d60c5339b2f299.1510841336.git.dave.stevenson@raspberrypi.org
6 years agodrm: Move drm_plane_helper_check_state() into drm_atomic_helper.c
Ville Syrjälä [Wed, 1 Nov 2017 20:16:19 +0000 (22:16 +0200)]
drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c

drm_plane_helper_check_update() isn't a transitional helper, so let's
rename it to drm_atomic_helper_check_plane_state() and move it into
drm_atomic_helper.c.

v2: Fix the WARNs about plane_state->crtc matching crtc_state->crtc

Cc: Daniel Vetter <daniel@ffwll.ch>
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101201619.6175-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm: Check crtc_state->enable rather than crtc->enabled in drm_plane_helper_check_state()
Ville Syrjälä [Wed, 1 Nov 2017 20:15:58 +0000 (22:15 +0200)]
drm: Check crtc_state->enable rather than crtc->enabled in drm_plane_helper_check_state()

drm_plane_helper_check_state() is supposed to do things the atomic way,
so it should not be inspecting crtc->enabled. Rather we should be
looking at crtc_state->enable.

We have a slight complication due to drm_plane_helper_check_update()
reusing drm_plane_helper_check_state() for non-atomic drivers. Thus
we'll have to pass the crtc_state in manally and construct a fake
crtc_state in drm_plane_helper_check_update().

v2: Fix the WARNs about plane_state->crtc matching crtc_state->crtc

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101201558.6059-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/vmwgfx: Try to fix plane clipping
Ville Syrjälä [Wed, 1 Nov 2017 18:29:18 +0000 (20:29 +0200)]
drm/vmwgfx: Try to fix plane clipping

Try to fix the code to actually clip the plane to the crtc bounds
instead of the user provided crtc coordinates (which would be a no-op
since those are exactly the coordinates before clipping).

Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101182920.14386-4-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
6 years agodrm/vmwgfx: Use drm_plane_helper_check_state()
Ville Syrjälä [Wed, 1 Nov 2017 18:29:17 +0000 (20:29 +0200)]
drm/vmwgfx: Use drm_plane_helper_check_state()

Atomic drivers have no reason to use drm_plane_helper_check_update()
instead of drm_plane_helper_check_state(). So let's switch over.

Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101182920.14386-3-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
6 years agodrm/vmwgfx: Remove bogus crtc coords vs fb size check
Ville Syrjälä [Wed, 1 Nov 2017 18:29:16 +0000 (20:29 +0200)]
drm/vmwgfx: Remove bogus crtc coords vs fb size check

Throw away the bugs crtc coords vs. fb size check. Crtc coords don't
define the viewport inside the fb, that's a job for the src coords,
which have been checked by the core already.

Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101182920.14386-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
6 years agogpu: gma500: remove unneeded DRIVER_LICENSE #define
Greg Kroah-Hartman [Fri, 17 Nov 2017 14:16:32 +0000 (15:16 +0100)]
gpu: gma500: remove unneeded DRIVER_LICENSE #define

There is no need to #define the license of the driver, just put it in
the MODULE_LICENSE() line directly as a text string.

This allows tools that check that the module license matches the source
code license to work properly, as there is no need to unwind the
unneeded dereference, especially when the string is defined in a .h file
far away from the .c file it is used in.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171117141632.GA17880@kroah.com
6 years agodrm: don't link DP aux i2c adapter to the hardware device node
Lucas Stach [Fri, 13 Jan 2017 17:36:30 +0000 (18:36 +0100)]
drm: don't link DP aux i2c adapter to the hardware device node

The i2c adapter on DP AUX is purely a software construct. Linking
it to the device node of the parent device is wrong, as it leads to
2 devices sharing the same device node, which is bad practice, as
well as the i2c trying to populate children of the i2c adapter by
looking at the child device nodes of the parent device.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170113173630.22138-1-l.stach@pengutronix.de
6 years agodrm/panel: simple: Add Mitsubishi AA070MC01 panel support
Lukasz Majewski [Fri, 20 Oct 2017 22:18:37 +0000 (00:18 +0200)]
drm/panel: simple: Add Mitsubishi AA070MC01 panel support

The Mitsubishi AA070MC01 is a 7.0" WVGA (800x480) TFT panel working in
8 bit ISP mode (pin 19 "mode" HIGH for 20 pin TFT connector).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1508537917-1723-1-git-send-email-lukma@denx.de
6 years agodrm/panel: simple: Add Tianma TM070RVHG71 panel support
Lukasz Majewski [Tue, 7 Nov 2017 15:30:58 +0000 (16:30 +0100)]
drm/panel: simple: Add Tianma TM070RVHG71 panel support

The Tianma TM070RVHG71 is a 7" WVGA (800x480) TFT LCD panel connected
via LVDS and can be supported by the simple-panel binding.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107153058.5554-1-lukma@denx.de
6 years agodrm/bridge/sii8620: add DVI mode support
Maciej Purski [Thu, 9 Nov 2017 10:53:42 +0000 (11:53 +0100)]
drm/bridge/sii8620: add DVI mode support

If the sink device is in HDMI mode, enable infoframe interrupt in scdt
irq handle function else call start_video function immediately, because
in DVI mode, there is no infoframe interrupt provided.

Rename start_hdmi function to start_video and get rid of the old
start_video function. In start_video, if the sink is DVI and mode is
MHL1 or MHl2, write appropriate values to registers else the path
should remain the same as in HDMI mode.

Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1510224822-7732-1-git-send-email-m.purski@samsung.com
6 years agodrm/bridge/sii8620: filter unsupported modes
Marek Szyprowski [Thu, 9 Nov 2017 10:28:31 +0000 (11:28 +0100)]
drm/bridge/sii8620: filter unsupported modes

The maximum pixel clock depends on the version of the connected MHL
adapter. Add mode_valid callback to filter out modes with too high pixel
clock to avoid failure in mode_fixup later.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171109102831.19844-1-m.szyprowski@samsung.com
6 years agodrm/rockchip: vop: add rk3126 vop support
Sandy Huang [Tue, 14 Nov 2017 11:27:37 +0000 (19:27 +0800)]
drm/rockchip: vop: add rk3126 vop support

RK3126 vop register layout is similar with rk3036, so some feature
can reuse with rk3036.

RK3126 support two overlay plane and one hwc plane, max output
resolution is 1080p. it support IOMMU, and its IOMMU same as
rk3288's

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1510658857-90299-1-git-send-email-hjc@rock-chips.com
6 years agodt-bindings: add document for rk3126-vop
Sandy Huang [Tue, 14 Nov 2017 11:27:34 +0000 (19:27 +0800)]
dt-bindings: add document for rk3126-vop

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1510658855-90223-1-git-send-email-hjc@rock-chips.com
6 years agodrm: gem_cma_helper.c: Allow importing of contiguous scatterlists with nents > 1
Liviu Dudau [Fri, 10 Nov 2017 13:33:10 +0000 (13:33 +0000)]
drm: gem_cma_helper.c: Allow importing of contiguous scatterlists with nents > 1

drm_gem_cma_prime_import_sg_table() will fail if the number of entries
in the sg_table > 1. However, you can have a device that uses an IOMMU
engine and can map a discontiguous buffer with multiple entries that
have consecutive sg_dma_addresses, effectively making it contiguous.
Allow for that scenario by testing the entries in the sg_table for
contiguous coverage.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171110133310.1225-1-Liviu.Dudau@arm.com
6 years agodrm/atomic-helper: always track connector commits, too
Daniel Vetter [Fri, 10 Nov 2017 10:53:12 +0000 (11:53 +0100)]
drm/atomic-helper: always track connector commits, too

It's useful for syncing async connector work like link retraining.

v2: Make it work (Manasi&Ville)

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171110105313.16718-1-daniel.vetter@ffwll.ch
6 years agodrm: Fix kerneldocs for drm_plane modifiers
Ville Syrjälä [Tue, 14 Nov 2017 19:10:21 +0000 (21:10 +0200)]
drm: Fix kerneldocs for drm_plane modifiers

Add the missing kerneldoc for modifiers and modifier_count.

Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114191021.15591-3-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/gem-cma-helper: Fix kerneldocs
Ville Syrjälä [Tue, 14 Nov 2017 19:10:19 +0000 (21:10 +0200)]
drm/gem-cma-helper: Fix kerneldocs

Use the correct name for the function argument in the docs.

Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114191021.15591-1-ville.syrjala@linux.intel.com
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm: Fix modifiers_property kernel doc
Ville Syrjälä [Thu, 24 Aug 2017 19:10:58 +0000 (22:10 +0300)]
drm: Fix modifiers_property kernel doc

The member is called 'modifiers_property' instead of 'modifiers'. Adjust
the kernel docs to match.

Cc: dri-devel@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Daniel Stone <daniels@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-11-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace
Christian König [Tue, 14 Nov 2017 14:24:36 +0000 (15:24 +0100)]
dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

The amdgpu issue to also need signaled fences in the reservation objects should
be fixed by now.

Optimize the handling by replacing a signaled fence when adding a new
shared one.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114142436.1360-2-christian.koenig@amd.com
6 years agodma-buf: keep only not signaled fence in reservation_object_add_shared_replace v3
Christian König [Tue, 14 Nov 2017 14:24:35 +0000 (15:24 +0100)]
dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v3

The amdgpu issue to also need signaled fences in the reservation objects
should be fixed by now.

Optimize the list by keeping only the not signaled yet fences around.

v2: temporary put the signaled fences at the end of the new container
v3: put the old fence at the end of the new container as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114142436.1360-1-christian.koenig@amd.com
6 years agodrm/debugfs: Fix framebuffer debugfs file init
Noralf Trønnes [Mon, 13 Nov 2017 23:12:01 +0000 (00:12 +0100)]
drm/debugfs: Fix framebuffer debugfs file init

The introduction of: drm/framebuffer: Add framebuffer debugfs file
broke vgem. That patch assumed that all drivers had initialized the
dev->mode_config.fb_lock mutex which happens in drm_mode_config_init().
vgem doesn't need to call drm_mode_config_init().

Fix this by only creating the framebuffer debugfs file for modesetting
drivers.

Fixes: 45d58b40292b ("drm/framebuffer: Add framebuffer debugfs file")
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113231201.26177-1-noralf@tronnes.org
6 years agoMerge tag 'exynos-drm-next-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel...
Dave Airlie [Tue, 14 Nov 2017 04:12:43 +0000 (14:12 +1000)]
Merge tag 'exynos-drm-next-for-v4.15' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next

- Improved HDMI and Mixer drivers
  . It moves mode setup and plane update code to commit
    like other CRTC drivers
  . It makes mode commit to be called in enable callback only one time
  . some cleanup and fixup to HDMI and Mixer drivers.
  . It adds 1024x768, 1280x1024 and 1366x768 modes support
- Added HDMI audio interface driver
  . As of now, HDMI audio worked on boards with external audio codec connected
    in parallel with the HDMI audio transmitter's I2S interface.
    This patch is required to support HDMI audio properly.

* tag 'exynos-drm-next-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm: exynos: Add driver for HDMI audio interface
  drm/exynos/hdmi: add 85.5MHz pixel clock for v14 HDMI PHY
  drm/exynos/mixer: enable support for 1024x768 and 1280x1024 modes
  drm/exynos/hdmi: quirk for support mode timings conversion
  drm/exynos/mixer: pass actual mode on MIXER to encoder
  drm/exynos: add mode_fixup callback to exynos_drm_crtc_ops
  drm/exynos/hdmi: remove redundant mode field
  drm/exynos/mixer: remove mixer_resources sub-structure
  drm/exynos/mixer: fix mode validation code
  drm/exynos/mixer: move resolution configuration to single function
  drm/exynos/mixer: move mode commit to enable callback
  drm/exynos/mixer: abstract out output mode setup code

6 years agoMerge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux...
Dave Airlie [Mon, 13 Nov 2017 19:53:39 +0000 (05:53 +1000)]
Merge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux into drm-next

This is a shared tree between drm and audio for some amd bits.

* 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu Moving amdgpu asic types to a separate file
  ASoC: AMD: Added asic_type as ACP DMA driver platform data
  drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data

6 years agodma-buf: add reservation_object_lock_interruptible()
Christian König [Thu, 9 Nov 2017 08:59:05 +0000 (09:59 +0100)]
dma-buf: add reservation_object_lock_interruptible()

That's the only wrapper function missing and necessary to cleanup TTM.

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171109085909.1653-3-christian.koenig@amd.com
6 years agoMerge tag 'drm-misc-fixes-2017-11-13' of git://anongit.freedesktop.org/drm/drm-misc...
Dave Airlie [Mon, 13 Nov 2017 19:29:34 +0000 (05:29 +1000)]
Merge tag 'drm-misc-fixes-2017-11-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

Driver Changes:
- qxl: Use a shadow bo as primary and blit to it to fix flicker (Gerd)
- rockchip: Convert psr spinlock to mutex (Emil)

Cc: Emil Renner Berthing <kernel@esmil.dk>
Cc: Gerd Hoffmann <kraxel@redhat.com>
* tag 'drm-misc-fixes-2017-11-13' of git://anongit.freedesktop.org/drm/drm-misc:
  drm/rockchip: analogix_dp: Use mutex rather than spinlock

6 years agoMerge tag 'drm-intel-next-fixes-2017-11-10' of git://anongit.freedesktop.org/drm...
Dave Airlie [Mon, 13 Nov 2017 19:18:21 +0000 (05:18 +1000)]
Merge tag 'drm-intel-next-fixes-2017-11-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

drm/i915 fixes for v4.15

* tag 'drm-intel-next-fixes-2017-11-10' of git://anongit.freedesktop.org/drm/drm-intel:
  drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU
  drm/i915: Move init_clock_gating() back to where it was
  drm/i915: Prune the reservation shared fence array
  drm/i915: Idle the GPU before shinking everything
  drm/i915: Lock llist_del_first() vs llist_del_all()
  drm/i915: Calculate ironlake intermediate watermarks correctly, v2.
  drm/i915: Disable lazy PPGTT page table optimization for vGPU
  drm/i915/execlists: Remove the priority "optimisation"
  drm/i915: Filter out spurious execlists context-switch interrupts

6 years agoMerge tag 'drm-misc-fixes-2017-11-02' of git://anongit.freedesktop.org/drm/drm-misc...
Dave Airlie [Mon, 13 Nov 2017 19:17:23 +0000 (05:17 +1000)]
Merge tag 'drm-misc-fixes-2017-11-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

Driver Changes:
- qxl: Use a shadow bo as primary and blit to it to fix flicker (Gerd)

* tag 'drm-misc-fixes-2017-11-02' of git://anongit.freedesktop.org/drm/drm-misc:
  qxl: alloc & use shadow for dumb buffers
  drm/qxl: replace QXL_INFO with DRM_DEBUG_DRIVER

6 years agodrm/rockchip: analogix_dp: Use mutex rather than spinlock
Emil Renner Berthing [Wed, 4 Oct 2017 17:53:46 +0000 (19:53 +0200)]
drm/rockchip: analogix_dp: Use mutex rather than spinlock

On the Samsung Chromebook Plus I get this error with 4.14-rc3:

BUG: scheduling while atomic: kworker/3:1/50/0x00000002
Modules linked in:
CPU: 3 PID: 50 Comm: kworker/3:1 Not tainted 4.14.0-0.rc3-kevin #2
Hardware name: Google Kevin (DT)
Workqueue: events analogix_dp_psr_work
Call trace:
[<ffffff80080873b0>] dump_backtrace+0x0/0x320
[<ffffff80080876e4>] show_stack+0x14/0x20
[<ffffff8008606d38>] dump_stack+0x9c/0xbc
[<ffffff80080c6b5c>] __schedule_bug+0x4c/0x70
[<ffffff80086188c0>] __schedule+0x3f0/0x458
[<ffffff8008618960>] schedule+0x38/0xa0
[<ffffff800861c20c>] schedule_hrtimeout_range_clock+0x84/0xe8
[<ffffff800861c2a0>] schedule_hrtimeout_range+0x10/0x18
[<ffffff800861bcec>] usleep_range+0x64/0x78
[<ffffff8008415a6c>] analogix_dp_transfer+0x16c/0x340
[<ffffff8008412550>] analogix_dpaux_transfer+0x10/0x18
[<ffffff80083ceb14>] drm_dp_dpcd_access+0x4c/0xf0
[<ffffff80083cf614>] drm_dp_dpcd_write+0x1c/0x28
[<ffffff8008413b98>] analogix_dp_disable_psr+0x60/0xa8
[<ffffff800840da3c>] analogix_dp_psr_work+0x4c/0x90
[<ffffff80080bb09c>] process_one_work+0x1d4/0x348
[<ffffff80080bb258>] worker_thread+0x48/0x478
[<ffffff80080c11fc>] kthread+0x12c/0x130
[<ffffff8008084290>] ret_from_fork+0x10/0x18

Changing rockchip_dp_device::psr_lock to a mutex rather
than spinlock seems to fix the issue.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171004175346.11956-1-kernel@esmil.dk
6 years agodrm/cma-helper: Remove drm_fb_cma_debugfs_show()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:48 +0000 (20:13 +0100)]
drm/cma-helper: Remove drm_fb_cma_debugfs_show()

drm_fb_cma_debugfs_show() and drm_gem_cma_describe() are superseded
by drm_framebuffer_debugfs_init() and drm_gem_cma_print_info().

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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/20171107191348.17555-13-noralf@tronnes.org
6 years agodrm/tinydrm: Use drm_gem_cma_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:47 +0000 (20:13 +0100)]
drm/tinydrm: Use drm_gem_cma_print_info()

There is a new core debugfs file that prints fb/gem info:
<debugfs>/dri/<n>/framebuffer

Use drm_gem_cma_print_info() to provide info to that output instead
of using drm_fb_cma_debugfs_show().

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-12-noralf@tronnes.org
6 years agodrm/tilcdc: Use drm_gem_cma_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:46 +0000 (20:13 +0100)]
drm/tilcdc: Use drm_gem_cma_print_info()

There is a new core debugfs file that prints fb/gem info:
<debugfs>/dri/<n>/framebuffer

Use drm_gem_cma_print_info() to provide info to that output instead
of using drm_fb_cma_debugfs_show().

Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-11-noralf@tronnes.org
6 years agodrm/arm/hdlcd: Use drm_gem_cma_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:45 +0000 (20:13 +0100)]
drm/arm/hdlcd: Use drm_gem_cma_print_info()

There is a new core debugfs file that prints fb/gem info:
<debugfs>/dri/<n>/framebuffer

Use drm_gem_cma_print_info() to provide info to that output instead
of using drm_fb_cma_debugfs_show().

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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-10-noralf@tronnes.org
6 years agodrm/arc: Use drm_gem_cma_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:44 +0000 (20:13 +0100)]
drm/arc: Use drm_gem_cma_print_info()

There is a new core debugfs file that prints fb/gem info:
<debugfs>/dri/<n>/framebuffer

Use drm_gem_cma_print_info() to provide info to that output instead
of using drm_fb_cma_debugfs_show().

Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-9-noralf@tronnes.org
6 years agodrm/cma-helper: Add drm_gem_cma_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:43 +0000 (20:13 +0100)]
drm/cma-helper: Add drm_gem_cma_print_info()

Add drm_gem_cma_print_info() for debugfs printing
struct drm_gem_cma_object specific info.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-8-noralf@tronnes.org
6 years agodrm/cma-helper: Turn to_drm_gem_cma_obj() into a macro
Noralf Trønnes [Tue, 7 Nov 2017 19:13:42 +0000 (20:13 +0100)]
drm/cma-helper: Turn to_drm_gem_cma_obj() into a macro

This allows the argument to be a const.

The other option was to keep it an inline function and make the argument
a const:

static inline struct drm_gem_cma_object *
to_drm_gem_cma_obj(const struct drm_gem_object *gem_obj)
{
return container_of(gem_obj, struct drm_gem_cma_object, base);
}

This will happily return a non-const pointer to the drm_gem_cma_object
based on a const pointer to the contained drm_gem_object, thus creating
const-safety problems.

There was an attempt to fix the problem in the container_of() macro
itself (see https://lkml.org/lkml/2017/5/19/381) but the patch seems to
have fallen through the cracks. It would require turning this inline
function into a macro.

By making this a macro now, we will benefit from a possible future
enhancement of container_of(). We don't loose type checking by doing
this, container_of() takes care of that.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-7-noralf@tronnes.org
6 years agodrm/atomic: Use drm_framebuffer_print_info()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:41 +0000 (20:13 +0100)]
drm/atomic: Use drm_framebuffer_print_info()

Use drm_framebuffer_print_info() to print framebuffer info in
drm_atomic_plane_print_state(). This will give optional GEM info as well.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-6-noralf@tronnes.org
6 years agodrm/framebuffer: Add framebuffer debugfs file
Noralf Trønnes [Tue, 7 Nov 2017 19:13:40 +0000 (20:13 +0100)]
drm/framebuffer: Add framebuffer debugfs file

Add debugfs file that dumps info about the framebuffers and its planes.
Also dump info about any connected gem object(s).

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-5-noralf@tronnes.org
6 years agodrm/print: Add drm_printf_indent()
Noralf Trønnes [Tue, 7 Nov 2017 19:13:39 +0000 (20:13 +0100)]
drm/print: Add drm_printf_indent()

Add drm_printf_indent() that adds tab indentation according to argument.
Indentation overflow is marked with an X.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-4-noralf@tronnes.org
6 years agodrm/framebuffer: drm_framebuffer_read_refcount() constify argument
Noralf Trønnes [Tue, 7 Nov 2017 19:13:38 +0000 (20:13 +0100)]
drm/framebuffer: drm_framebuffer_read_refcount() constify argument

Constify argument so functions calling into this take a const argument.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-3-noralf@tronnes.org
6 years agodrm/vma-manager: drm_vma_node_start() constify argument
Noralf Trønnes [Tue, 7 Nov 2017 19:13:37 +0000 (20:13 +0100)]
drm/vma-manager: drm_vma_node_start() constify argument

Constify argument so functions calling into this take a const argument.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-2-noralf@tronnes.org
6 years agovirtgpu: remove redundant task_comm copying
Michał Mirosław [Thu, 31 Aug 2017 18:06:12 +0000 (20:06 +0200)]
virtgpu: remove redundant task_comm copying

Remove redundant task name copying because:

1. task->comm is already NUL-terminated
2. virtio_gpu_context_create() trims passed dbgname anyway

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: http://patchwork.freedesktop.org/patch/msgid/588612bbc672e8b598e10f79fcbc041122e844ba.1504202471.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agodrm: qxl: remove pr_info message, stops log spamming
Colin Ian King [Tue, 12 Sep 2017 17:34:22 +0000 (18:34 +0100)]
drm: qxl: remove pr_info message, stops log spamming

Simply mmap'ing /dev/dri/card0 repeatedly will spam the kernel
log with qxl_mmap information messages. The following example code
illustrates this:

int main(void)
{
int fd = open("/dev/dri/card0", O_RDONLY);
if (fd == -1)
err(1, "open failed");

for (;;) {
void *m = mmap(NULL, 4096, PROT_READ,
MAP_SHARED, fd, 0);
if (m != MAP_FAILED)
munmap(m, 4096);
}
}

Stop the spamming by removing the pr_info message. Since the mmap'ing
returns -EINVAL there is no need for the pr_info message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170912173422.14062-1-colin.king@canonical.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agodrm/cirrus: add create_handle support.
Lepton Wu [Wed, 8 Nov 2017 18:55:37 +0000 (10:55 -0800)]
drm/cirrus: add create_handle support.

Add create_handle support to cirrus fb. Without this, screenshot tool
in chromium OS can't work.

Signed-off-by: Lepton Wu <ytht.net@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20171108185537.56167-1-ytht.net@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agodrm/virtio: add create_handle support.
Lepton Wu [Wed, 8 Nov 2017 18:42:09 +0000 (10:42 -0800)]
drm/virtio: add create_handle support.

Add create_handle support to virtio fb. Without this, screenshot tool
in chromium OS can't work.

Signed-off-by: Lepton Wu <ytht.net@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20171108184209.46211-1-ytht.net@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agodrm/mode_object: fix documentation for object lookups.
Dave Airlie [Wed, 8 Nov 2017 23:35:04 +0000 (09:35 +1000)]
drm/mode_object: fix documentation for object lookups.

The lease updates missed a few bits of docs, fixed up
the wrong name on the property lookup fn as well.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agodma-buf: Use rcu_assign_pointer() to set rcu protected pointers
Ville Syrjälä [Thu, 2 Nov 2017 20:03:36 +0000 (22:03 +0200)]
dma-buf: Use rcu_assign_pointer() to set rcu protected pointers

Use rcu_assign_pointer() when setting an rcu protected pointer.
This gets rid of another sparse warning.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-5-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>.
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
6 years agodrm/syncobj: Use proper methods for accessing rcu protected pointers
Ville Syrjälä [Thu, 2 Nov 2017 20:03:35 +0000 (22:03 +0200)]
drm/syncobj: Use proper methods for accessing rcu protected pointers

Use rcu_dereference_protected() and rcu_assign_pointer() for accessing
the rcu protected syncobj->fence pointer. This eliminates several sparse
warnings.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-4-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
6 years agodma-buf/fence: Sparse wants __rcu on the object itself
Chris Wilson [Thu, 2 Nov 2017 20:03:34 +0000 (22:03 +0200)]
dma-buf/fence: Sparse wants __rcu on the object itself

In order to silence sparse in dma_fence_get_rcu_safe(), we need to mark
the incoming fence object as being RCU protected and not the pointer to
the object.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-3-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
[vsyrjala: s/silent/silence/ in commit message]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
6 years agodrm/syncobj: Mark up the fence as an RCU protected pointer
Chris Wilson [Thu, 2 Nov 2017 20:03:33 +0000 (22:03 +0200)]
drm/syncobj: Mark up the fence as an RCU protected pointer

We take advantage of that syncobj->fence is an RCU-protected pointer, and
so sparse complains that it is lacking annotation.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
6 years agodrm/vc4: Reject HDMI modes with too high of clocks.
Eric Anholt [Wed, 20 Sep 2017 22:59:34 +0000 (15:59 -0700)]
drm/vc4: Reject HDMI modes with too high of clocks.

Peter Robinson reported issues on Fedora with 4k monitors not having
their modes filtered down to 1920x1080 on Raspberry Pi.

v2: Fix vc5 typo in place of vc4.

Cc: Peter Robinson <pbrobinson@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170920225935.14566-1-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
6 years agodrm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU
Chris Wilson [Thu, 9 Nov 2017 08:55:40 +0000 (08:55 +0000)]
drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU

When we close the VMA, we unbind it from the ppgtt and tear down the
page directory pointing at it. That may trigger us to return WC pages
back to the system, requiring conversion back to WB which itself may
sleep. That makes i915_vma_close() unsuitable for use inside the RCU
read lock, which we need to hold to iterate the radixtree.

The fix is quite simple, we can close all the VMA as we close the ppgtt,
we only need to do that instead of closing them during destruction of
the LUT.

v2: Order between closing the LUT and the ppgtt is important; we use the
vma inside the LUT as a means of retrieving the object, and so we must
clear the LUT before freeing the VMA when closing the ppgtt.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103638
Fixes: 547da76b5777 ("drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr)")
Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171109085540.32264-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
(cherry picked from commit 94dec87159af6f3dcc0b78d3f909aefa9e29c01a)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Move init_clock_gating() back to where it was
Ville Syrjälä [Wed, 8 Nov 2017 13:35:55 +0000 (15:35 +0200)]
drm/i915: Move init_clock_gating() back to where it was

Apparently setting up a bunch of GT registers before we've properly
initialized the rest of the GT hardware leads to these setting being
lost. So looks like I broke HSW with commit b7048ea12fbb ("drm/i915:
Do .init_clock_gating() earlier to avoid it clobbering watermarks")
by doing init_clock_gating() too early. This should actually affect
other platforms as well, but apparently not to such a great degree.

What I was ultimately after in that commit was to move the
ilk_init_lp_watermarks() call earlier. So let's undo the damage and
move init_clock_gating() back to where it was, and call
ilk_init_lp_watermarks() just before the watermark state readout.

This highlights how fragile and messed up our init order really is.
I wonder why we even initialize the display before gem. The opposite
order would make much more sense to me...

v2: Keep WaRsPkgCStateDisplayPMReq:hsw early as it really must
    be done before all planes might get disabled.

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mark Janes <mark.a.janes@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reported-by: Mark Janes <mark.a.janes@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103549
Fixes: b7048ea12fbb ("drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks")
References: https://lists.freedesktop.org/archives/intel-gfx/2017-November/145432.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171108133555.14091-1-ville.syrjala@linux.intel.com
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit f72b84c677d61f201b869223a8d6e389c7bb7d3d)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Prune the reservation shared fence array
Chris Wilson [Tue, 7 Nov 2017 22:06:56 +0000 (22:06 +0000)]
drm/i915: Prune the reservation shared fence array

The shared fence array is not autopruning and may continue to grow as an
object is shared between new timelines. Take the opportunity when we
think the object is idle (we have to confirm that any external fence is
also signaled) to decouple all the fences.

We apply a similar trick after waiting on an object, see commit
e54ca9774777 ("drm/i915: Remove completed fences after a wait")

v2: No longer need to handle the batch pool as a special case.
v3: Need to trylock from within i915_vma_retire as this may be called
form the shrinker - and we may later try to allocate underneath the
reservation lock, so a deadlock is possible.

References: https://bugs.freedesktop.org/show_bug.cgi?id=102936
Fixes: d07f0e59b2c7 ("drm/i915: Move GEM activity tracking into a common struct reservation_object")
Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107220656.5020-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit 1ab22356b37ab08a391d6f007fda4c822bef9fb5)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Idle the GPU before shinking everything
Chris Wilson [Wed, 8 Nov 2017 09:44:00 +0000 (09:44 +0000)]
drm/i915: Idle the GPU before shinking everything

The handling of contexts are peculiar. Instead of tieing their vma to
activity, we pin the context. This means that we cannot simply unbind
the context object itself at will (which would normally cause us to wait
for the vma to be idle), but must manually idle the GPU and retire
requests first.

A consequence of this peculiarity is when doing a last desperate attempt
to recover memory. If the memory is tied up inside active context
objects, we will fail to recover any memory simply by trying to unbind
the objects without first doing a wait-for-idle.

A side-effect of removing the call to shrinker_lock_uninterruptible()
from i915_gem_shrinker_oom() was that we removed an unlocked
wait-for-idle, and so lost the "natural" shrinkage of context objects.
By replacing that with a locked wait from inside i915_gem_shrink(), we
not only replace it with the ability to recover all context objects, but
do so for all i915_gem_shrink_all() callers.

v2: Switching requires request allocation, which is not permitted from
inside the shrinker as it only uses ordinary allocations.

References: https://bugs.freedesktop.org/show_bug.cgi?id=102936
Fixes: f2123818ffad ("drm/i915: Move dev_priv->mm.[un]bound_list to its own lock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171108094400.1386-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit 2f6a3783833dde63f1c08982943a8b2229b97afb)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Lock llist_del_first() vs llist_del_all()
Chris Wilson [Mon, 6 Nov 2017 11:15:08 +0000 (11:15 +0000)]
drm/i915: Lock llist_del_first() vs llist_del_all()

An oversight in commit 87701b4b5593 ("drm/i915: Only free the oldest
stale object before a fresh allocation") was that not only do we have to
serialise concurrent users of llist_del_first(), but we also have to
lock llist_del_first() vs llist_del_all().

From llist.h,

 * This can be summarized as follows:
 *
 *           |   add    | del_first |  del_all
 * add       |    -     |     -     |     -
 * del_first |          |     L     |     L
 * del_all   |          |           |     -
 *
 * Where, a particular row's operation can happen concurrently with a column's
 * operation, with "-" being no lock needed, while "L" being lock is needed.

This should hopefully explain:

<4>[   89.287106] general protection fault: 0000 [#1] PREEMPT SMP
<4>[   89.287126] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core r8169 mii mei_me mei snd_pcm prime_numbers i2c_hid pinctrl_geminilake pinctrl_intel
<4>[   89.287226] CPU: 2 PID: 23 Comm: ksoftirqd/2 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3315+ #1
<4>[   89.287247] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017
<4>[   89.287270] task: ffff88017ab34ec0 task.stack: ffffc90000128000
<4>[   89.287290] RIP: 0010:llist_add_batch+0x4/0x20
<4>[   89.287301] RSP: 0018:ffffc9000012bdb8 EFLAGS: 00010296
<4>[   89.287314] RAX: ffffffff811017ad RBX: 6e468801a1560000 RCX: ef3e53fceecdeb81
<4>[   89.287330] RDX: 6e468801a1566130 RSI: ffff880103d73d98 RDI: ffff880103d73d98
<4>[   89.287346] RBP: ffffc9000012bdb8 R08: ffff88017ab35780 R09: 0000000000000000
<4>[   89.287361] R10: ffffc9000012bd68 R11: 00000000abb18c3d R12: ffffffffa01369e0
<4>[   89.287377] R13: ffff88017fd1b8f8 R14: ffff88017ab34ec0 R15: 000000000000000a
<4>[   89.287393] FS:  0000000000000000(0000) GS:ffff88017fd00000(0000) knlGS:0000000000000000
<4>[   89.287411] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[   89.287424] CR2: 00007ff0c0755018 CR3: 000000016df9b000 CR4: 00000000003406e0
<4>[   89.287440] Call Trace:
<4>[   89.287511]  __i915_gem_free_object_rcu+0x20/0x40 [i915]
<4>[   89.287527]  rcu_process_callbacks+0x27a/0x730
<4>[   89.287544]  __do_softirq+0xc0/0x4ae
<4>[   89.287559]  ? smpboot_thread_fn+0x2d/0x280
<4>[   89.287571]  run_ksoftirqd+0x1f/0x70
<4>[   89.287582]  smpboot_thread_fn+0x18a/0x280
<4>[   89.287595]  kthread+0x114/0x150
<4>[   89.287605]  ? sort_range+0x30/0x30
<4>[   89.287615]  ? kthread_create_on_node+0x40/0x40
<4>[   89.287628]  ret_from_fork+0x27/0x40
<4>[   89.287641] Code: 0d 48 83 ea 01 4c 89 c1 48 83 fa ff 74 12 48 23 0c d7 74 ed 48 c1 e2 06 48 0f bd c9 48 8d 04 0a 5d c3 90 90 90 90 90 55 48 89 e5 <48> 8b 0a 48 89 0e 48 89 c8 f0 48 0f b1 3a 48 39 c1 75 ed 48 85
<1>[   89.287774] RIP: llist_add_batch+0x4/0x20 RSP: ffffc9000012bdb8
<4>[   89.287826] ---[ end trace e775d15174d8ae02 ]---

(Lockless lists are only easy (and lockless) when only using
llist_add/llist_del_all!)

Fixes: 87701b4b5593 ("drm/i915: Only free the oldest stale object before
a fresh allocation")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171106111508.11941-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
(cherry picked from commit f991c492aa55fb1c6834882c5d786d5bb3b25f07)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Calculate ironlake intermediate watermarks correctly, v2.
Maarten Lankhorst [Thu, 19 Oct 2017 15:13:41 +0000 (17:13 +0200)]
drm/i915: Calculate ironlake intermediate watermarks correctly, v2.

The watermarks it should calculate against are the old optimal watermarks.
The currently active crtc watermarks are pure fiction, and are invalid in
case of a nonblocking modeset, page flip enabling/disabling planes or any
other reason.

When the crtc is disabled or during a modeset the intermediate watermarks
don't need to be programmed separately, and could be directly assigned
to the optimal watermarks.

Changes since v1:
- Use intel_atomic_get_old_crtc_state. (ville)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171019151341.4579-2-maarten.lankhorst@linux.intel.com
[mlankhorst: Add cc stable and bugzilla link, since previous patch doesn't fix issue by itself]
Cc: stable@vger.kernel.org #v4.8+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102373
(cherry picked from commit b6b178a77210055b153dbc175e4468bd3c7122df)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Disable lazy PPGTT page table optimization for vGPU
Joonas Lahtinen [Mon, 23 Oct 2017 15:32:09 +0000 (18:32 +0300)]
drm/i915: Disable lazy PPGTT page table optimization for vGPU

When running under virtualization (vGPU active), we must disable
the lazy PPGTT page table initialization optimization introduced by
commit 14826673247e ("drm/i915: Only initialize partially filled
pagetables").

We must do this because GVT-g makes unduly assumptions about guest
behaviour, which this optimization breaks. This results in following
looking errors in the host:

ERROR gvt: guest page write error -22, gfn 0x7ada8, pa 0x7ada89a8, var 0x6, len 1

The real fix is to not to depend on i915 driver behaviour, but instead
either rely on only the contracts that i915 has with the hardware, or
add some paravirtualization. While the real fix is en route, it won't
be finished in time for 4.15, so the best option is to disable the
optimization for now when vGPU is active to avoid breaking 4.15 guests
in existing VM environments.

Fixes: 14826673247e ("drm/i915: Only initialize partially filled pagetables")
Suggested-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
[Joonas: Rewrote the commit message and added tags.]
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171023153209.10527-1-joonas.lahtinen@linux.intel.com
(cherry picked from commit 22a8a4fc93b14b5a8cfc785edbdc6f7bd98bffb6)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915/execlists: Remove the priority "optimisation"
Chris Wilson [Tue, 24 Oct 2017 11:55:01 +0000 (12:55 +0100)]
drm/i915/execlists: Remove the priority "optimisation"

Originally we set the priority to max upon inserting the request into
the execlists queue (and removing it from the scheduler lists). We could
then use the prio==INT_MAX as a shortcut within execlists_schedule() to
detect the end of the dependency chain. Since commit 1f181225f8ec
("drm/i915/execlists: Keep request->priority for its lifetime") this is
no longer true as we use the request completion as an indicator the
schedule dependency chain is complete instead. (This allows us to then
reschedule requests even when its context is in flight.) However, this
makes the GEM_BUG_ON() inside execlists_schedule() racy as we may change
the rq->prio at the same time. As the assertion is useful, let's keep
the assertion and remove the micro-optimisation.

Fixes: 1f181225f8ec ("drm/i915/execlists: Keep request->priority for its lifetime")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171024115501.21033-1-chris@chris-wilson.co.uk
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
(cherry picked from commit 64b80085dd3603d401fc05879f700b86a3a5c8e8)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm/i915: Filter out spurious execlists context-switch interrupts
Chris Wilson [Mon, 23 Oct 2017 21:32:36 +0000 (22:32 +0100)]
drm/i915: Filter out spurious execlists context-switch interrupts

Back in commit a4b2b01523a8 ("drm/i915: Don't mark an execlists
context-switch when idle") we noticed the presence of late
context-switch interrupts. We were able to filter those out by looking
at whether the ELSP remained active, but in commit beecec901790
("drm/i915/execlists: Preemption!") that became problematic as we now
anticipate receiving a context-switch event for preemption while ELSP
may be empty. To restore the spurious interrupt suppression, add a
counter for the expected number of pending context-switches and skip if
we do not need to handle this interrupt to make forward progress.

v2: Don't forget to switch on for preempt.
v3: Reduce the counter to a on/off boolean tracker. Declare the HW as
active when we first submit, and idle after the final completion event
(with which we confirm the HW says it is idle), and track each source
of activity separately. With a finite number of sources, it should aide
us in debugging which gets stuck.

Fixes: beecec901790 ("drm/i915/execlists: Preemption!")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171023213237.26536-3-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
(cherry picked from commit 4a118ecbe99c93cf9f9582e83a88d03f18d6cb84)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 years agodrm: Update docs for legacy kms state
Daniel Vetter [Wed, 8 Nov 2017 20:30:07 +0000 (21:30 +0100)]
drm: Update docs for legacy kms state

Point at the equivalent atomic state and explain that atomic drivers
shouldn't really depend upon legacy state.

Motivated by questions from Manasi about how this all is supposed to
work.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171108203007.12274-1-daniel.vetter@ffwll.ch
6 years agoMerge tag 'drm-misc-next-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm...
Dave Airlie [Thu, 9 Nov 2017 01:59:30 +0000 (11:59 +1000)]
Merge tag 'drm-misc-next-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

4.15 merge window fixes, round 2:

randconfig fix from Arnd, plus the vblank WARN_ON fix from Ville.

* tag 'drm-misc-next-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-misc:
  drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug
  drm/rockchip: add CONFIG_OF dependency for lvds

6 years agoMerge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 9 Nov 2017 01:14:47 +0000 (11:14 +1000)]
Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next

A few more fixes for 4.15.

* 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu: use irq-safe lock for kiq->ring_lock
  drm/amdgpu: bypass lru touch for KIQ ring submission
  drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()
  drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
  drm/amd/powerplay: initialize a variable before using it
  drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels
  drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

6 years agodrm/amdgpu: use irq-safe lock for kiq->ring_lock
pding [Tue, 7 Nov 2017 06:32:36 +0000 (14:32 +0800)]
drm/amdgpu: use irq-safe lock for kiq->ring_lock

This lock is used during register accessing in SRIOV guest.
The register accessing could happen both in irq enabled and
irq disabled cases. Always use irq-safe lock.

Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: bypass lru touch for KIQ ring submission
Pixel Ding [Wed, 8 Nov 2017 02:20:01 +0000 (10:20 +0800)]
drm/amdgpu: bypass lru touch for KIQ ring submission

KIQ ring submission is used for register accessing on SRIOV
VF that could happen both in irq enabled and irq disabled cases.
Inversion lock could happen on adev->ring_lru_list_lock, while
this operation is useless and just adds overhead in this use
case.

Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()
Dan Carpenter [Sat, 30 Sep 2017 08:14:13 +0000 (11:14 +0300)]
drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()

After commit ea09729c9302 ("drm/amdgpu: rework page directory filling
v2") then it becomes a lot harder to verify that "r" is initialized.  My
static checker complains and so I've reviewed the code.  It does look
like it might be buggy... Anyway, it doesn't hurt to set "r" to zero
at the start.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
6 years agodrm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
Dan Carpenter [Sat, 30 Sep 2017 08:13:28 +0000 (11:13 +0300)]
drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()

We shifted some code around in commit 9cca0b8e5df0 ("drm/amdgpu: move
amdgpu_cs_sysvm_access_required into find_mapping") and now my static
checker complains that "r" might not be initialized at the end of the
function.  I've reviewed the code, and that seems possible, but it's
also possible I may have missed something.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
6 years agodrm: sti: remove vtg_remove
Benjamin Gaignard [Wed, 8 Nov 2017 13:50:45 +0000 (14:50 +0100)]
drm: sti: remove vtg_remove

vtg_remove does nothing just remove it

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1510146367-25329-1-git-send-email-benjamin.gaignard@linaro.org
6 years agodrm: sti: remove useless fields from vtg structure
Benjamin Gaignard [Wed, 8 Nov 2017 13:50:14 +0000 (14:50 +0100)]
drm: sti: remove useless fields from vtg structure

Drivers are registered on platform bus so the private list
could be replace by a call to of_find_device_by_node().
Changing this also makes dev, np and link fields useless
in vtg structure.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1510146255-24982-1-git-send-email-benjamin.gaignard@linaro.org
6 years agodrm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.
Maarten Lankhorst [Wed, 1 Nov 2017 15:04:33 +0000 (16:04 +0100)]
drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.

This introduces a slight behavioral change to rmfb. Instead of
disabling a crtc when the primary plane is disabled, we try to
preserve it.

Apart from old versions of the vmwgfx xorg driver, there is
nothing depending on rmfb disabling a crtc.

Vmwgfx' and simple kms helper atomic implementation rejects CRTC
enabled without plane, so we can do this safely.

If the atomic commit is rejected by the driver then we will still
fall back to the old behavior and turn off the crtc.

Changes since v1:
- Restart completely when rmfb with crtc on fails (Sean Paul).

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101150433.10777-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/amd/powerplay: initialize a variable before using it
Nicolas Iooss [Sun, 3 Sep 2017 12:00:57 +0000 (14:00 +0200)]
drm/amd/powerplay: initialize a variable before using it

Function vega10_apply_state_adjust_rules() only initializes
stable_pstate_sclk_dpm_percentage when
data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1
and 100. The variable is then used to compute stable_pstate_sclk, which
therefore uses an uninitialized value.

Fix this by initializing stable_pstate_sclk_dpm_percentage to
data->registry_data.stable_pstate_sclk_dpm_percentage.

This issue has been found while building the kernel with clang. The
compiler reported a -Wsometimes-uninitialized warning.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Fixes: f83a9991648b ("drm/amd/powerplay: add Vega10 powerplay support (v5)")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory...
Evan Quan [Mon, 6 Nov 2017 02:33:45 +0000 (10:33 +0800)]
drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels

Signed-off-by: Evan Quan <evan.quan@amd.com>
Tested-and-Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/amdgpu: fix evicted VRAM bo adjudgement condition
Roger He [Thu, 2 Nov 2017 05:14:27 +0000 (13:14 +0800)]
drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoMerge tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm...
Dave Airlie [Tue, 7 Nov 2017 19:22:49 +0000 (05:22 +1000)]
Merge tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

Fixes for 4.15 merge window:

Just the cherry-picked vc4 fix plus a GFP_NOFAIL annotation (there's
apparently some new options in-flight to change/audit
too-small-to-fail kmalloc semantics or something like that).

* tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm-misc:
  drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
  drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

6 years agodrm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug
Ville Syrjälä [Mon, 23 Oct 2017 15:25:40 +0000 (18:25 +0300)]
drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug

Since commit 632c6e4edef1 ("drm/vblank: Fix flip event vblank count")
even drivers that don't implement accurate vblank timestamps will end
up using drm_crtc_accurate_vblank_count(). That leads to a WARN every
time drm_crtc_arm_vblank_event() gets called. The could be as often
as every frame for each active crtc.

Considering drm_crtc_accurate_vblank_count() is never any worse than
the drm_vblank_count() we used previously, let's just skip the WARN
unless DRM_UT_VBL is enabled. That way people won't be bothered by
this unless they're debugging vblank code. And let's also change it
to WARN_ONCE() so that even when you're debugging vblank code you
won't get drowned by constant WARNs.

Cc: stable@vger.kernel.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: "Szyprowski, Marek" <m.szyprowski@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Reported-by: Andrzej Hajda <a.hajda@samsung.com>
Fixes: 632c6e4edef1 ("drm/vblank: Fix flip event vblank count")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171023152540.15364-1-ville.syrjala@linux.intel.com
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/edid: make drm_edid_to_eld() static
Jani Nikula [Wed, 1 Nov 2017 14:21:03 +0000 (16:21 +0200)]
drm/edid: make drm_edid_to_eld() static

This is no longer needed outside of drm_edid.c.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9c0be7b97d0144ed0419c87ac42b30f5835ca7e6.1509545641.git.jani.nikula@intel.com
6 years agodrm/drivers: drop redundant drm_edid_to_eld() calls
Jani Nikula [Wed, 1 Nov 2017 14:21:02 +0000 (16:21 +0200)]
drm/drivers: drop redundant drm_edid_to_eld() calls

drm_add_edid_modes() now fills in the ELD automatically, so the calls to
drm_edid_to_eld() are redundant. Remove them.

All the other places are obvious, but nv50 has detached
drm_edid_to_eld() from the drm_add_edid_modes() call.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0959ca02b983afc9e74dd9acd190ba6e25f21678.1509545641.git.jani.nikula@intel.com
6 years agodrm/edid: build ELD in drm_add_edid_modes()
Jani Nikula [Wed, 1 Nov 2017 14:21:01 +0000 (16:21 +0200)]
drm/edid: build ELD in drm_add_edid_modes()

Call drm_edid_to_eld() from drm_add_edid_modes() to fill in the ELD
automatically. There's no harm in doing this for connectors that do not
support audio.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/551b2e1cf19be04c510e7865d7539cfc2f54ea89.1509545641.git.jani.nikula@intel.com