Alex Deucher
9a2ffeb525
drm/amdgpu: drop drmP.h from vcn_v2_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:36 -05:00
Alex Deucher
75589f496d
drm/amdgpu: drop drmP.h from sdma_v5_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:31 -05:00
Alex Deucher
e9eea90247
drm/amdgpu: drop drmP.h from nv.c
...
And fix up the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:26 -05:00
Alex Deucher
b23b2e9e49
drm/amdgpu: drop drmP.h from navi10_ih.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:21 -05:00
Alex Deucher
0a069bbe13
drm/amdgpu: drop drmP.h in gfx_v10_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:16 -05:00
Alex Deucher
3b90f6ecdf
drm/amdgpu: drop drmP.h from amdgpu_amdkfd_gfx_v10.c
...
Unused.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:10 -05:00
Alex Deucher
32978d8cfd
drm/amdgpu: drop drmP.h in amdgpu_amdkfd_arcturus.c
...
Unused.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:32:56 -05:00
Rob Clark
7e9e5ead55
drm/vgem: fix cache synchronization on arm/arm64
...
drm_cflush_pages() is no-op on arm/arm64. But instead we can use
dma_sync API.
Fixes failures w/ vgem_test.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Rob Clark <robdclark@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190717211542.30482-1-robdclark@gmail.com
2019-07-31 14:29:20 -04:00
José Roberto de Souza
c2052d6e24
drm/i915/ehl: Ungate DDIC and DDID
...
Specification states that DDI_CLK_SEL needs to be mapped to MG clock
even if MG do not exist on EHL, this will ungate those DDIs.
BSpec: 20845
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Tested-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730175121.16413-1-jose.souza@intel.com
2019-07-31 10:52:18 -07:00
Thomas Gleixner
dc25ace66c
drm/i810: Use CONFIG_PREEMPTION
...
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by
CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same
functionality which today depends on CONFIG_PREEMPT.
Change the Kconfig dependency of i810 to !CONFIG_PREEMPTION so the driver
is not accidentally built on a RT kernel.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.1907262223280.1791@nanos.tec.linutronix.de
2019-07-31 17:05:03 +02:00
Maarten Lankhorst
1956ecf4c6
Merge tag 'v5.3-rc2' into drm-misc-fixes
...
Linux 5.3-rc2
Required for a CONFIG_PREEMPTION fix to i810. :)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
2019-07-31 17:03:10 +02:00
Tvrtko Ursulin
1b6c3c6d46
drm/i915: Move MOCS setup to intel_mocs.c
...
Hide the details of MOCS setup from i915_gem by moving both current calls
into one in intel_mocs_init.
Cc: Stuart Summers <stuart.summers@intel.com >
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Stuart Summers <stuart.summers@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190713010940.17711-21-lucas.demarchi@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20190730180407.5993-6-lucas.demarchi@intel.com
2019-07-31 07:40:35 -07:00
Michel Thierry
a7a7a0e6eb
drm/i915/tgl: Tigerlake only has global MOCS registers
...
Until Icelake, each engine had its own set of 64 MOCS registers. In
order to simplify, Tigerlake moves to only 64 Global MOCS registers,
which are no longer part of the engine context. Since these registers
are now global, they also only need to be initialized once.
>From Gen12 onwards, MOCS must specify the target cache (3:2) and LRU
management (5:4) fields and cannot be programmed to 'use the value from
Private PAT', because these fields are no longer part of the PPAT. Also
cacheability control (1:0) field has changed, 00 no longer means 'use
controls from page table', but uncacheable (UC).
v2 (Lucas):
- Move the changes to the fault registers to a separate commit - the
old ones overlap with the range used by the new global MOCS
(requested by Daniele)
v3 (Lucas):
- Clarify comment about setting the unused entries to the same value
of index 0, that is the invalid entry (requested by Daniele)
- Move changes to DONE_REG and ERROR_GEN6 to a separate commit
(requested by Daniele)
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Michel Thierry <michel.thierry@intel.com >
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730180407.5993-5-lucas.demarchi@intel.com
2019-07-31 07:40:32 -07:00
Tomasz Lis
2ddf992179
drm/i915/tgl: Define MOCS entries for Tigerlake
...
The MOCS table is published as part of bspec, and versioned. Entries
are supposed to never be modified, but new ones can be added. Adding
entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work.
Although we are changing the gen11 table, those changes are supposed to
be backward compatible since we are only touching previously undefined
entries.
v2: Add the missing entries in 49-51 range and replace "HW reserved"
terminology to what it actually is: L1 is implicitly enabled
(from Daniele)
v3: Use a different table for Tiger Lake since entries 0 and 1 are not
the same (from Daniele)
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730180407.5993-4-lucas.demarchi@intel.com
2019-07-31 07:40:31 -07:00
Lucas De Marchi
23dea05191
drm/i915/tgl: stop using ERROR_GEN6 and DONE_REG
...
These registers have been removed on gen12.
v2: merge common branch for IS_GEN_RANGE(i915, 6, 11)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730180407.5993-3-lucas.demarchi@intel.com
2019-07-31 07:40:31 -07:00
Lucas De Marchi
91b59cd98a
drm/i915/tgl: Move fault registers to their new offset
...
The fault registers moved to another offset. The old location is now
taken by the global MOCS registers, to be added in a follow up change.
Based on previous patches by Michel Thierry <michel.thierry@intel.com >.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730180407.5993-2-lucas.demarchi@intel.com
2019-07-31 07:40:29 -07:00
Lucas De Marchi
900c9173ca
drm/i915: remove dangling forward declaration
...
Commit 20a7f2fc4d ("drm/i915: Convert intel_mocs_init_l3cc_table to
intel_gt") removed the only user.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730182614.14379-1-lucas.demarchi@intel.com
2019-07-31 07:40:10 -07:00
Andrzej Pietrasiewicz
bed7a2182d
drm/radeon: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/0836f34238730afce3f4d6b13f5cf04f832b668a.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:36:03 +02:00
Andrzej Pietrasiewicz
5b50fa2b35
drm/amdgpu: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7fee0fa0d0f77af6595d283d5f3ae5d551475821.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:35:37 +02:00
Andrzej Pietrasiewicz
cfb4445529
drm/bridge: ti-tfp410: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3b61da77a6456805db0deffe6d1a2343dd784730.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:34:55 +02:00
Andrzej Pietrasiewicz
9ebc4d2140
drm/bridge: dw-hdmi: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4bcf0f154c683c9787fa34f911ebc52de6b4a7a1.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:34:31 +02:00
Andrzej Pietrasiewicz
a4f9087e85
drm/bridge: dumb-vga-dac: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ebb75e71b8b7c8d65d54a947a03fd21b8969fb3a.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:33:57 +02:00
Andrzej Pietrasiewicz
350fd554ee
drm/ast: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ff968add8074d109aeed02f0708edd85138246c3.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:33:31 +02:00
Andrzej Pietrasiewicz
9572ae176a
drm/mgag200: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d9e8d4281f6778e5598410a44f1b29c85df1c16d.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:33:09 +02:00
Andrzej Pietrasiewicz
7058e76682
drm: sti: Provide ddc symlink in hdmi connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/510765aff8ef99683aa2da48bd08004376b1980a.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:32:38 +02:00
Andrzej Pietrasiewicz
2ae7eb372e
drm/imx: imx-tve: Provide ddc symlink in connector's sysfs
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1c660776741760b8094484268b670a09da8a9042.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:32:15 +02:00
Andrzej Pietrasiewicz
be0ec35940
drm/imx: imx-ldb: Provide ddc symlink in connector's sysfs
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/bcfe39a0333df951a7d160b3a946c2c32e7eac7f.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:31:44 +02:00
Andrzej Pietrasiewicz
1e8f17855f
drm/sun4i: hdmi: Provide ddc symlink in sun4i hdmi connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b5a8881b226a9af7d31eb6a57d7fe0fccdcb3a47.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:31:17 +02:00
Andrzej Pietrasiewicz
100163df42
drm: Add drm_connector_init() variant with ddc
...
Allow passing ddc adapter pointer to the init function. Even if
drm_connector_init() sometime in the future decides to e.g. memset() all
connector fields to zeros, the newly added function ensures that at its
completion the ddc member of connector is correctly set.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3915224ae895240fd0973cf7f06b9d453e4d8520.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:27:13 +02:00
Andrzej Pietrasiewicz
e1a29c6c59
drm: Add ddc link in sysfs created by drm_connector
...
Add generic code which creates symbolic links in sysfs, pointing to ddc
interface used by a particular video output. For example:
ls -l /sys/class/drm/card0-HDMI-A-1/ddc
lrwxrwxrwx 1 root root 0 Jun 24 10:42 /sys/class/drm/card0-HDMI-A-1/ddc \
-> ../../../../soc/13880000.i2c/i2c-2
This makes it easy for user to associate a display with its ddc adapter
and use e.g. ddcutil to control the chosen monitor.
This patch adds an i2c_adapter pointer to struct drm_connector. Particular
drivers can then use it instead of using their own private instance. If a
connector contains a ddc, then create a symbolic link in sysfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d470def6cd661b777faeee67b5838a4623c4010e.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:26:33 +02:00
Noralf Trønnes
77b8cabf3d
drm/gm12u320: Move driver to drm/tiny
...
Move the driver to the new haven for tiny DRM drivers.
Cc: Hans de Goede <hdegoede@redhat.com >
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725105132.22545-4-noralf@tronnes.org
2019-07-31 15:17:03 +02:00
Noralf Trønnes
043386a0f0
drm/tinydrm: Rename folder to tiny
...
The drm in tinydrm is superfluous so rename to tiny.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725105132.22545-3-noralf@tronnes.org
2019-07-31 15:16:10 +02:00
Noralf Trønnes
28c47e16ea
drm/tinydrm/Kconfig: Remove menuconfig DRM_TINYDRM
...
This makes the tiny drivers visible by default without having to enable a
knob.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Hans de Goede <hdegoede@redhat.com > to it once
Link: https://patchwork.freedesktop.org/patch/msgid/20190725105132.22545-2-noralf@tronnes.org
2019-07-31 15:15:02 +02:00
Daniele Ceraolo Spurio
63064d822c
drm/i915/uc: Move uC WOPCM setup in uc_init_hw
...
The register we write are not WOPCM regs but uC ones related to how
GuC and HuC are going to use the WOPCM, so it makes logical sense
for them to be programmed as part of uc_init_hw. The WOPCM map on the
other side is not uC-specific (although that is our main use-case), so
keep that separate.
v2: move write_and_verify to uncore, fix log, re-use err_out tag,
add intel_wopcm_guc_base, fix log
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730230743.19542-2-daniele.ceraolospurio@intel.com
2019-07-31 10:19:28 +01:00
Daniele Ceraolo Spurio
602776f96b
drm/i915/uc: Don't enable communication twice on resume
...
When coming out of S3/S4 we sanitize and re-init the HW, which includes
enabling communication during uc_init_hw. We therefore don't want to do
that again in uc_resume and can just tell GuC to reload its state.
v2: split uc_resume and uc_runtime_resume to match the suspend
functions and to better differentiate the expected state in the 2
scenarios (Chris)
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730230743.19542-1-daniele.ceraolospurio@intel.com
2019-07-31 10:01:32 +01:00
Chris Wilson
f277bc0c98
drm/i915/selftests: Pass intel_context to igt_spinner
...
Teach igt_spinner to only use our internal structs, decoupling the
interface from the GEM contexts. This makes it easier to avoid
requiring ce->gem_context back references for kernel_context that may
have them in future.
v2: Lift engine lock to verify_wa() caller.
v3: Less than v2, but more so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190731081126.9139-1-chris@chris-wilson.co.uk
2019-07-31 09:45:27 +01:00
Daniel Vetter
51c9874711
drm/prime: Ditch gem_prime_res_obj hook
...
Everyone is just using gem_object->resv now.
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Cc: Sean Paul <sean@poorly.run >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-5-daniel.vetter@ffwll.ch
2019-07-31 10:19:23 +02:00
Daniel Vetter
b2ad978fd0
drm/amdgpu: Fill out gem_object->resv
...
That way we can ditch our gem_prime_res_obj implementation. Since ttm
absolutely needs the right reservation object all the boilerplate is
already there and we just have to wire it up correctly.
Note that gem/prime doesn't care when we do this, as long as we do it
before the bo is registered and someone can call the handle2fd ioctl
on it.
Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour
of always passing a non-NULL resv to ttm_bo_init(). At least for gem
drivers that would avoid having two of these, on in ttm_buffer_object
and the other in drm_gem_object, one just there for confusion.
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: "Michel Dänzer" <michel.daenzer@amd.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Huang Rui <ray.huang@amd.com >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Cc: Evan Quan <evan.quan@amd.com >
Cc: Sonny Jiang <sonny.jiang@amd.com >
Cc: Amber Lin <Amber.Lin@amd.com >
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl >
Cc: Junwei Zhang <Jerry.Zhang@amd.com >
Cc: Thomas Zimmermann <contact@tzimmermann.org >
Cc: Samuel Li <Samuel.Li@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-4-daniel.vetter@ffwll.ch
2019-07-31 10:19:23 +02:00
Daniel Vetter
aa77e7f6d5
drm/nouveau: Fill out gem_object->resv
...
That way we can ditch our gem_prime_res_obj implementation. Since ttm
absolutely needs the right reservation object all the boilerplate is
already there and we just have to wire it up correctly.
Note that gem/prime doesn't care when we do this, as long as we do it
before the bo is registered and someone can call the handle2fd ioctl
on it.
Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour
of always passing a non-NULL resv to ttm_bo_init(). At least for gem
drivers that would avoid having two of these, on in ttm_buffer_object
and the other in drm_gem_object, one just there for confusion.
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: nouveau@lists.freedesktop.org
Reviewed-by: Ben Skeggs <bskeggs@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-3-daniel.vetter@ffwll.ch
2019-07-31 10:19:23 +02:00
Daniel Vetter
c549da2d21
drm/radeon: Fill out gem_object->resv
...
That way we can ditch our gem_prime_res_obj implementation. Since ttm
absolutely needs the right reservation object all the boilerplate is
already there and we just have to wire it up correctly.
Note that gem/prime doesn't care when we do this, as long as we do it
before the bo is registered and someone can call the handle2fd ioctl
on it.
Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour
of always passing a non-NULL resv to ttm_bo_init(). At least for gem
drivers that would avoid having two of these, on in ttm_buffer_object
and the other in drm_gem_object, one just there for confusion.
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-2-daniel.vetter@ffwll.ch
2019-07-31 10:19:23 +02:00
Evan Quan
6dee4829cf
drm/amd/powerplay: correct UVD/VCE/VCN power status retrieval
...
VCN should be used for Vega20 later ASICs while UVD and VCE
are for previous ASICs.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
a3ebbdb95f
drm/amd/powerplay: correct Navi10 VCN powergate control (v2)
...
No VCN DPM bit check as that's different from VCN PG. Also
no extra check for possible double enablement/disablement
as that's already done by VCN.
v2: check return value of smu_feature_set_enabled
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
e21e3581e2
drm/amd/powerplay: support VCN powergate status retrieval for SW SMU
...
Commonly used for VCN powergate status retrieval for SW SMU.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
201cd702b7
drm/amd/powerplay: support VCN powergate status retrieval on Raven
...
Enable VCN powergate status report on Raven.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
a02709818f
drm/amd/powerplay: add new sensor type for VCN powergate status
...
VCN is widely used in new ASICs and different from tranditional
UVD and VCE.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Chris Wilson
cb0c43f30c
drm/i915: Avoid ce->gem_context->i915
...
My plan for the future is to have kernel contexts not to have a GEM
context backpointer (as they will not belong to any GEM context). In a
few places, we use ce->gem_context to simply obtain the i915 backpointer,
for which we can use ce->engine->i915 instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190730163441.16477-1-chris@chris-wilson.co.uk
2019-07-31 07:43:42 +01:00
Wang Xiayang
929e571c04
drm/amdgpu: fix a potential information leaking bug
...
Coccinelle reports a path that the array "data" is never initialized.
The path skips the checks in the conditional branches when either
of callback functions, read_wave_vgprs and read_wave_sgprs, is not
registered. Later, the uninitialized "data" array is read
in the while-loop below and passed to put_user().
Fix the path by allocating the array with kcalloc().
The patch is simplier than adding a fall-back branch that explicitly
calls memset(data, 0, ...). Also it does not need the multiplication
1024*sizeof(*data) as the size parameter for memset() though there is
no risk of integer overflow.
Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 01:26:09 -05:00
Christian König
67d0859e27
drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep
...
We always need to drop the ctx reference and should check
for errors first and then dereference the fence pointer.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 01:26:09 -05:00
Evan Quan
f0bc1ee473
drm/amd/powerplay: enable SW SMU reset functionality
...
Move SMU irq handler register to sw_init as that's totally
software related. Otherwise, it will prevent SMU reset working.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 00:07:16 -05:00
Evan Quan
479156f2e5
drm/amd/powerplay: fix null pointer dereference around dpm state relates
...
DPM state relates are not supported on the new SW SMU ASICs. But still
it's not OK to trigger null pointer dereference on accessing them.
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-07-31 00:06:58 -05:00