Lucas Stach
be132e1375
drm/etnaviv: add missing failure path to destroy suballoc
...
When something goes wrong in the GPU init after the cmdbuf suballocator
has been constructed, we fail to destroy it properly. This causes havok
later when the GPU is unbound due to a module unload or similar.
Fixes: e66774dd6f (drm/etnaviv: add cmdbuf suballocator)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Tested-by: Russell King <rmk+kernel@armlinux.org.uk >
2019-06-28 10:59:44 +02:00
Thomas Zimmermann
5ed7191dd9
drm/ast: Replace struct ast_framebuffer with GEM framebuffer helpers
...
The ast driver's struct ast_framebuffer is a buffer object with GEM
interface. There are already GEM framebuffer helpers that implement
the same functionality. Convert ast to these.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190627173410.8300-1-tzimmermann@suse.de
2019-06-28 09:02:29 +02:00
Dave Airlie
53e155f2bb
Merge tag 'drm-msm-next-2019-06-25' of https://gitlab.freedesktop.org/drm/msm into drm-next
...
+ usual progress on cleanups
+ dsi vs EPROBE_DEFER fixes
+ msm8998 (snapdragon 835 support)
+ a540 gpu support (mesa support already landed)
+ dsi, dsi-phy support
+ mdp5 and dpu interconnect (bus/memory scaling) support
+ initial prep work for per-context pagetables (at least the parts that
don't have external dependencies like iommu/arm-smmu)
There is one more patch for fixing DSI cmd mode panels (part of a set of
patches to get things working on nexus5), but it would be conflicty with
1cff7440a8 in drm-next without rebasing or back-merge,
and since it doesn't conflict with anything in msm-next, I think it best
if Sean merges that through drm-mix-fixes instead.
(In other news, I've been making some progress w/ getting efifb working
properly on sdm850 laptop without horrible hacks, and drm/msm + clk stuff
not totally falling over when bootloader enables display and things are
already running when driver probes.. but not quite ready yet, hopefully
we can post some of that for 5.4.. should help for both the sdm835 and
sdm850 laptops.)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Rob Clark <robdclark@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsj3N4XzDLSDoa+4RHZ9wXObYmhcep0M3LjnRg48BeLvg@mail.gmail.com
2019-06-28 10:16:40 +10:00
Daniel Vetter
66ab700506
drm/vc4: Use drm_gem_fb_prepare_fb
...
vc4 has switched to using drm_fb->obj[], so we can just use the helper
unchanged.
v2: Make it compile ... oops.
Cc: Eric Anholt <eric@anholt.net >
Cc: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20190625204208.5614-4-daniel.vetter@ffwll.ch
2019-06-28 00:27:59 +02:00
Daniel Vetter
e78ad76541
drm/msm: Use drm_gem_fb_prepare_fb
...
msm has switched over to drm_fb->obj[] a while ago already, so we can
just use the helper.
v2: Make it compile ... oops.
Cc: Eric Anholt <eric@anholt.net >
Cc: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Rob Clark <robdclark@gmail.com >
Cc: Sean Paul <sean@poorly.run >
Cc: Jeykumar Sankaran <jsanka@codeaurora.org >
Cc: Jordan Crouse <jcrouse@codeaurora.org >
Cc: Bruce Wang <bzwang@chromium.org >
Cc: Fritz Koenig <frkoenig@google.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190625204208.5614-3-daniel.vetter@ffwll.ch
2019-06-28 00:27:59 +02:00
Daniel Vetter
bd630a86be
drm/fb-helper: use gem_bo.resv, not dma_buf.resv in prepare_fb
...
With
commit 5f6ed9879a
Author: Daniel Vetter <daniel.vetter@ffwll.ch >
Date: Fri Jun 14 22:35:57 2019 +0200
drm/prime: automatically set gem_obj->resv on import
we consistently set drm_gem_bo.resv for imported buffers. Which means
we don't need to check the dma-buf in the prepare_fb helper, but can
generalize them so they're also useful for display+render drivers
which use gem_bo.resv to track their own rendering for their own
scanout buffers.
Cc: Emil Velikov <emil.velikov@collabora.com >
Cc: Eric Anholt <eric@anholt.net >
Cc: Rob Clark <robdclark@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190625204208.5614-2-daniel.vetter@ffwll.ch
2019-06-28 00:27:59 +02:00
Thomas Zimmermann
5d17718997
drm/mgag200: Replace struct mga_framebuffer with GEM framebuffer helpers
...
The mgag200 driver's struct mga_framebuffer is a buffer object with GEM
interface. There are already GEM framebuffer helpers that implement the
same functionality. Convert mgag200 to these.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190627080909.30471-1-tzimmermann@suse.de
2019-06-27 19:19:04 +02:00
Colin Ian King
440e80ce02
drm/amd/display: fix a couple of spelling mistakes
...
There are a couple of spelling mistakes in dm_error messages and
a comment. Fix these.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:57 -05:00
Evan Quan
4130ff8027
drm/amd/powerplay: no memory activity support on Vega10
...
Make mem_busy_percent sysfs interface invisible on Vega10.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:50 -05:00
shaoyunl
a864e29d94
drm/amdkfd: remove unnecessary warning message on gpu reset
...
In XGMI configuration, more than one asic can be reset at same time,
kfd is able to handle this and no need to trigger the warning
Signed-off-by: shaoyunl <shaoyun.liu@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:41 -05:00
Oak Zeng
f51af4357c
drm/amdgpu: Set queue_preemption_timeout_ms default value
...
Set default value of this kernel parameter to 9000
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:34 -05:00
Evan Quan
309bce0ca8
drm/amd/powerplay: add missing smu_get_clk_info_from_vbios() call
...
This seems a merge error.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:28 -05:00
Evan Quan
505ac3039a
drm/amd/powerplay: support runtime ppfeatures setting on Navi10
...
Implement Navi10 backend for runtime ppfeatures status retrieving
and setting support.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:21 -05:00
Evan Quan
b213646519
drm/amd/powerplay: check prerequisite for VCN power gating
...
VCN DPM is a necessary prerequisite for VCN power gating.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:22:08 -05:00
Felix Kuehling
f631959653
drm/ttm: return -EBUSY if waiting for busy BO fails
...
Returning -EAGAIN prevents ttm_bo_mem_space from trying alternate
placements and can lead to live-locks in amdgpu_cs, retrying
indefinitely and never succeeding.
Fixes: d367bd2a5e ("drm/ttm: fix busy memory to fail other user v10")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 11:19:36 -05:00
Alex Deucher
687ac4a702
drm/amdgpu: drop copy/paste leftover to fix big endian
...
The buf swap field doesn't exist on RB1.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 09:35:07 -05:00
Alex Deucher
d8dfc3bd46
drm/amdgpu: fix warning on 32 bit
...
Properly cast pointer to int.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 08:56:16 -05:00
Sam Ravnborg
156bdac990
drm/exynos: trigger build of all modules
...
Add COMPILE_TEST dependency to force exynos driver to
built for more than arm and to built modules
that otherwise required other symbols to be de-selected.
This will increase build coverage of the exynos driver
thus allowing most trivial build errors to be detected/fixed early.
This introduces one warning when built using sh:
exynos7_drm_decon.c: In function ‘decon_remove’:
exynos7_drm_decon.c:769:24: warning: unused variable ‘ctx’
struct decon_context *ctx = dev_get_drvdata(&pdev->dev);
This is due to the definition of iounmap() in sh,
and nothing that exynos driver can fix.
Include fix of exynos build for alpha.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
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: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Kukjin Kim <kgene@kernel.org >
Cc: Krzysztof Kozlowski <krzk@kernel.org >
Cc: Jingoo Han <jingoohan1@gmail.com >
Signed-off-by: Inki Dae <inki.dae@samsung.com >
2019-06-27 22:30:56 +09:00
Chris Wilson
7218524d3e
drm/i915: Make i945gm_vblank_work_func static
...
drivers/gpu/drm/i915/i915_irq.c:3382:6: warning: symbol 'i945gm_vblank_work_func' was not declared. Should it be static?
CC [M] drivers/gpu/drm/i915/i915_irq.o
drivers/gpu/drm/i915/i915_irq.c:3382:6: error: no previous prototype for ‘i945gm_vblank_work_func’ [-Werror=missing-prototypes]
void i945gm_vblank_work_func(struct work_struct *work)
Jani wrote the idential patch, so for posterity:
The static keyword was apparently accidentally removed in commit
08fa8fd0fa ("drm/i915: Switch to per-crtc vblank vfuncs"), leading to
sparse warning:
drivers/gpu/drm/i915/i915_irq.c:3382:6: warning: symbol
'i945gm_vblank_work_func' was not declared. Should it be static?
Make the function static again.
Meanwhile, the 0-day kbuilder also spotted the mistake.
Fixes: 08fa8fd0fa ("drm/i915: Switch to per-crtc vblank vfuncs")
Reported-by: kbuild test robot <lkp@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626224212.10141-1-chris@chris-wilson.co.uk
Link: https://patchwork.freedesktop.org/patch/msgid/20190627091914.30795-1-jani.nikula@intel.com
2019-06-27 14:08:50 +01:00
Andrey Smirnov
fdb29b7380
drm/bridge: tc358767: Add support for address-only I2C transfers
...
Transfer size of zero means a request to do an address-only
transfer. Since the HW support this, we probably shouldn't be just
ignoring such requests. While at it allow DP_AUX_I2C_MOT flag to pass
through, since it is supported by the HW as well.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-16-andrew.smirnov@gmail.com
2019-06-27 13:38:24 +02:00
Andrey Smirnov
32d3621996
drm/bridge: tc358767: Replace magic number in tc_main_link_enable()
...
We don't need 8 byte array, DP_LINK_STATUS_SIZE (6) should be
enough. This also gets rid of a magic number as a bonus.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-15-andrew.smirnov@gmail.com
2019-06-27 13:38:21 +02:00
Andrey Smirnov
d174db0788
drm/bridge: tc358767: Drop unnecessary 8 byte buffer
...
tc_get_display_props() never reads more than a byte via AUX, so
there's no need to reserve 8 for that purpose. No function change
intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-14-andrew.smirnov@gmail.com
2019-06-27 13:38:19 +02:00
Andrey Smirnov
7264892648
drm/bridge: tc358767: Simplify tc_aux_wait_busy()
...
We never pass anything but 100 as timeout_ms to tc_aux_wait_busy(), so
we may as well hardcode that value and simplify function's signature.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-13-andrew.smirnov@gmail.com
2019-06-27 13:38:17 +02:00
Andrey Smirnov
134fb306b1
drm/bridge: tc358767: Introduce tc_pllupdate()
...
tc_wait_pll_lock() is always called as a follow-up for updating
PLLUPDATE and PLLEN bit of a given PLL control register. To simplify
things, merge the two operation into a single helper function
tc_pllupdate() and convert the rest of the code to use it. No
functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-12-andrew.smirnov@gmail.com
2019-06-27 13:38:13 +02:00
Andrey Smirnov
c49f60dfbf
drm/bridge: tc358767: Introduce tc_set_syspllparam()
...
Move common code converting clock rate to an appropriate constant and
configuring SYS_PLLPARAM register into a separate routine and convert
the rest of the code to use it. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-11-andrew.smirnov@gmail.com
2019-06-27 13:38:08 +02:00
Andrey Smirnov
12dfe7c4d9
drm/bridge: tc358767: Use reported AUX transfer size
...
Don't assume that requested data transfer size is the same as amount
of data that was transferred. Change the code to get that information
from DP0_AUXSTATUS instead.
Since the check for AUX_BUSY in tc_aux_get_status() is pointless (it
will always called after tc_aux_wait_busy()) and there's only one user
of it, inline its code into tc_aux_transfer() instead of trying to
accommodate the change above.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-10-andrew.smirnov@gmail.com
2019-06-27 13:38:00 +02:00
Andrey Smirnov
e0655feaec
drm/bridge: tc358767: Increase AUX transfer length limit
...
According to the datasheet tc358767 can transfer up to 16 bytes via
its AUX channel, so the artificial limit of 8 appears to be too
low. However only up to 15-bytes seem to be actually supported and
trying to use 16-byte transfers results in transfers failing
sporadically (with bogus status in case of I2C transfers), so limit it
to 15.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-9-andrew.smirnov@gmail.com
2019-06-27 13:37:55 +02:00
Andrey Smirnov
792a081a1b
drm/bridge: tc358767: Simplify AUX data write
...
Simplify AUX data write by dropping index arithmetic and shifting and
replacing it with a call to a helper function that does two things:
1. Copies user-provided data into a write buffer
2. Transfers contents of the write buffer to up to 4 32-bit
registers on the chip
Note that separate data endianness fix:
tmp = (tmp << 8) | buf[i];
that was reserved for DP_AUX_I2C_WRITE looks really strange, since it
will place data differently depending on the passed user-data
size. E.g. for a write of 1 byte, data transferred to the chip would
look like:
[byte0] [dummy1] [dummy2] [dummy3]
whereas for a write of 4 bytes we'd get:
[byte3] [byte2] [byte1] [byte0]
Since there's no indication in the datasheet that I2C write buffer
should be treated differently than AUX write buffer and no comment in
the original code explaining why it was done this way, that special
I2C write buffer transformation was dropped in this patch.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-8-andrew.smirnov@gmail.com
2019-06-27 13:37:48 +02:00
Andrey Smirnov
53b166dca5
drm/bridge: tc358767: Simplify AUX data read
...
Simplify AUX data read by removing index arithmetic and shifting with
a helper function that does two things:
1. Fetch data from up to 4 32-bit registers from the chip
2. Copy read data into user provided array.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-7-andrew.smirnov@gmail.com
2019-06-27 13:37:40 +02:00
Andrey Smirnov
6d0c383159
drm/bridge: tc358767: Drop custom tc_write()/tc_read() accessors
...
A very unfortunate aspect of tc_write()/tc_read() macro helpers is
that they capture quite a bit of context around them and thus require
the caller to have magic variables 'ret' and 'tc' as well as label
'err'. That makes a number of code paths rather counter-intuitive and
somewhat clunky, for example tc_stream_clock_calc() ends up being like
this:
int ret;
tc_write(DP0_VIDMNGEN1, 32768);
return 0;
err:
return ret;
which is rather surprising when you read the code for the first
time. Since those helpers arguably aren't really saving that much code
and there's no way of fixing them without making them too verbose to
be worth it change the driver code to not use them at all.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-6-andrew.smirnov@gmail.com
2019-06-27 13:37:31 +02:00
Andrey Smirnov
3f072c304c
drm/bridge: tc358767: Simplify tc_set_video_mode()
...
Simplify tc_set_video_mode() by replacing explicit shifting using
macros from <linux/bitfield.h>. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-5-andrew.smirnov@gmail.com
2019-06-27 13:37:21 +02:00
Andrey Smirnov
aa92213f38
drm/bridge: tc358767: Simplify polling in tc_link_training()
...
Replace explicit polling in tc_link_training() with equivalent call to
tc_poll_timeout() for simplicity. No functional change intended (not
including slightly altered debug output).
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-4-andrew.smirnov@gmail.com
2019-06-27 13:37:15 +02:00
Andrey Smirnov
ebcce4e642
drm/bridge: tc358767: Simplify polling in tc_main_link_setup()
...
Replace explicit polling loop with equivalent call to
tc_poll_timeout() for brevity. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-3-andrew.smirnov@gmail.com
2019-06-27 13:37:09 +02:00
Andrey Smirnov
93a105694f
drm/bridge: tc358767: Simplify tc_poll_timeout()
...
Implementation of tc_poll_timeout() is almost a 100% copy-and-paste of
the code for regmap_read_poll_timeout(). Replace copied code with a
call to the original. While at it change tc_poll_timeout to accept
"struct tc_data *" instead of "struct regmap *" for brevity. No
functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Cory Tusar <cory.tusar@zii.aero >
Cc: Chris Healy <cphealy@gmail.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-2-andrew.smirnov@gmail.com
2019-06-27 13:37:01 +02:00
Sam Ravnborg
2bda34d7d9
drm/exynos: drop drmP.h usage
...
Drop use of the deprecated drmP.h file.
Replace with forwards / externals as appropriate.
While touching the list of include files divide
them up in blocks and sort them.
v3:
- fix build errors in exynos_drm_g2d.c (Inki Dae)
The exynos_drm_g2d.c file is not built in the
standard configurations and was therefore missed.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
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: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Kukjin Kim <kgene@kernel.org >
Cc: Krzysztof Kozlowski <krzk@kernel.org >
Cc: Jingoo Han <jingoohan1@gmail.com >
Fixed merge conflict.
Signed-off-by: Inki Dae <inki.dae@samsung.com >
2019-06-27 19:56:09 +09:00
Colin Ian King
e61576c4b9
drm/mgag200: add in missing { } around if block
...
There is an if block that is missing the { } curly brackets. Add
these in.
Addresses-Coverity: ("Structurally dead code")
Fixes: 94dc57b103 ("drm/mgag200: Rewrite cursor handling")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20190614143911.21806-1-colin.king@canonical.com
2019-06-27 10:18:28 +02:00
Jani Nikula
b40cf94c76
drm/i915: make intel_uc_fw.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-13-jani.nikula@intel.com
2019-06-27 10:50:54 +03:00
Jani Nikula
ba740cfc2f
drm/i915: make intel_gvt.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-12-jani.nikula@intel.com
2019-06-27 10:50:48 +03:00
Jani Nikula
5e0cca98b4
drm/i915: make intel_guc_reg.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
v2: also include i915_reg.h (Michal)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-11-jani.nikula@intel.com
2019-06-27 10:50:45 +03:00
Jani Nikula
72629d11d5
drm/i915: make intel_guc_fwif.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-10-jani.nikula@intel.com
2019-06-27 10:50:42 +03:00
Jani Nikula
016c1c8938
drm/i915: make intel_guc_ct.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-9-jani.nikula@intel.com
2019-06-27 10:50:40 +03:00
Jani Nikula
961ebc9dd1
drm/i915: make i915_vgpu.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-8-jani.nikula@intel.com
2019-06-27 10:50:38 +03:00
Jani Nikula
f8daf6418e
drm/i915: make i915_pvinfo.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-7-jani.nikula@intel.com
2019-06-27 10:50:35 +03:00
Jani Nikula
f807d31a21
drm/i915: make i915_globals.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-6-jani.nikula@intel.com
2019-06-27 10:50:32 +03:00
Jani Nikula
c75299aea2
drm/i915: make i915_fixed.h self-contained
...
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-4-jani.nikula@intel.com
2019-06-27 10:50:24 +03:00
Jani Nikula
7fcc7ca549
drm/i915: add header search path to subdir Makefiles
...
With the subdirectories we lost the ability to build individual files on
the command line, for example:
$ make drivers/gpu/drm/i915/display/intel_display.o
This was due to the top level directory missing from header search
path. Add the header search paths to subdir Makefiles.
Note that none of the other options in the top level i915 Makefile are
taken into account when building individual files. Usually this is not a
concern.
Reported-by: Imre Deak <imre.deak@intel.com >
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626143618.21800-2-jani.nikula@intel.com
2019-06-27 10:25:48 +03:00
Jani Nikula
9ef424e58e
drm/i915: prefix header search path with $(srctree)/
...
Per commit 43068cb7ba ("drm: prefix header search paths with
$(srctree)/") this is what we should be doing. Follow suit.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190626143618.21800-1-jani.nikula@intel.com
2019-06-27 10:25:09 +03:00
Dave Airlie
14808a12bd
Merge tag 'drm-next-5.3-2019-06-25' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
drm-next-5.3-2019-06-25:
Merge drm-next
amdgpu:
- SR-IOV L1 policy fixes
- Removed no longer needed vram_page_split module parameter
- Add module parameter to override default ABM level
- Gamma fixes
- No need to check return values for debugfs
- Improve HMM error handling
- Avoid possible OOM situations when lots of thread are submitting with
memory contention
- Improve hw i2c access abritration
- DSC (Display Stream Compression) support in DC
- Initial navi10 support
* DC support
* GFX/Compute support
* SDMA support
* Power Management support
* VCN support
- Static checker fixes
- Misc cleanups
- fix long udelay on arm
amdkfd:
- Implement priority controls for gfx9
- Enable VEGAM
- Rework mqd allocation and init
- Circular locking fix
- Fix SDMA queue allocation race condition
- No need to check return values for debugfs
- Add proc style process information
- Initial navi10 support
radeon:
- No need to check return values for debugfs
UAPI changes:
- GDDR6 added to vram type query
- New Navi10 details added gpu info query
- Navi family added to asic family query
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190625195520.3817-1-alexander.deucher@amd.com
2019-06-27 12:33:57 +10:00
Daniel Vetter
e5ff5344f4
drm/vkms: No need for ->pages_lock in crc work anymore
...
We're now guaranteed to no longer race against prepare_fb/cleanup_fb,
which means we can access ->vaddr without having to hold a lock.
Before the previous patches it was fairly easy to observe the cursor
->vaddr being invalid, but that's now gone, so we can upgrade to a
full WARN_ON.
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Tested-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-11-daniel.vetter@ffwll.ch
2019-06-26 23:19:22 -03:00
Daniel Vetter
8b18658736
drm/vkms: totally reworked crc data tracking
...
The crc computation worker needs to be able to get at some data
structures and framebuffer mappings, while potentially more atomic
updates are going on. The solution thus far is to copy relevant bits
around, but that's very tedious.
Here's a new approach, which tries to be more clever, but relies on a
few not-so-obvious things:
- crtc_state is always updated when a plane_state changes. Therefore
we can just stuff plane_state pointers into a crtc_state. That
solves the problem of easily getting at the needed plane_states.
- with the flushing changes from previous patches the above also holds
without races due to the next atomic update being a bit eager with
cleaning up pending work - we always wait for all crc work items to
complete before unmapping framebuffers.
- we also need to make sure that the hrtimer fires off the right
worker. Keep a new distinct crc_state pointer, under the
vkms_output->lock protection for this. Note that crtc->state is
updated very early in the atomic commit, way before we arm the
vblank event - the vblank event should always match the buffers we
use to compute the crc. This also solves an issue in the hrtimer,
where we've accessed drm_crtc->state without holding the right locks
(we held none - oops).
- in the worker itself we can then just access the plane states we
need, again solving a bunch of ordering and locking issues.
Accessing plane->state requires locks, accessing the private
vkms_crtc_state->active_planes pointer only requires that the memory
doesn't get freed too early.
The idea behind vkms_crtc_state->active_planes is that this would
contain all visible planes, in z-order, as a first step towards a more
generic blending implementation.
Note that this patch also fixes races between prepare_fb/cleanup_fb
and the crc worker accessing ->vaddr.
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Tested-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-10-daniel.vetter@ffwll.ch
2019-06-26 23:15:35 -03:00