Thomas Zimmermann
ed853f6c3f
drm/nouveau: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in nouveau.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-11-tzimmermann@suse.de
2020-09-25 09:21:07 +02:00
Thomas Zimmermann
3c9edd9c85
drm/msm: Introduce GEM object funcs
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in msm. The only exception is gem_prime_mmap,
which is non-trivial to convert.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-10-tzimmermann@suse.de
2020-09-25 09:21:03 +02:00
Thomas Zimmermann
84274de61a
drm/mediatek: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in mediatek. The only exception is gem_prime_mmap,
which is non-trivial to convert.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-9-tzimmermann@suse.de
2020-09-25 09:21:00 +02:00
Thomas Zimmermann
80cf656c25
drm/imx/dcss: Initialize DRM driver instance with CMA helper macro
...
The i.MX DCSS driver uses CMA helpers with default callback functions.
Initialize the driver structure with the rsp CMA helper macro. The
driver is being converted to use GEM object functions as part of
this change.
Two callbacks, .gem_prime_export and .gem_prime_import, were initialized
to their default implementations, so they are just kept empty now.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reported-by: kernel test robot <lkp@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-8-tzimmermann@suse.de
2020-09-25 09:20:43 +02:00
Thomas Zimmermann
10012620ea
drm/i915: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in i915.
v2:
* move object-function instance to i915_gem_object.c (Jani)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-7-tzimmermann@suse.de
2020-09-25 09:20:34 +02:00
Thomas Zimmermann
7cd467d0fc
drm/gma500: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in gma500.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-6-tzimmermann@suse.de
2020-09-25 09:20:30 +02:00
Thomas Zimmermann
a64325a1d7
drm/exynos: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in exynos. The only exception is gem_prime_mmap,
which is non-trivial to convert.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-5-tzimmermann@suse.de
2020-09-25 09:20:26 +02:00
Thomas Zimmermann
a77306278f
drm/etnaviv: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in etnaviv. The only exception is gem_prime_mmap,
which is non-trivial to convert.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-4-tzimmermann@suse.de
2020-09-25 09:20:23 +02:00
Thomas Zimmermann
ad01dd0376
drm/armada: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in armada.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Russell King <rmk+kernel@armlinux.org.uk >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-3-tzimmermann@suse.de
2020-09-25 09:20:13 +02:00
Thomas Zimmermann
246cb7e49a
drm/amdgpu: Introduce GEM object functions
...
GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in amdgpu. The only exception is gem_prime_mmap,
which is non-trivial to convert.
v3:
* remove amdgpu_object.c from patch (Christian)
v2:
* move object-function instance to amdgpu_gem.c (Christian)
* set callbacks in amdgpu_gem_object_create() (Christian)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-2-tzimmermann@suse.de
2020-09-25 09:19:42 +02:00
Tian Tao
a0d078d06e
drm/hisilicon: Features to support reading resolutions from EDID
...
Use drm_get_edid to get the resolution, if that fails, set it to
a fixed resolution. Rewrite the desrtoy callback function to release
resources.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1600778670-60370-3-git-send-email-tiantao6@hisilicon.com
2020-09-24 20:30:06 -04:00
Tian Tao
4eb4d99dfe
drm/hisilicon: Support i2c driver algorithms for bit-shift adapters
...
Adding driver implementation to support i2c driver algorithms for
bit-shift adapters, so hibmc will using the interface provided by
drm to read edid.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1600778670-60370-2-git-send-email-tiantao6@hisilicon.com
2020-09-24 20:30:05 -04:00
Antonio Borneo
880ee3b761
drm/panel: otm8009a: allow using non-continuous dsi clock
...
The panel is able to work when dsi clock is non-continuous, thus
the system power consumption can be reduced using such feature.
Add MIPI_DSI_CLOCK_NON_CONTINUOUS to panel's mode_flags.
Changes in v2:
- Added my signed-off
Signed-off-by: Antonio Borneo <antonio.borneo@st.com >
Signed-off-by: Yannick Fertre <yannick.fertre@st.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200922074253.28810-1-yannick.fertre@st.com
2020-09-24 22:38:54 +02:00
Antonio Borneo
a34ebe7e6d
drm/panel: otm8009a: remove hack to force commands in HS
...
The panel is able to receive commands in LP. The current hack to
force backlight commands in HS was due to workaround an incorrect
settings on DSI controller that prevents sending LP commands while
video out was active.
Remove the hack that forces HS commands.
Changes in v2:
- Added my signed-off
Signed-off-by: Antonio Borneo <antonio.borneo@st.com >
Signed-off-by: Yannick Fertre <yannick.fertre@st.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200922074242.28719-1-yannick.fertre@st.com
2020-09-24 22:38:50 +02:00
Xiaofei Tan
61c523b932
fbdev: mx3fb: remove unused variable 'irq'
...
Remove the variable 'irq' that is set but never used.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1600334360-4214-1-git-send-email-tanxiaofei@huawei.com
2020-09-24 22:06:16 +02:00
Yannick Fertre
fb4f3c9278
drm/panel: rm68200: allow using non-continuous dsi clock
...
The panel is able to work when dsi clock is non-continuous, thus
the system power consumption can be reduced using such feature.
Add MIPI_DSI_CLOCK_NON_CONTINUOUS to panel's mode_flags.
Signed-off-by: Antonio Borneo <antonio.borneo@st.com >
Signed-off-by: Yannick Fertre <yannick.fertre@st.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200918114736.11322-1-yannick.fertre@st.com
2020-09-24 21:49:51 +02:00
Dave Airlie
51e50e5422
drm/radeon/ttm: handle ttm moves properly
...
The core move code currently handles use_tt moves, for radeon
this was being handled also in the driver, but not using the same
paths.
If moving between TT/SYSTEM (all the use_tt paths on radeon) use
the core move function.
Eventually the core will be flipped over to calling the driver.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-5-airlied@gmail.com
2020-09-25 05:48:00 +10:00
Dave Airlie
3a08446b31
drm/amdgpu/ttm: handle tt moves properly.
...
The core move code currently handles use_tt moves, for amdgpu
this was being handled also in the driver, but not using the same
paths.
If moving between TT/SYSTEM (all the use_tt paths on amdgpu) use
the core move function.
Eventually the core will be flipped over to calling the driver.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-4-airlied@gmail.com
2020-09-25 05:48:00 +10:00
Dave Airlie
6236d953f7
drm/ttm: handle the SYSTEM->TT path in same place as others.
...
This just consolidates the code making the flow easier to understand
and also helps when moving move to the driver side.
Reviewed-by: Christian König <christian.koenig@amd.com >.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-3-airlied@gmail.com
2020-09-25 05:48:00 +10:00
Qinglang Miao
b809979f11
drm/panel: simplify the return expression of td028ttec1_prepare
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131018.91513-1-miaoqinglang@huawei.com
2020-09-24 21:41:09 +02:00
Christian König
e8c93e0c6a
drm/ttm: remove TTM_PL_FLAG_NO_EVICT
...
Not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391604/?series=81973&rev=1
2020-09-24 16:16:51 +02:00
Christian König
28578f3533
drm/ttm: remove ttm_bo_create
...
Not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391616/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
4671078eb8
drm/amdgpu: switch over to the new pin interface
...
Stop using TTM_PL_FLAG_NO_EVICT.
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391617/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
0b8793f6e7
drm/radeon: switch over to the new pin interface
...
Stop using TTM_PL_FLAG_NO_EVICT.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391610/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
9d36d43204
drm/qxl: switch over to the new pin interface
...
Stop using TTM_PL_FLAG_NO_EVICT.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
Tested-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391607/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
d582723d76
drm/vram-helper: switch over to the new pin interface
...
Stop using TTM_PL_FLAG_NO_EVICT.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391603/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
6797cea18d
drm/nouveau: switch over to the new pin interface
...
Stop using TTM_PL_FLAG_NO_EVICT.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391606/?series=81973&rev=1
2020-09-24 16:16:50 +02:00
Christian König
fbe86ca567
drm/vmwgfx: switch over to the new pin interface v2
...
Stop using TTM_PL_FLAG_NO_EVICT.
v2: fix unconditional pinning
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391601/?series=81973&rev=1
2020-09-24 16:16:49 +02:00
Christian König
b254557cb2
drm/vmwgfx: stop using ttm_bo_create v2
...
Implement in the driver instead since it is the only user of that function.
v2: fix usage of ttm_bo_init_reserved
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391614/?series=81973&rev=1
2020-09-24 16:16:49 +02:00
Christian König
a3b3bef335
drm/vmwgfx: remove unused placement combination
...
Just some dead code cleanup.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391599/?series=81973&rev=1
2020-09-24 16:16:49 +02:00
Christian König
deb0814b43
drm/ttm: add ttm_bo_pin()/ttm_bo_unpin() v2
...
As an alternative to the placement flag add a
pin count to the ttm buffer object.
v2: add dma_resv_assert_help() calls
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/391596/?series=81973&rev=1
2020-09-24 16:16:49 +02:00
Thomas Zimmermann
8e3784dfef
drm/ast: Reload gamma LUT after changing primary plane's color format
...
The gamma LUT has to be reloaded after changing the primary plane's
color format. This used to be done implicitly by the CRTC atomic_enable()
helper after updating the primary plane. With the recent reordering of
the steps, the primary plane's setup was moved last and invalidated
the gamma LUT. Fix this by setting the LUT from within atomic_flush().
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Fixes: 2f0ddd89fe ("drm/ast: Enable CRTC before planes")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Dave Airlie <airlied@redhat.com >
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200922144655.23624-1-tzimmermann@suse.de
2020-09-24 12:30:56 +02:00
Christian König
ab861424cb
drm/ttm: remove persistent_swap_storage
...
Not used any more. Cleanup the code as well while at it.
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/391079/?series=81804&rev=1
Reviewed-by: Dave Airlie <airlied@redhat.com >
2020-09-24 12:16:40 +02:00
Christian König
84d28b4717
drm/nouveau: stop using persistent_swap_storage
...
According to Ben this is most likely just a leftover.
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/391078/?series=81804&rev=1
Reviewed-by: Dave Airlie <airlied@redhat.com >
2020-09-24 12:16:36 +02:00
Jani Nikula
7d56927efa
drm/dp: add a number of DP 2.0 DPCD definitions
...
Prepare for future with DP 2.0 DPCD definitions, with a couple of
related drive-by cleanups. No functional changes.
v2: Send the version that actually builds.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200918114017.30198-2-jani.nikula@intel.com
2020-09-24 11:12:55 +03:00
Jani Nikula
6e5702980b
drm/dp: add subheadings to DPCD address definitions
...
Add the subheadings from the DP spec. No functional changes.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200918114017.30198-1-jani.nikula@intel.com
2020-09-24 11:12:32 +03:00
Dave Airlie
0ef1ed813e
drm/ttm: add bo wait that takes a ctx wrapper.
...
I'm thinking of pushing the wait into the drivers.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-6-airlied@gmail.com
2020-09-24 06:41:32 +10:00
Dave Airlie
5466186745
drm/nouveau/ttm: plumb ctx through move functions.
...
This just uses the ctx instead of passing bools and recreating it.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-5-airlied@gmail.com
2020-09-24 06:41:29 +10:00
Dave Airlie
b1ec2924aa
drm/radeon: cleanup ttm operation ctx usage.
...
Just pass it around move, and remove unused pieces
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-4-airlied@gmail.com
2020-09-24 06:41:28 +10:00
Dave Airlie
6b7741e42a
drm/qxl: kill unused bo wait wrapper
...
This wasn't used anywheere
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-3-airlied@gmail.com
2020-09-24 06:41:26 +10:00
Dave Airlie
313bbdee84
drm/radeon: kill radeon_bo_wait
...
this is unused
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-2-airlied@gmail.com
2020-09-24 06:41:23 +10:00
Daniel Vetter
9e9f605fb5
drm/doc: Document that modifiers are always required for fb
...
Even for legacy userspace, since otherwise GETFB2 is broken and if you
switch between modifier-less and modifier-aware compositors, smooth
transitions break.
Also it's just best practice to make sure modifiers are invariant for
a given drm_fb, and that a modifier-aware kms drivers only has one
place to store them, ignoring any old implicit bo flags or whatever
else might float around.
Motivated by some irc discussion with Bas about amdgpu modifier
support.
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Acked-by: Simon Ser <contact@emersion.fr >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com >
Fixes: 455e00f141 ("drm: Add getfb2 ioctl")
Cc: Daniel Stone <daniels@collabora.com >
Cc: Juston Li <juston.li@intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Cc: Marek Olšák <maraeo@gmail.com >
Cc: "Wentland, Harry" <harry.wentland@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200917164721.2038541-1-daniel.vetter@ffwll.ch
2020-09-23 17:54:03 +02:00
Christian König
db9c1734ad
drm/ttm: stop dangerous caching attribute change
...
When we swapout/in a BO we try to change the caching
attributes of the pages before/after doing the copy.
On x86 this is done by calling set_pages_uc(),
set_memory_wc() or set_pages_wb() for not highmem pages
to update the linear mapping of the page.
On all other platforms we do exactly nothing.
Now on x86 this is unnecessary because copy_highpage() will
either create a temporary mapping of the page which is wb
anyway and destroyed immediately again or use the linear
mapping with the correct caching attributes.
So stop this nonsense and just keep the caching as it is and
return an error when a driver tries to change the caching of
an already populated TT object.
This is much more defensive since changing caching
attributes is platform and driver specific and usually
doesn't work after the page was initially allocated.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/391293/
2020-09-23 15:21:05 +02:00
Christian König
4127a62049
drm/ttm: remove nonsense AGP handling
...
map_page_into_agp() and unmap_page_from_agp() are only defined on x86.
On all other platforms they are defined as noops. So this code doesn't has any effect at all.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/391292/
2020-09-23 15:16:36 +02:00
Koba Ko
ad44c03208
drm/dp_mst: Retrieve extended DPCD caps for topology manager
...
As per DP-1.3, First check DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT.
If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 1,read the DP_DP13_DPCD_REV to
get the faster capability.
If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 0,read DP_DPCD_REV.
Signed-off-by: Koba Ko <koba.ko@canonical.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
[added aux name to drm_dbg_kms() call]
Signed-off-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200922065313.4794-1-koba.ko@canonical.com
2020-09-22 14:06:20 -04:00
Qinglang Miao
9572e6693c
vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131110.93365-1-miaoqinglang@huawei.com
2020-09-22 15:20:29 +02:00
Colin Ian King
ca4bd68e11
drm/gma500: clean up indentation issues
...
There are a couple of statements that are indented too deeply,
remove the extraneous tabs and also an empty line.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200920141407.32672-1-colin.king@canonical.com
2020-09-22 15:19:28 +02:00
Thomas Zimmermann
b8f8dbf649
drm/vram-helper: Fix use of top-down placement
...
Commit 7053e0eab4 ("drm/vram-helper: stop using TTM placement flags")
cleared the BO placement flags if top-down placement had been selected.
Hence, BOs that were supposed to go into VRAM are now placed in a default
location in system memory.
Trying to scanout the incorrectly pinned BO results in displayed garbage
and an error message.
[ 146.108127] ------------[ cut here ]------------
[ 146.1V08180] WARNING: CPU: 0 PID: 152 at drivers/gpu/drm/drm_gem_vram_helper.c:284 drm_gem_vram_offset+0x59/0x60 [drm_vram_helper]
...
[ 146.108591] ast_cursor_page_flip+0x3e/0x150 [ast]
[ 146.108622] ast_cursor_plane_helper_atomic_update+0x8a/0xc0 [ast]
[ 146.108654] drm_atomic_helper_commit_planes+0x197/0x4c0
[ 146.108699] drm_atomic_helper_commit_tail_rpm+0x59/0xa0
[ 146.108718] commit_tail+0x103/0x1c0
...
[ 146.109302] ---[ end trace d901a1ba1d949036 ]---
Fix the bug by keeping the placement flags. The top-down placement flag
is stored in a separate variable.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Fixes: 7053e0eab4 ("drm/vram-helper: stop using TTM placement flags")
Cc: Christian König <christian.koenig@amd.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200921142536.4392-1-tzimmermann@suse.de
2020-09-22 10:57:18 +02:00
Jason Yan
d7b1c01814
drm/panel: samsung: make vint_table static const
...
This eliminates the following sparse warning:
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c:217:15: warning: symbol
'vint_table' was not declared. Should it be static?
While at it, make the table const as it is never modified.
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200916132301.2914017-1-yanaijie@huawei.com
2020-09-21 22:39:02 +02:00
Wang ShaoBo
523be44c33
drm/imx/dcss: fix unused but set variable warnings
...
Fix unused but set variable warning building with `make W=1`:
drivers/gpu/drm/imx/dcss/dcss-plane.c:270:6: warning:
variable ‘pixel_format’ set but not used [-Wunused-but-set-variable]
u32 pixel_format;
^~~~~~~~~~~~
Fixes: 9021c317b7 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com >
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20200911014414.4663-1-bobo.shaobowang@huawei.com
2020-09-21 17:29:32 +02:00