]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
6 years agodrm: add backwards compatibility support for drm_kms_helper.edid_firmware
Jani Nikula [Mon, 18 Sep 2017 18:20:03 +0000 (21:20 +0300)]
drm: add backwards compatibility support for drm_kms_helper.edid_firmware

Add drm_kms_helper.edid_firmware module parameter with param ops hooks
to set drm.edid_firmware instead, for backwards compatibility.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170918182003.22238-2-jani.nikula@intel.com
6 years agodrm: handle override and firmware EDID at drm_do_get_edid() level
Jani Nikula [Tue, 12 Sep 2017 08:19:26 +0000 (11:19 +0300)]
drm: handle override and firmware EDID at drm_do_get_edid() level

Handle debugfs override edid and firmware edid at the low level to
transparently and completely replace the real edid. Previously, we
practically only used the modes from the override EDID, and none of the
other data, such as audio parameters.

This change also prevents actual EDID reads when the EDID is to be
overridden, but retains the DDC probe. This is useful if the reason for
preferring override EDID are problems with reading the data, or
corruption of the data.

Move firmware EDID loading from helper to core, as the functionality
moves to lower level as well. This will result in a change of module
parameter from drm_kms_helper.edid_firmware to drm.edid_firmware, which
arguably makes more sense anyway.

Some future work remains related to override and firmware EDID
validation. Like before, no validation is done for override EDID. The
firmware EDID is validated separately in the loader. Some unification
and deduplication would be in order, to validate all of them at the
drm_do_get_edid() level, like "real" EDIDs.

v2: move firmware loading to core

v3: rebase, commit message refresh

Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1e8a710bcac46e5136c1a7b430074893c81f364a.1505203831.git.jani.nikula@intel.com
6 years agodrm/dp: DPCD register defines for link status within ESI field
Dhinakaran Pandiyan [Thu, 14 Sep 2017 06:21:27 +0000 (23:21 -0700)]
drm/dp: DPCD register defines for link status within ESI field

Link status is available in the ESI field on devices with DPCD r1.2 or
higher. DP spec also says "An MST upstream device shall use this field
instead of the Link/Sink Device Status field registers, starting from DPCD
Address 00200h."

v2: Prefixed DP_ (Jani)
    Rewrote commment to stay within 80 cols.
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170914062127.12047-1-dhinakaran.pandiyan@intel.com
6 years agodrm/rockchip: Replace dev_* with DRM_DEV_*
Haneen Mohammed [Fri, 15 Sep 2017 08:36:03 +0000 (02:36 -0600)]
drm/rockchip: Replace dev_* with DRM_DEV_*

This patch replace instances of dev_info/err/debug with
DRM_DEV_INFO/ERROR/WARN respectively inorder to use a drm-formatted
specific log messages. Issue corrected with the help of the following
Coccinelle script:

@r@
@@

(
-dev_info
+DRM_DEV_INFO
|
-dev_err
+DRM_DEV_ERROR
|
-dev_dbg
+DRM_DEV_DEBUG
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170915083603.GA18992@Haneen
6 years agodrm/tinydrm: Drop driver registered message
Noralf Trønnes [Fri, 8 Sep 2017 15:07:26 +0000 (17:07 +0200)]
drm/tinydrm: Drop driver registered message

No need to put out a driver registered message since drm_dev_register()
does that now. SPI speed is an important metric when dealing with
display problems, so retain that info.

Cc: David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1504883250-43487-8-git-send-email-noralf@tronnes.org
6 years agodrm/gem-fb-helper: Use debug message on gem lookup failure
Noralf Trønnes [Mon, 11 Sep 2017 16:37:45 +0000 (18:37 +0200)]
drm/gem-fb-helper: Use debug message on gem lookup failure

GEM lookup failure can easily be triggered by userspace so make
it a debug message, not an error message.

Also remove unnecessary inner parentheses and fix alphabetical
struct declaration order.

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/1505147865-18194-2-git-send-email-noralf@tronnes.org
6 years agodrm/imx: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()
Noralf Trønnes [Sun, 13 Aug 2017 13:31:53 +0000 (15:31 +0200)]
drm/imx: 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: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-11-git-send-email-noralf@tronnes.org
6 years agodrm/bridge: adv7511: Constify HDMI CODEC platform data
Lars-Peter Clausen [Tue, 5 Sep 2017 12:10:18 +0000 (14:10 +0200)]
drm/bridge: adv7511: Constify HDMI CODEC platform data

The HDMI codec platform data is global driver state shared by all
instances. As such it should not be modified (and is not), to make this
explicit declare it as const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-4-lars@metafoo.de
6 years agodrm/bridge: adv7511: Enable connector polling when no interrupt is specified
Lars-Peter Clausen [Tue, 5 Sep 2017 12:10:17 +0000 (14:10 +0200)]
drm/bridge: adv7511: Enable connector polling when no interrupt is specified

Fall back to polling the connector for connect and disconnect events when
no interrupt is specified. Otherwise these events will not be noticed and
monitor hotplug does not work.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-3-lars@metafoo.de
6 years agodrm/bridge: adv7511: Remove private copy of the EDID
Lars-Peter Clausen [Tue, 5 Sep 2017 12:10:16 +0000 (14:10 +0200)]
drm/bridge: adv7511: Remove private copy of the EDID

The adv7511 driver keeps a private copy of the EDID in its driver state
struct. But this copy is only used in adv7511_get_modes() where it is also
retrieved, so there is no need to keep this extra copy around.

If a need to access the EDID elsewhere in the driver ever arises the copy
that is stored in the connector can be used. This copy is accessible
through drm_connector_get_edid().

Note, this patch removes the NULL check of the EDID before passing it to
drm_detect_hdmi_monitor(), but that is fine since the function correctly
handles the case where the EDID is NULL.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-2-lars@metafoo.de
6 years agodrm/bridge: adv7511: Properly update EDID when no EDID was found
Lars-Peter Clausen [Tue, 5 Sep 2017 12:10:15 +0000 (14:10 +0200)]
drm/bridge: adv7511: Properly update EDID when no EDID was found

Currently adv7511_get_modes() bails out early when no EDID could be
retrieved. This leaves the previous EDID in place, which is typically not
the intended behavior and might confuse applications. Instead the EDID
should be cleared when no EDID could be retrieved.

All functions that are called after the EDID check handle the case where
the EDID is NULL just fine and exhibit the expected behavior, so just drop
the check.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-1-lars@metafoo.de
6 years agodrm/crtc: Convert setcrtc ioctl locking to interruptible.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:49 +0000 (15:37 +0200)]
drm/crtc: Convert setcrtc ioctl locking to interruptible.

Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle
drm_modeset_backoff which can now fail by returning the error.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-7-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/atomic: Convert pageflip ioctl locking to interruptible.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:48 +0000 (15:37 +0200)]
drm/atomic: Convert pageflip ioctl locking to interruptible.

Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle
drm_modeset_backoff which can now fail by returning the error.

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/20170912133749.6532-6-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/legacy: Convert setplane ioctl locking to interruptible.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:47 +0000 (15:37 +0200)]
drm/legacy: Convert setplane ioctl locking to interruptible.

Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle
drm_modeset_backoff which can now fail by returning the error.

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/20170912133749.6532-5-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/legacy: Convert cursor ioctl locking to interruptible.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:46 +0000 (15:37 +0200)]
drm/legacy: Convert cursor ioctl locking to interruptible.

Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle
drm_modeset_backoff which can now fail by returning the error.

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/20170912133749.6532-4-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/atomic: Convert atomic ioctl locking to interruptible.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:45 +0000 (15:37 +0200)]
drm/atomic: Convert atomic ioctl locking to interruptible.

Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and
handle drm_modeset_backoff which can now fail by returning the error.

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/20170912133749.6532-3-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2.
Maarten Lankhorst [Tue, 12 Sep 2017 13:37:44 +0000 (15:37 +0200)]
drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2.

When we want to make drm_atomic_commit interruptible, there are a lot of
places that call the lock function, which we don't have control over.

Rather than trying to convert every single one, it's easier to toggle
interruptible waiting per acquire_ctx. If drm_modeset_acquire_init is
called with DRM_MODESET_ACQUIRE_INTERRUPTIBLE, then we will perform
interruptible waits in drm_modeset_lock and drm_modeset_backoff.

Changes since v1:
- Fix locking example in drm_modeset_lock.c to be compatible
  with interruptible waiting (xexaxo) and make it default.
  Uninterruptible waiting shouldn't happen except in corner cases,
  but the example will still apply if the flag is removed.
- Add drm_modeset_lock_single_interruptible() to documentation.
- Fix dead link to removed drm_modeset_lock_interruptible() in
  drm_modeset_lock().

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-2-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
6 years agodrm/tve200: Clean up panel bridging
Linus Walleij [Sun, 10 Sep 2017 22:08:01 +0000 (00:08 +0200)]
drm/tve200: Clean up panel bridging

This makes use of the drm_simple_display_pipe_attach_bridge()
call and removes the two calls removing the bridge, which were
erroneous: they unregister the bridge which is not what
we want, we just want to unreference it and that is already
handled by the core.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170910220801.28588-1-linus.walleij@linaro.org
6 years agodrm/doc: Update todo.rst
Daniel Vetter [Mon, 11 Sep 2017 06:51:51 +0000 (08:51 +0200)]
drm/doc: Update todo.rst

We're using this for outreachy, unfortunately someone already tried to
look at a task that was done already :-(

Update them all.

Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170911065151.22672-1-daniel.vetter@ffwll.ch
6 years agodrm/dp/mst: Sideband message transaction to power up/down nodes
Dhinakaran Pandiyan [Thu, 7 Sep 2017 00:14:58 +0000 (17:14 -0700)]
drm/dp/mst: Sideband message transaction to power up/down nodes

The POWER_DOWN_PHY and POWER_UP_PHY sideband message transactions allow
the source to reqest any node in a mst path or a whole path to be
powered down or up. This allows drivers to target a specific sink in the
MST topology, an improvement over just power managing the imediate
downstream device. Secondly, since the request-reply protocol waits for an
ACK, we can be sure that a downstream sink has enough time to respond to a
power up/down request.

v2: Fix memory leak (Lyude)
Cc: Lyude <lyude@redhat.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170907001458.9399-1-dhinakaran.pandiyan@intel.com
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
6 years agodrm: Make __drm_object_property_get_value() static
Ville Syrjälä [Fri, 1 Sep 2017 16:53:28 +0000 (19:53 +0300)]
drm: Make __drm_object_property_get_value() static

Make __drm_object_property_get_value() static to fix the following
sparse warning:
drm_mode_object.c:250:5: warning: symbol '__drm_object_property_get_value' was not declared. Should it be static?

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 4a97a3da420b ("drm: Don't update property values for atomic drivers")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-4-ville.syrjala@linux.intel.com
Reviewed-by: Thierry Reding <treding@nvidia.com>
6 years agodrm: Drop drm_get_link_status_name()
Ville Syrjälä [Fri, 1 Sep 2017 16:53:27 +0000 (19:53 +0300)]
drm: Drop drm_get_link_status_name()

drm_get_link_status_name() isn't used so kill it.

Fixes the following sparse warning:
drm_connector.c:618:1: warning: symbol 'drm_get_link_status_name' was not declared. Should it be static?

Cc: Manasi Navare <manasi.d.navare@intel.com>
Fixes: 40ee6fbef75f ("drm: Add a new connector atomic property for link status")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-3-ville.syrjala@linux.intel.com
Reviewed-by: Thierry Reding <treding@nvidia.com>
6 years agodrm: Make syncobj import/export functions static
Ville Syrjälä [Fri, 1 Sep 2017 16:53:25 +0000 (19:53 +0300)]
drm: Make syncobj import/export functions static

Fix the following sparse warnings by making functions static:
drm_syncobj.c:420:5: warning: symbol 'drm_syncobj_import_sync_file_fence' was not declared. Should it be static?
drm_syncobj.c:441:5: warning: symbol 'drm_syncobj_export_sync_file' was not declared. Should it be static?

Cc: Dave Airlie <airlied@redhat.com>
Fixes: 3ee45a3b533a ("drm/syncobj: add sync_file interaction. (v1.2)")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-1-ville.syrjala@linux.intel.com
Reviewed-by: Thierry Reding <treding@nvidia.com>
6 years agodrm/pl111: Add handling of Versatile platforms
Linus Walleij [Fri, 8 Sep 2017 12:47:09 +0000 (14:47 +0200)]
drm/pl111: Add handling of Versatile platforms

The ARM reference designs in the Versatile family: Integrator,
Versatile and RealView can make use of the new DRM driver as well.
We just need to create a bit of platform-specific code for them
that we isolate to its own file.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-7-linus.walleij@linaro.org
6 years agodrm/pl111: Add optional variant display en/disable callbacks
Linus Walleij [Fri, 8 Sep 2017 12:47:08 +0000 (14:47 +0200)]
drm/pl111: Add optional variant display en/disable callbacks

The silcon and components around the PL111 may require some
variants to perform special set-up of the display. Add two
callbacks to manage this.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-6-linus.walleij@linaro.org
6 years agodrm/pl111: Insert delay before powering up PL11x
Linus Walleij [Fri, 8 Sep 2017 12:47:07 +0000 (14:47 +0200)]
drm/pl111: Insert delay before powering up PL11x

The old codebase has a delay between enabling and powering up the
PL11x.

According to the manual for PL110, ARM DDI 0161E page 1-5 and
the PL111 manual ARM DDI 0293C page 1-6, the power sequence should
be such that once Vdd is stable (which we assume it is at boot)
LCDEN is enabled first and then CLPOWER should be enabled
"after the signals have stabilized" and this is said to
be display-dependent. The old codebase uses 20ms.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-5-linus.walleij@linaro.org
6 years agodrm/pl111: Enable PL110 variant
Linus Walleij [Fri, 8 Sep 2017 12:47:06 +0000 (14:47 +0200)]
drm/pl111: Enable PL110 variant

We detect and enable the use of the PL110 variant, an earlier
incarnation of PL111. The only real difference is that the
control and interrupt enable registers have swapped place.
The Versatile AB and Versatile PB have a variant inbetween
PL110 and PL111, it is PL110 but they have already swapped the
two registers so those two need a bit of special handling.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-4-linus.walleij@linaro.org
6 years agodrm/pl111: Replace custom connector with panel bridge
Linus Walleij [Fri, 8 Sep 2017 12:47:05 +0000 (14:47 +0200)]
drm/pl111: Replace custom connector with panel bridge

This replaces the custom connector in the PL111 with the
panel bridge helper.

This works nicely for all standard panels, but since there
are several PL11x-based systems that will need to use the dumb
VGA connector bridge we use drm_of_find_panel_or_bridge()
and make some headroom for dealing with bridges that are
not panels as well, and drop a TODO in the code.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-3-linus.walleij@linaro.org
6 years agodrm/pl111: Add all registers to debugfs
Linus Walleij [Fri, 8 Sep 2017 12:47:04 +0000 (14:47 +0200)]
drm/pl111: Add all registers to debugfs

This adds all the main control registers to the debugfs
register file. This was helpful for my debugging so it will
likely help others as well.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-2-linus.walleij@linaro.org
6 years agodrm/pl111: Cleanup local header file
Linus Walleij [Fri, 8 Sep 2017 12:47:03 +0000 (14:47 +0200)]
drm/pl111: Cleanup local header file

The header file contains prototypes for two nonexisting
functions. Get rid of them.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-1-linus.walleij@linaro.org
6 years agodrm/tilcdc: Use drm_gem_fb_create()
Noralf Trønnes [Sun, 13 Aug 2017 13:32:02 +0000 (15:32 +0200)]
drm/tilcdc: 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: 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>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-20-git-send-email-noralf@tronnes.org
6 years agodrm/sun4i: call drm_vblank_init with correct number of crtcs
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:15 +0000 (15:50 +0800)]
drm/sun4i: call drm_vblank_init with correct number of crtcs

If we want to have vblank on both pipelines at the same time, we need
to call drm_vblank_init with num_crtcs = 2.

Instead, since the crtc init calls correctly set mode_config.num_crtc,
we can move the drm_vblank_init call to after the crtc init code is
called, which is the component bind part. Then we can just pass
mode_config.num_crtc in.

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/20170908075016.18657-8-wens@csie.org
6 years agodrm/sun4i: tcon: Support backend input mux
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:14 +0000 (15:50 +0800)]
drm/sun4i: tcon: Support backend input mux

The TCON has a mux to select the source of the data to display.
This mux includes selecting the display backends. On the A31,
which has two display pipelines, this mux can let the TCON
select either backend as its data source. Although the muxing
can be changed on the fly, DRM needs to be able to group a
bunch of layers such that they get switched to another crtc
together. This is because the display backend does the layer
compositing, while the TCON generates the display timings.
This constraint is not supported by DRM.

Here we simply pair up backends and TCONs with the same ID.

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/20170908075016.18657-7-wens@csie.org
6 years agodrm/sun4i: tcon: Simplify sun4i_tcon_find_engine_traverse for one input
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:13 +0000 (15:50 +0800)]
drm/sun4i: tcon: Simplify sun4i_tcon_find_engine_traverse for one input

Now that sun4i_tcon_find_engine_traverse() usage is restricted to the
single input case, we can remove the for_each_available_child_of_node
loop.

While at it, consolidate all the of_node_put calls into a common exit
path.

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/20170908075016.18657-6-wens@csie.org
6 years agodrm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:12 +0000 (15:50 +0800)]
drm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID

The device tree binding for sun4i-drm says:

    For all connections between components up to the TCONs in the display
    pipeline, when there are multiple components of the same type at the
    same depth, the local endpoint ID must be the same as the remote
    component's index. For example, if the remote endpoint is Frontend 1,
    then the local endpoint ID must be 1.

We should be able to get the TCON's ID directly from any of the remote
endpoints from its input port. With the ID, we can then go through the
list of registered engines and find a matching one by ID.

However the A31 device tree is incorrect. We assumed that there were no
cross pipeline connections between the backends and TCONs. As a result,
in all the endpoints between the backends and TCONs of the second
display pipeline, the endpoint IDs were incorrectly set to 0, when in
fact they should've been set to 1.

To maintain compatibility with this incorrect device tree, we first
check if the TCON's input port has 1 or many endpoints. If there are
more than 1, then it is likely a fixed version, and we can proceed
with the new method. If there is only 1 endpoint, then it is possibly
an incorrect version, or it could be the SoC only has one pipeline.
In either case we fall back to using the old method of traversing
the input connections to find a matching engine, and then get its
ID.

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/20170908075016.18657-5-wens@csie.org
6 years agodrm/sun4i: tcon: Check for multiple paths between TCONs and backends
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:11 +0000 (15:50 +0800)]
drm/sun4i: tcon: Check for multiple paths between TCONs and backends

The patch b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend
by device node matching") assumed a one-to-one mapping between TCONs
and backends. This turned out wrong, as we found muxing controls in the
TCON of the A31, and undocumented usage of the backend output selector
of the A20.

Make sun4i_tcon_find_engine() bail out if the current node has multiple
input connections.

Fixes: b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend
      by device node matching")
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/20170908075016.18657-4-wens@csie.org
6 years agodrm/sun4i: add components in breadth first traversal order
Chen-Yu Tsai [Fri, 8 Sep 2017 07:50:10 +0000 (15:50 +0800)]
drm/sun4i: add components in breadth first traversal order

The encoder drivers use drm_of_find_possible_crtcs to get upstream
crtcs from the device tree using of_graph. For the results to be
correct, encoders must be probed/bound after _all_ crtcs have been
created. The existing code uses a depth first recursive traversal
of the of_graph, which means the encoders downstream of the TCON
get add right after the first TCON. The second TCON or CRTC will
never be properly associated with encoders connected to it.

Other platforms, such as Rockchip, deal with this by probing all
CRTCs first, then all subsequent components. This is easy to do
since the CRTCs correspond to just one device node, and are the
first nodes in the pipeline.

However with Allwinner SoCs, the function of the CRTC is split
between the display backend (DE 1.0) or mixer (DE 2.0), which does
scan-out and compositing, and the TCON, which generates the display
timing signals. Further complicating the process, there may be a
Dynamic Range Controller between the backend and the TCON. Also, the
backend is preceded by the frontend, with a Display Enhancement Unit
possibly in between.

In a dual display pipeline setup, both frontends can feed either
backend, and both backends can feed either TCON. We want all
components of the same type to be added before the next type in the
pipeline. Fortunately, the pipelines are perfectly symmetric, i.e.
components of the same type are at the same depth when counted from
the frontend. The only exception is the third pipeline in the A80
SoC, which we do not support anyway.

Hence we can use a breadth first search traversal order to add
components. We do not need to check for duplicates. The component
matching system handles this for us.

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/20170908075016.18657-3-wens@csie.org
6 years agodrm/sun4i: tcon: Unconditionally reset the TCON
Chen-Yu Tsai [Fri, 8 Sep 2017 09:00:16 +0000 (17:00 +0800)]
drm/sun4i: tcon: Unconditionally reset the TCON

When binding the TCON, we were checking the reset control status and
asserting reset if it wasn't in reset. The check failed to account for
the reset control API returning error codes if the status callback was
not implemented.

Since we want the TCON to be reset in all cases, use reset_control_reset
to force a reset instead.

Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
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/20170908090016.32224-1-wens@csie.org
6 years agoMAINTAINERS: sun4i-drm is now maintained in drm-misc
Maxime Ripard [Fri, 8 Sep 2017 19:40:39 +0000 (21:40 +0200)]
MAINTAINERS: sun4i-drm is now maintained in drm-misc

sun4i-drm is maintained in drm-misc as a small driver.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908194039.882-1-maxime.ripard@free-electrons.com
6 years agodma-buf/sw_sync: force signal all unsignaled fences on dying timeline
Dominik Behr [Thu, 7 Sep 2017 19:02:46 +0000 (16:02 -0300)]
dma-buf/sw_sync: force signal all unsignaled fences on dying timeline

To avoid hanging userspace components that might have been waiting on the
active fences of the destroyed timeline we need to signal with error all
remaining fences on such timeline.

This restore the default behaviour of the Android sw_sync framework, which
Android still relies on. It was broken on the dma fence conversion a few
years ago and never fixed.

v2: Do not bother with cleanup do the list (Chris Wilson)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170907190246.16425-2-gustavo@padovan.org
6 years agodrm/vc4: clean up error handling on devm_kzalloc failure
Colin Ian King [Fri, 8 Sep 2017 14:05:04 +0000 (15:05 +0100)]
drm/vc4: clean up error handling on devm_kzalloc failure

The current error handling when devm_kzalloc fails performs a
non-null check on connector which is redundant because connector
is null at that failure point.  Once this is removed, make the
failure path into a trivial -ENOMEM return to clean up the
error handling. Also remove need to initialize connector to NULL.

Detected by CoverityScan CID#1339527 ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908140504.1340-1-colin.king@canonical.com
6 years agodrm/todo: Add s/dev_*/DRM_DEV_*/ coversion to TODO
Sean Paul [Fri, 8 Sep 2017 14:32:07 +0000 (10:32 -0400)]
drm/todo: Add s/dev_*/DRM_DEV_*/ coversion to TODO

Now that we have the DRM_DEV_* variants, we should use them.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908143218.9701-1-seanpaul@chromium.org
6 years agodrm/atomic: Remove deprecated accessor macros
Maarten Lankhorst [Wed, 19 Jul 2017 14:39:20 +0000 (16:39 +0200)]
drm/atomic: Remove deprecated accessor macros

Now that the last users have been converted, we can finally get rid of
for_each_obj_in_state, we have better macros to replace them with.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20170719143920.25685-8-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/atomic: Make async plane update checks work as intended, v2.
Maarten Lankhorst [Mon, 4 Sep 2017 10:48:38 +0000 (12:48 +0200)]
drm/atomic: Make async plane update checks work as intended, v2.

By always keeping track of the last commit in plane_state, we know
whether there is an active update on the plane or not. With that
information we can reject the fast update, and force the slowpath
to be used as was originally intended.

We cannot use plane_state->crtc->state here, because this only mentions
the most recent commit for the crtc, but not the planes that were part
of it. We specifically care about what the last commit involving this
plane is, which can only be tracked with a pointer in the plane state.

Changes since v1:
- Clean up the whole function here, instead of partially earlier.
- Add mention in the commit message why we need commit in plane_state.
- Swap plane->state in intel_legacy_cursor_update, instead of
  reassigning all variables. With this commit We know that the cursor
  is not part of any active commits so this hack can be removed.

Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com
[mlankhorst: Amend commit for merge conflicts with drm-intel]

6 years agodrm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.
Maarten Lankhorst [Mon, 4 Sep 2017 10:48:37 +0000 (12:48 +0200)]
drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.

Currently we neatly track the crtc state, but forget to look at
plane/connector state.

When doing a nonblocking modeset, immediately followed by a setprop
before the modeset completes, the setprop will see the modesets new
state as the old state and free it.

This has to be solved by waiting for hw_done on the connector, even
if it's not assigned to a crtc. When a connector is unbound we take
the last crtc commit, and when it stays unbound we create a new
fake crtc commit for that gets signaled on hw_done for all the
planes/connectors.

We wait for it the same way as we do for crtc's, which will make
sure we never run into a use-after-free situation.

Changes since v1:
- Only create a single disable commit. (danvet)
- Fix leak in intel_legacy_cursor_update.
Changes since v2:
- Make reference counting in drm_atomic_helper_setup_commit
  more obvious. (pinchartl)
- Call cleanup_done for fake commit. (danvet)
- Add comments to drm_atomic_helper_setup_commit. (danvet, pinchartl)
- Add comment to drm_atomic_helper_swap_state. (pinchartl)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Testcase: kms_atomic_transition.plane-use-after-nonblocking-unbind*
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-6-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
6 years agodrm/atomic: Remove waits in drm_atomic_helper_commit_cleanup_done, v2.
Maarten Lankhorst [Mon, 4 Sep 2017 10:48:35 +0000 (12:48 +0200)]
drm/atomic: Remove waits in drm_atomic_helper_commit_cleanup_done, v2.

When commit synchronization through drm_crtc_commit was first
introduced, we tried to solve the problem of the flip_done
needing a reference count by blocking in cleanup_done.

This has been changed by commit 24835e442f28 ("drm: reference count
event->completion") which made the waits here no longer needed.

However, even after this commit we still needed the wait because
otherwise we cannot wait for the flip_done because this item might
have been removed from the list.

Changed since v1:
- Make mention of cleanup_done completing before flip_done.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-4-maarten.lankhorst@linux.intel.com
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