Commit graph

999619 commits

Author SHA1 Message Date
Joseph Kogut
304a351957 drm: remove legacy drm_pci_alloc/free abstraction
The drm_pci_alloc/free abstraction of the dma-api is no longer required,
remove it.

Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210423020248.3427369-2-joseph.kogut@gmail.com
2021-04-26 18:19:23 +02:00
Joseph Kogut
70556e24e1 drm: remove usage of drm_pci_alloc/free
Remove usage of legacy dma-api abstraction in preparation for removal

Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210423020248.3427369-1-joseph.kogut@gmail.com
2021-04-26 18:19:15 +02:00
Maxime Ripard
355b602961
Merge drm/drm-next into drm-misc-next
Christian needs some patches from drm/next

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2021-04-26 14:03:09 +02:00
Thomas Zimmermann
91185d55b3 drm: Remove DRM_KMS_FB_HELPER Kconfig option
It's only used by DRM_FBDEV_EMULATION, so inline it there.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-5-tzimmermann@suse.de
2021-04-26 12:43:20 +02:00
Thomas Zimmermann
a50e74bec1 drm/zte: Don't select DRM_KMS_FB_HELPER
Selecting DRM_FBDEV_EMULATION will include the correct settings for
fbdev emulation. Drivers should not override this.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-4-tzimmermann@suse.de
2021-04-26 12:43:04 +02:00
Thomas Zimmermann
13b29cc3a7 drm/mxsfb: Don't select DRM_KMS_FB_HELPER
Selecting DRM_FBDEV_EMULATION will include the correct settings for
fbdev emulation. Drivers should not override this.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-3-tzimmermann@suse.de
2021-04-26 12:42:57 +02:00
Thomas Zimmermann
5dbf2fc587 drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Respect DRM's kconfig setting for fbdev console emulation. If enabled,
it will select all required config options. So remove them from vmwgfx's
Kconfig file.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-2-tzimmermann@suse.de
2021-04-26 10:45:30 +02:00
Christian König
c777dc9e79 drm/ttm: move the page_alignment into the BO v2
The alignment is a constant property and shouldn't change.

v2: move documentation as well as suggested by Matthew.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-4-christian.koenig@amd.com
2021-04-23 16:23:02 +02:00
Christian König
65747ded86 drm/ttm: minor range manager coding style clean ups
No functional changes, just removing the leftovers from the redesign.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-3-christian.koenig@amd.com
2021-04-23 16:22:29 +02:00
Christian König
d02117f8ef drm/ttm: remove special handling for non GEM drivers
vmwgfx is the only driver actually using this. Move the handling into
the driver instead.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419092853.1605-1-christian.koenig@amd.com
2021-04-23 14:42:43 +02:00
Shiwu Zhang
13ea9aa1e7 drm/ttm: fix error handling if no BO can be swapped out v4
In case that all pre-allocated BOs are busy, just continue to populate
BOs since likely half of system memory in total is still free.

v4 (chk): fix code moved to VMWGFX as well

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210422115757.3946-1-christian.koenig@amd.com
2021-04-23 14:08:04 +02:00
Sia Jee Heng
ae053fa234
drm: bridge: adv7511: Support I2S IEC958 encoded PCM format
Support IEC958 encoded PCM format for ADV7511 so that ADV7511 HDMI
audio driver can accept the IEC958 data from the I2S input.

Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210422064015.15285-1-jee.heng.sia@intel.com
2021-04-23 10:30:07 +02:00
Dave Airlie
a1a1ca70de A few fixes for the next merge window, with some build fixes for anx7625
and lt8912b bridges, incorrect error handling for lt8912b and TTM, and
 one fix for TTM page limit accounting.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYIGlOAAKCRDj7w1vZxhR
 xRJzAPwNsgToXKXGoq2brUpoupZH7AB6BEaNQtjF9HGLKYpcaAD+M7+h4PdKmzlC
 ijwQTg8vHkjFRWSppSGwnH3K0wdr1gQ=
 =MKnu
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-next-fixes-2021-04-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

A few fixes for the next merge window, with some build fixes for anx7625
and lt8912b bridges, incorrect error handling for lt8912b and TTM, and
one fix for TTM page limit accounting.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210422163329.dvbuwre3akwdmzjt@gilmour
2021-04-23 13:53:07 +10:00
Lee Jones
178bdba84c drm/ttm/ttm_device: Demote kernel-doc abuses
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_device.c:42: warning: Function parameter or member 'ttm_global_mutex' not described in 'DEFINE_MUTEX'
 drivers/gpu/drm/ttm/ttm_device.c:42: warning: expecting prototype for ttm_global_mutex(). Prototype was for DEFINE_MUTEX() instead
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 'ctx' not described in 'ttm_global_swapout'
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 'gfp_flags' not described in 'ttm_global_swapout'
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: expecting prototype for A buffer object shrink method that tries to swap out the first(). Prototype was for ttm_global_swapout() instead

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-28-lee.jones@linaro.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2021-04-22 14:06:42 +02:00
Lee Jones
04be0c5b40 drm/scheduler/sched_entity: Fix some function name disparity
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/scheduler/sched_entity.c:204: warning: expecting prototype for drm_sched_entity_kill_jobs(). Prototype was for drm_sched_entity_kill_jobs_cb() instead
 drivers/gpu/drm/scheduler/sched_entity.c:262: warning: expecting prototype for drm_sched_entity_cleanup(). Prototype was for drm_sched_entity_fini() instead
 drivers/gpu/drm/scheduler/sched_entity.c:305: warning: expecting prototype for drm_sched_entity_fini(). Prototype was for drm_sched_entity_destroy() instead

Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-25-lee.jones@linaro.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2021-04-22 14:05:17 +02:00
Lee Jones
089fae1e3f drm/ttm/ttm_bo: Fix incorrectly documented function 'ttm_bo_cleanup_refs'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_bo.c:293: warning: expecting prototype for function ttm_bo_cleanup_refs(). Prototype was for ttm_bo_cleanup_refs() instead

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-24-lee.jones@linaro.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2021-04-22 14:04:28 +02:00
Beatriz Martins de Carvalho
c83b5eeffb drm: drm_connector.c: Use tabs for code indents
Remove space and use tabs for indent the code to follow the
Linux kernel coding conventions.
Problem found by checkpatch

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/0200474fbdb1149856308bccb8e467415f0b3d99.1618828127.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:46:52 +02:00
Beatriz Martins de Carvalho
6d3fb7a88d drm: drm_blend.c: Use tabs for code indents
Remove space and use tabs for indent the code to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/f441188f84aac2f9f72f36a42c88623b16cd1f87.1618828127.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:46:35 +02:00
Beatriz Martins de Carvalho
e8b0587699 drm: drm_atomic_uapi.c: Use tabs for code indents
Remove space and use tabs for indent the code to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/dc8286f5590fff609f924845fb622dd5f962a11b.1618828127.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:46:00 +02:00
Beatriz Martins de Carvalho
f0ce78e2f0 drm: drm_context.c: Adjust end of block comment
Add a new line with */ on the last line of a block comment to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/341b1ae1475fad22035cf3ff11df73cd49063d4c.1618756333.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:45:23 +02:00
Beatriz Martins de Carvalho
c2ce66dad6 drm: drm_connector.c: Adjust end of block comment
Add a new line with */ on the last line of a block comment to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/59abdb2d65a643d5937e5773db684b926e8c9233.1618756333.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:29:26 +02:00
Beatriz Martins de Carvalho
ad6ce32a81 drm: drm_bufs.c: Adjust end of block comment
Add a new line with */ on the last line of a block comment to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c3a261994b88f6fc39f69ee8c1af8ab115d76a87.1618756333.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:26:45 +02:00
Beatriz Martins de Carvalho
d00e3d9e0f drm: drm_auth.c: Adjust end of block comment
Add a new line with */ on the last line of a block comment to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/cd1e8f6637b914825ee4b9643a4e9d9eba49f276.1618756333.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:26:35 +02:00
Beatriz Martins de Carvalho
060726c593 drm: drm_atomic.c: Adjust end of block comment
Add a new line with */ on the last line of a block comment to follow the
Linux kernel coding conventions.
Problem found by checkpatch.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/387b6b852a72d6a98133cead5e4d0e3c39dd5094.1618756333.git.martinsdecarvalhobeatriz@gmail.com
2021-04-22 10:16:38 +02:00
Daniel Vetter
bbbb6fdaa3 drm/todo: Add link to old debugfs RFC
I always forget where it was, store it until this gets picked up by an
internship again.

Cc: Wambui Karuga <wambui.karugax@gmail.com>
Cc: Melissa Wen <melissa.srw@gmail.com>
Acked-by: Melissa Wen <melissa.srw@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210421152911.1871473-1-daniel.vetter@ffwll.ch
2021-04-22 01:11:39 +02:00
Krzysztof Kozlowski
1ce1af8454 drm/gma500: remove trailing whitespaces
Remove trailing whitespaces.  No functional change.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-2-krzysztof.kozlowski@canonical.com
2021-04-22 01:11:39 +02:00
Krzysztof Kozlowski
866604bbfc drm/gma500: correct kerneldoc
Correct kerneldoc (remove wrong /** marker and adjust function name) to
fix W=1 warnings:

  drivers/gpu/drm/gma500/cdv_intel_lvds.c:27: warning:
    expecting prototype for LVDS I2C backlight control macros(). Prototype was for BRIGHTNESS_MAX_LEVEL() instead

  drivers/gpu/drm/gma500/intel_gmbus.c:386: warning:
    expecting prototype for intel_gmbus_setup(). Prototype was for gma_intel_setup_gmbus() instead

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-1-krzysztof.kozlowski@canonical.com
2021-04-22 01:11:39 +02:00
Felix Kuehling
a4394b6d0a drm/ttm: Don't count pages in SG BOs against pages_limit
Pages in SG BOs were not allocated by TTM. So don't count them against
TTM's pages limit.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210414064804.29356-9-Felix.Kuehling@amd.com
2021-04-21 15:35:20 +02:00
Christian König
8a9d24f222 drm/ttm: fix return value check
The function returns the number of swapped pages here. Only abort when we get
a negative error code.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-1-christian.koenig@amd.com
2021-04-21 15:35:11 +02:00
Phong LE
f05ca10867 MAINTAINERS: add it66121 HDMI bridge driver entry
Add Neil Armstrong and myself as maintainers

Signed-off-by: Phong LE <ple@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-4-narmstrong@baylibre.com
2021-04-21 13:51:35 +02:00
Phong LE
988156dc2f drm: bridge: add it66121 driver
This commit is a simple driver for bridge HMDI it66121.
The input format is RBG and there is no color conversion.
Audio, HDCP and CEC are not supported yet.

Signed-off-by: Phong LE <ple@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-3-narmstrong@baylibre.com
2021-04-21 13:51:29 +02:00
Phong LE
b7745a160a dt-bindings: display: bridge: add it66121 bindings
Add the ITE bridge HDMI it66121 bindings.

Signed-off-by: Phong LE <ple@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-2-narmstrong@baylibre.com
2021-04-21 13:51:27 +02:00
Douglas Anderson
3235b0f20a drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare
Unpreparing and re-preparing a panel can be a really heavy
operation. Panels datasheets often specify something on the order of
500ms as the delay you should insert after turning off the panel
before turning it on again. In addition, turning on a panel can have
delays on the order of 100ms - 200ms before the panel will assert HPD
(AKA "panel ready"). The above means that we should avoid turning a
panel off if we're going to turn it on again shortly.

The above becomes a problem when we want to read the EDID of a
panel. The way that ordering works is that userspace wants to read the
EDID of the panel _before_ fully enabling it so that it can set the
initial mode correctly. However, we can't read the EDID until we power
it up. This leads to code that does this dance (like
ps8640_bridge_get_edid()):

1. When userspace requests EDID / the panel modes (through an ioctl),
   we power on the panel just enough to read the EDID and then power
   it off.
2. Userspace then turns the panel on.

There's likely not much time between step #1 and #2 and so we want to
avoid powering the panel off and on again between those two steps.

Let's use Runtime PM to help us. We'll move the existing prepare() and
unprepare() to be runtime resume() and runtime suspend(). Now when we
want to prepare() or unprepare() we just increment or decrement the
refcount. We'll default to a 1 second autosuspend delay which seems
sane given the typical delays we see for panels.

A few notes:
- It seems the existing unprepare() and prepare() are defined to be
  no-ops if called extra times. We'll preserve that behavior but may
  try to remove it in a future patch.
- This is a slight change in the ABI of simple panel. If something was
  absolutely relying on the unprepare() to happen instantly that
  simply won't be the case anymore. I'm not aware of anyone relying on
  that behavior, but if there is someone then we'll need to figure out
  how to enable (or disable) this new delayed behavior selectively.
- In order for this to work we now have a hard dependency on
  "PM". From memory this is a legit thing to assume these days and we
  don't have to find some fallback to keep working if someone wants to
  build their system without "PM".

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.7.I9e8bd33b49c496745bfac58ea9ab418bd3b6f5ce@changeid
2021-04-20 09:05:24 -07:00
Douglas Anderson
e07e21435d drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function
If we just leave the detect() function as NULL then the upper layers
assume we're always connected. There's no reason for a stub.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.6.I826adf4faeb7f39f560b387f6b380e639c6986c8@changeid
2021-04-20 08:58:36 -07:00
Douglas Anderson
54fdf37206 drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()
We prepared the panel in pre_enable() so we should unprepare it in
post_disable() to match.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.5.Ia75c9ffe2a2582393a8532d244da86f18b4c9b21@changeid
2021-04-20 08:58:24 -07:00
Douglas Anderson
4e532867e9 drm/bridge: ti-sn65dsi86: Reorder remove()
Let's make the remove() function strictly the reverse of the probe()
function so it's easier to reason about.

This patch was created by code inspection and should move us closer to
a proper remove.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.4.Ifcf1deaa372eba7eeb4f8eb516c5d15b77a657a9@changeid
2021-04-20 08:58:15 -07:00
Douglas Anderson
6b7adaeab6 drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment
A random comment inside a function had "/**" in front of it. That
doesn't make sense. Remove.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.3.I167766eeaf4c4646a3934c4dd5332decbab6bd68@changeid
2021-04-20 08:57:58 -07:00
Douglas Anderson
acf3aca5ca drm/bridge: ti-sn65dsi86: Simplify refclk handling
The clock framework makes it simple to deal with an optional clock.
You can call clk_get_optional() and if the clock isn't specified it'll
just return NULL without complaint. It's valid to pass NULL to
enable/disable/prepare/unprepare. Let's make use of this to simplify
things a tiny bit.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.2.Ic9c04f960190faad5290738b2a35d73661862735@changeid
2021-04-20 08:57:20 -07:00
Douglas Anderson
bab5cca7e6 drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()
The drm_bridge_chain_pre_enable() is not the proper opposite of
drm_bridge_chain_post_disable(). It continues along the chain to
_before_ the starting bridge. Let's fix that.

Fixes: 05193dc381 ("drm/bridge: Make the bridge chain a double-linked list")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.1.If62a003f76a2bc4ccc6c53565becc05d2aad4430@changeid
2021-04-20 08:56:44 -07:00
Neil Armstrong
a584e2c301 drm/meson: dw-hdmi: disable DW-HDMI CEC sub-driver
On the Amlogic SoCs, the DW-HDMI HW support is here but the DW-HDMI CEC signal
is not connected to a physical pin, leading to confusion when the dw-hdmi cec
controller can't communicate on the bus.

Disable it to avoid exposing a non-functinal bus.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416092737.1971876-3-narmstrong@baylibre.com
2021-04-20 17:22:44 +02:00
Jernej Skrabec
cd7f72e6e7 drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver
This adds DW-HDMI driver a glue option to disable loading of the CEC sub-driver.

On some SoCs, the CEC functionality is enabled in the IP config bits, but the
CEC bus is non-functional like on Amlogic SoCs, where the CEC config bit is set
but the DW-HDMI CEC signal is not connected to a physical pin, leading to some
confusion when the DW-HDMI CEC controller can't communicate on the bus.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416092737.1971876-2-narmstrong@baylibre.com
2021-04-20 17:22:38 +02:00
Fabio M. De Francesco
42be7ca1fd drm/drm_bufs.c: In switch, add break in default case
Added a "break" in the default case of a switch select statement.
GCC complains, although this "break" is not strictly necessary
for the code to work as expected.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210417161552.6571-1-fmdefrancesco@gmail.com
2021-04-20 10:54:22 +02:00
Daniel Vetter
7f5b18889d drm/exynos: Don't set allow_fb_modifiers explicitly
Since

commit 890880ddfd
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Date:   Fri Jan 4 09:56:10 2019 +0100

    drm: Auto-set allow_fb_modifiers when given modifiers at plane init

this is done automatically as part of plane init, if drivers set the
modifier list correctly. Which is the case here.

Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-3-daniel.vetter@ffwll.ch
2021-04-20 10:41:47 +02:00
Robert Foss
08319adbdd
drm/bridge/sii8620: fix dependency on extcon
The DRM_SIL_SII8620 kconfig has a weak `imply` dependency
on EXTCON, which causes issues when sii8620 is built
as a builtin and EXTCON is built as a module.

The symptoms are 'undefined reference' errors caused
by the symbols in EXTCON not being available
to the sii8620 driver.

Fixes: 6888384421 ("drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210419090124.153560-1-robert.foss@linaro.org
2021-04-19 20:04:30 +02:00
Christian König
ce4528daf5 drm/amdgpu: check base size instead of mem.num_pages
Drop some ussage of mem in the code.

Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-2-christian.koenig@amd.com
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2021-04-19 15:05:23 +02:00
Christian König
aeaf45c5fd drm/nouveau: use bo->base.size instead of mem->num_pages
Change a couple of cases where it makes more sense to use the base size
instead of the number of pages in the resource.

Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-1-christian.koenig@amd.com
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2021-04-19 15:05:06 +02:00
Christian König
44292a0f9d drm/ttm: warn stricter about freeing pinned BOs
So far we only warned when the BOs where pinned and not idle.

Also warn if we see a pinned BO in general.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-3-christian.koenig@amd.com
2021-04-19 14:20:40 +02:00
Christian König
e2ac853156 drm/amdgpu: freeing pinned objects is illegal now
We want to drop support in TTM for this.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-2-christian.koenig@amd.com
2021-04-19 14:20:36 +02:00
Christian König
2f40801dc5 drm/amdgpu: make sure we unpin the UVD BO
Releasing pinned BOs is illegal now.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-1-christian.koenig@amd.com
2021-04-19 14:15:50 +02:00
Adrien Grassein
5a7bd25992
drm/bridge: lt8912b: fix incorrect handling of of_* return values
A static analysis shows several issues in the driver code at
probing time.

DT parsing errors were bad handled and could lead to bugs:
  - Bad error detection;
  - Bad release of resources

Fixes: 30e2ae943c ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Dan Carpenter  <dan.carpenter@oracle.com>
Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210415183639.1487-1-rdunlap@infradead.org
Signed-off-by: Robert Foss <robert.foss@linaro.org>
2021-04-16 17:12:51 +02:00